Commit a7b3858e authored by Matija Obreza's avatar Matija Obreza
Browse files

Query fix for findOne(instCode, acceNumb, genus)

parent b9a4073d
......@@ -107,7 +107,7 @@ public interface AccessionRepository extends JpaRepository<Accession, Long> {
Accession findByInstituteCodeAndAccessionName(String instCode, String accessionName);
@Query("select a from Accession a inner join a.taxonomy t where a.instituteCode=:instCode and a.accessionName=:acceNumb and t.genus=:genus")
@Query("select a from Accession a where a.institute.code=:instCode and a.accessionName=:acceNumb and a.taxonomy.genus=:genus")
Accession findOne(@Param("instCode") String holdingInstitute, @Param("acceNumb") String accessionName, @Param("genus") String genus);
@Query("select count(a.id) from Accession a where a.id in ( ?1 ) and a.availability = true")
......
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