-->
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.  [ 2 posts ] 
Author Message
 Post subject: HQL Mapping
PostPosted: Fri Mar 23, 2007 11:42 am 
Newbie

Joined: Thu Nov 09, 2006 1:00 pm
Posts: 5
Hi,

I need help on a basic question. I have 2 tables and i m fetching records by joing the tables using HQL. I have set the relationship in the mapping files. My question is if there is no physical relationship set(foreign key is not set) in the oracle tables, will my HQL work??
Please clarify.

Thanks,
PK


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 23, 2007 12:55 pm 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
Yes. If you mapped the relationship in your mapping (hbm, annotations, jpa, or else).

If it's not mapped, then just use a theta-style join (say where local_id=foreign_id).

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


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

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.