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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...