-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: @PreXXX annotations and @Embeddable @MappedSuperclass
PostPosted: Tue Feb 01, 2011 7:21 am 
Newbie

Joined: Thu Jan 24, 2008 4:45 am
Posts: 13
Hello Hibernate users,

All @PreXXX annotations have following javadoc in common

"Is used to specify callback methods for the corresponding lifecycle event. This annotation may be applied to methods of an entity class, a mapped superclass, or a callback listener class."

An @Entity E has @Embedded an @Embeddable M, which extends a @MappedSuperclass S. Methods on S annotated with @PrePersist or @PreUpdate annotation do not ever get called. Since S is @MappedSuperclass, either javadoc is incomplete and thus misleading, or there is a bug in Hibernate 3.6.0 related to this. If I move @PrePersist/@PreUpdate method(s) to @Entity, they get called.

Regards,
Stevo.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.