Hi, 

This is also at

http://opensource.atlassian.com/projects/hibernate/browse/EJB-46

But I'm experiencing the same thing in 4.0.3SP1 and 4.0.4CR2

***************************

Hibernate does property validation such as not null checking before it does the 
EJB3 callback to prepersist/preupdate. I'm not sure if there's a good reason 
for this, but I think it would be particularly convenient if this behavior was 
reversed. IMHO it seems to better fit the semantics of the PRE callbacks, and 
it would allow callbacks to make modifications to the objects before they are 
persisted or updated -- modifications that might in turn effect the property 
validation Hibernate is doing.

The "audit" example in the entity manager documentation does make changes to 
the object. What if these changes had effected the property validation done 
before the callback occurred? What if the object was in an invalid state before 
the callback, but a valid state after the callback? The latter case is what I 
think would be conveniently handled if hibernate did its property validation 
after prepersist/preupdate.

Just two cents worth, obviously there are workarounds. This EJB3 stuff is 
looking great.

Ryan

P.S. This might also allow those of us who assign our own IDs to objects to do 
so automatically within a callback.

****************************

Any ideas or should I just post it to JIRA

Thanks, Grant

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3942780#3942780

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3942780


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to