I\'m using Play! 1.2.4 and PostgreSQL 9.1. I created a table with a created_at
column, of type: timestamp without time zone
. It has a default val
You need to detach and fetch entity from db. Insert statement does not contain created_at field so it's not managed by JPA at the time of creation. In repository it would look like this:
@Transactional
public Log save(Log log) {
this.em.persist(log);
this.em.detach(log);
return this.em.find(Log.class, log.getId());
}