Fix crashes in the text matching job #23
@ -1,6 +1,7 @@
|
|||||||
package se.su.dsv.scipro.plagiarism.urkund;
|
package se.su.dsv.scipro.plagiarism.urkund;
|
||||||
|
|
||||||
import com.querydsl.jpa.impl.JPAQuery;
|
import com.querydsl.jpa.impl.JPAQuery;
|
||||||
|
import jakarta.transaction.Transactional;
|
||||||
import se.su.dsv.scipro.file.FileDescription;
|
import se.su.dsv.scipro.file.FileDescription;
|
||||||
|
|
||||||
import jakarta.inject.Inject;
|
import jakarta.inject.Inject;
|
||||||
@ -27,6 +28,7 @@ public class UrkundSubmissionRepositoryImpl implements UrkundSubmissionRepositor
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public UrkundSubmission save(final UrkundSubmission submission) {
|
public UrkundSubmission save(final UrkundSubmission submission) {
|
||||||
final EntityManager em = entityManagerProvider.get();
|
final EntityManager em = entityManagerProvider.get();
|
||||||
if (em.contains(submission)) {
|
if (em.contains(submission)) {
|
||||||
@ -49,6 +51,7 @@ public class UrkundSubmissionRepositoryImpl implements UrkundSubmissionRepositor
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public void delete(final UrkundSubmission urkundSubmission) {
|
public void delete(final UrkundSubmission urkundSubmission) {
|
||||||
entityManagerProvider.get().remove(urkundSubmission);
|
entityManagerProvider.get().remove(urkundSubmission);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user