[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: @OneToOne and SELECT (1+n) problem

mars1412 do-not-reply at jboss.com
Thu Apr 3 04:56:50 EDT 2008


AFAIK all your fancy annotation stuff is useless when you explicitly code your query.

if you would just use em.find(Person.class, Id) your annotation setting should work

but if you hardcode your query, you must explicitly use a fetch statement like:

from Person p inner join fetch p.metadata

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

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



More information about the jboss-user mailing list