Commit 59697156 authored by Matija Obreza's avatar Matija Obreza

Fix AccesssionListRepository native queries

parent ce838010
......@@ -39,18 +39,18 @@ public interface AccessionListRepository extends JpaRepository<AccessionList, Lo
@Query("from AccessionList al where al.uuid in (?1)")
List<AccessionList> findByUuids(List<UUID> uuid);
@Query(nativeQuery = true, value = "insert into accelistitems (listid, acceid) values (?1, ?2)")
@Query(nativeQuery = true, value = "insert into accession_listitem (listid, acceid) values (?1, ?2)")
@Modifying
void addOne(AccessionList list, AccessionId accession);
@Query(nativeQuery = true, value = "insert into accelistitems (listid, acceid) values (?1, ?2)")
@Query(nativeQuery = true, value = "insert into accession_listitem (listid, acceid) values (?1, ?2)")
@Modifying
void addOne(AccessionList acceList, long acceId);
@Query(nativeQuery=true, value="select count(acceid) from accelistitems where listid = ?1")
@Query(nativeQuery=true, value="select count(acceid) from accession_listitem where listid = ?1")
int sizeOf(AccessionList list);
@Query(nativeQuery=true, value="select count(distinct acceid) from accelistitems where listid in (?1)")
@Query(nativeQuery=true, value="select count(distinct acceid) from accession_listitem where listid in (?1)")
int distinctCount(List<AccessionList> accessionLists);
@Query("from AccessionList al where al.shared=1 order by al.title asc")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment