mirror of
https://github.com/Athou/commafeed.git
synced 2026-11-20 10:43:37 +00:00
try to fix "Illegal attempt to associate a ManagedEntity with two open persistence contexts"
This commit is contained in:
@@ -43,6 +43,14 @@ public abstract class GenericDAO<T extends AbstractModel> {
|
||||
models.forEach(this::saveOrUpdate);
|
||||
}
|
||||
|
||||
public void persist(T model) {
|
||||
entityManager.persist(model);
|
||||
}
|
||||
|
||||
public T merge(T model) {
|
||||
return entityManager.merge(model);
|
||||
}
|
||||
|
||||
public T findById(Long id) {
|
||||
return entityManager.find(entityClass, id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user