Commit 4d644e96 authored by Matija Obreza's avatar Matija Obreza
Browse files

Delete accessionRemarks

parent 8f33f6d2
......@@ -34,7 +34,7 @@ public interface AccessionRemarkRepository extends JpaRepository<AccessionRemark
List<AccessionRemark> findByAccession(Accession accession);
@Modifying
@Query("delete from AccessionRemark ar where ar.accession in (from Accession a where a.id in ( :ids ))")
@Query("delete from AccessionRemark ar where ar.accession.id in (:ids)")
void deleteForAccessions(@Param("ids") Collection<Long> accessionIds);
@Query("from AccessionRemark ar where ar.accession.id in ?1")
......
......@@ -697,6 +697,7 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
accessionExchangeRepository.deleteForAccessions(accessionIds);
accessionGeoRepository.deleteForAccessions(accessionIds);
accessionNamesRepository.deleteForAccessions(accessionIds);
accessionRemarkRepository.deleteForAccessions(accessionIds);
svalbardRepository.deleteForAccessions(accessionIds);
accessionRepository.delete(toDelete);
......
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