Hi
Tried to find clues in existing topics but found none.
I'm trying to use a simple callback like this:
Code:
@Entity
public class TypeA{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
protected Integer id;
@Column
protected String str;
@PrePersist
protected void myPrePersistMethod(){
System.err.println("<<<<<<<<<<@@");
}
}
I then call a code like this:
Code:
HibernateTemplate ht = (HibernateTemplate) applicationContext.getBean("hibernateTemplate");
dnl.pg.hibernate.TypeA aa = new dnl.pg.hibernate.TypeA();
aa.str = "st";
ht.save(aa);
And my @PrePersist is never called.
I also tried it with an @EntityListeners variation ... didn't work as well.
As mentioned in one of the unconcluded topics (
http://forum.hibernate.org/viewtopic.php?t=987782&highlight=prepersist) This is a JPA feature. Is it possible that it is not implemented?
Thanks for any clue ...