Interface HerdRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Herd,Long>, org.springframework.data.repository.Repository<Herd,Long>

@Repository public interface HerdRepository extends org.springframework.data.repository.CrudRepository<Herd,Long>
  • Method Summary

    Modifier and Type
    Method
    Description
    findByGameIdAndUserId(Long gameId, Long userId)
     

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
  • Method Details

    • findByGameIdAndUserId

      @Query("SELECT h FROM herds h WHERE h.farmer.game.id = :gameId AND h.farmer.user.id = :userId ORDER BY h.id") Iterable<Herd> findByGameIdAndUserId(Long gameId, Long userId)