Skip to content

Commit

Permalink
[MODCON-130] - Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
azizbekxm committed Dec 22, 2023
1 parent 7e9ff61 commit 58e4613
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public interface UserTenantRepository extends JpaRepository<UserTenantEntity, UU
@Query("SELECT ut FROM UserTenantEntity ut WHERE ut.tenant.isDeleted IS NULL OR ut.tenant.isDeleted= FALSE")
Page<UserTenantEntity> getAll(Pageable pageable);

@Query("SELECT ut FROM UserTenantEntity ut WHERE ut.id= ?1 AND (ut.tenant.isDeleted IS NULL OR ut.tenant.isDeleted= FALSE)")
@Query("SELECT ut FROM UserTenantEntity ut WHERE ut.userId= ?1 AND (ut.tenant.isDeleted IS NULL OR ut.tenant.isDeleted= FALSE)")
Page<UserTenantEntity> findByUserId(UUID userId, Pageable pageable);

@Query("SELECT ut FROM UserTenantEntity ut WHERE ut.id= ?1")
@Query("SELECT ut FROM UserTenantEntity ut WHERE ut.userId= ?1")
Page<UserTenantEntity> findAnyByUserId(UUID userId, Pageable pageable);

@Query("SELECT ut FROM UserTenantEntity ut WHERE ut.username= ?1 AND ut.tenant.id= ?2 AND (ut.tenant.isDeleted IS NULL OR ut.tenant.isDeleted= FALSE)")
Expand Down

0 comments on commit 58e4613

Please sign in to comment.