[jboss-user] [EJB 3.0] - Re: ManyToOne gives EntityNotFoundException
TPBen
do-not-reply at jboss.com
Fri May 18 10:25:20 EDT 2007
There is a solution, but it is part of hibernate NOT the EJB3 specification!
I know your pain about working with hideous legacy databases!
If you include the hibernate-annotations.jar from the jboss lib directory you can use the following annotation on your accessor method: -
@NotFound(action=NotFoundAction.IGNORE)
Entities with invalid foreign keys will be ignored by the EntityManager.
There is a portability cost, but it might be worth it!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046836#4046836
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046836
More information about the jboss-user
mailing list