[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - join without reference
livnats
do-not-reply at jboss.com
Thu Jul 9 07:46:49 EDT 2009
Hi,
Is there a way to map a class without having a reference to the class, instead telling hibernate to just use a referenceId?
An example for the question:
public class A{
long id;
long referenceId;
}
public class B{
long id;
String name;
}
let's say the referenceId in A has a B's id as value.
Can i query for all A's that have referenceId to B who's name is "name".
I know it is not a good practice, but is there a way to do that?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4242608#4242608
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4242608
More information about the jboss-user
mailing list