Commit 240da443 authored by Matija Obreza's avatar Matija Obreza
Browse files

Use inner join instead of cross join for #listMetadataAccessions

parent 26bcaffc
......@@ -35,7 +35,7 @@ public interface AccessionTraitRepository extends JpaRepository<AccessionTrait,
@Query("select distinct at.methodId from AccessionTrait at where at.accession = ?1")
List<Long> listMethodIds(Accession accession);
@Query("select distinct at.accession from AccessionTrait at where at.metadataId = ?1")
@Query("select distinct a from AccessionTrait at inner join at.accession a where at.metadataId = ?1")
Page<Accession> listMetadataAccessions(long metadataId, Pageable pageable);
List<AccessionTrait> findByMetadataIdAndAccession(Long id, Accession accession);
Supports Markdown
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