I'd say you have a serious problem there. If you use @ManyToOne, the referenced 
entity must exist. The only other option is to specify that field as a long and 
retrieve the referenced entity by means of a separate query. Be warned though, 
getSingleResult() from a Query throws an exception (NoResultException if memory 
serves) instead of returning null if it can't find the requested entity.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997533
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to