These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Join non-mapped entities
PostPosted: Wed Feb 04, 2009 12:19 pm 
Newbie

Joined: Sun Jan 25, 2009 5:29 pm
Posts: 1
Hi,
Is it possible to join two entities without mapping between them by criteria api?

I have something like this:

class Entity1 {
public int ID{get;set;}
public int SomeID {get;set;} //foreign key
}

class Entity2 {
public int ID{get;set;}
}

class Entity3 {
public int ID{get;set;}
}
...
class EntityX {
public int ID{get;set;}
}

Sometimes I want to query joining Entity1.SomeID with Entity2.ID but
in other times I want to join Entity1.SomeID with EntityX.ID.

Any ideas? (No HQL, only Criteria API)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.