79679983

Date: 2025-06-26 06:20:53
Score: 2
Natty:
Report link

Please change your code to this:

@Query("select i from Brand i where i.name like %:name% and i.reviewStage = :stage")
Page<Brand> getLikeName(@Param("name") String name, @Param("stage") ReviewStage stage, Pageable pageable);

or this one:

@Query(value = "select * from brand i where i.name like CONCAT('%', ?1, '%') and i.review_stage = ?2", nativeQuery = true)
List<Brand> getLikeName(String name, String reviewStage, Pageable pageable);

Reasons:
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Alireza Abolhasani