fixed sql syntax

This commit is contained in:
dashevchenko 2023-10-09 13:17:17 +03:00
parent 38275f98ba
commit e03e276c5a

View File

@ -33,7 +33,7 @@ public interface WidgetsBundleRepository extends JpaRepository<WidgetsBundleEnti
WidgetsBundleEntity findWidgetsBundleByTenantIdAndAlias(UUID tenantId, String alias);
@Query("SELECT wb FROM WidgetsBundleEntity wb WHERE wb.tenantId = :systemTenantId " +
"AND (:wb.title is NULL OR ilike(wb.title, CONCAT('%', :textSearch, '%')))")
"AND (:textSearch is NULL OR ilike(wb.title, CONCAT('%', :textSearch, '%')) = true)")
Page<WidgetsBundleEntity> findSystemWidgetsBundles(@Param("systemTenantId") UUID systemTenantId,
@Param("textSearch") String textSearch,
Pageable pageable);