summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/nu/xss/jpa/dao/GenericJpaDao.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/nu/xss/jpa/dao/GenericJpaDao.java b/src/main/java/nu/xss/jpa/dao/GenericJpaDao.java
index c5c2d91..e282911 100644
--- a/src/main/java/nu/xss/jpa/dao/GenericJpaDao.java
+++ b/src/main/java/nu/xss/jpa/dao/GenericJpaDao.java
@@ -27,11 +27,13 @@ public abstract class GenericJpaDao<E,K> implements Dao<E,K>, Serializable {
}
public void save(E entity) {
- entityManager.merge(entity);
+ entityManager.persist(entity);
+ logger.info("Saved entity: {}.", entity.toString());
}
public void delete(E entity) {
entityManager.remove(entity);
+ logger.info("Deleted entity: {}.", entity.toString());
}
public E findById(K id) {