Interface UserCommonsRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<UserCommons,UserCommonsKey>, org.springframework.data.repository.Repository<UserCommons,UserCommonsKey>

@Repository public interface UserCommonsRepository extends org.springframework.data.repository.CrudRepository<UserCommons,UserCommonsKey>
  • Method Details

    • findByCommonsIdAndUserId

      @Query("SELECT uc FROM user_commons uc WHERE uc.commons.id = :commonsId AND uc.user.id = :userId") Optional<UserCommons> findByCommonsIdAndUserId(Long commonsId, Long userId)
    • findByCommonsId

      @Query("SELECT uc FROM user_commons uc WHERE uc.commons.id = :commonsId") Iterable<UserCommons> findByCommonsId(Long commonsId)