IntelliJ IDEA Ultimate is showing me an error:
<expression>,<operator>, GROUP, HAVING or ORDER expected got '('
right under a braket inside a HQL statement which apperently is not a problem for compilation or runtime.
@Query("SELECT offer FROM OfferEntity offer " +
" JOIN offer.placeOwnership AS owner " +
" JOIN owner.place AS place " +
"WHERE " +
" place.id = :placeId AND " +
" to_char(offer.dayFrom, 'yyyy-MM-dd') = :offerDate AND " +
^
<expression>,<operator>, GROUP, HAVING or ORDER expected got '('
" offer.repeating = false")
List<OfferEntity> getAllForDate(@Param("placeId") Long placeId, @Param("offerDate") String offerDate);
Any idea why this is the case and how to get rid of this? It's annoying and missleading (presumably since the code is working).

https://www.baeldung.com/spring-data-jpa-query -> In 2.2 Native
@Query(
value = "SELECT * FROM USERS u WHERE u.status = 1",
nativeQuery = true)
is worked for us. You need to add "value = " and ", nativeQuery = true" inside the @Query
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With