-->
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.  [ 3 posts ] 
Author Message
 Post subject: Does hibernate support this?
PostPosted: Mon Apr 19, 2004 4:21 am 
Senior
Senior

Joined: Sun Mar 14, 2004 10:16 am
Posts: 129
Location: Ankara
I wonder if hibernate supports such an illustriation;

<class name = "Test" table = "TestA,TestB,TestC" >

<id name = "TestA.ID" .....
</id>

<property name= "name" column = "TestB.Name"/>
...
...
...
</class>

I mean; When I write multiple table names, does hibernate join them for serve by default (I know it is not easy-)))) or no such methodology was designed in hibernate? If not, how can I put a join expression to get a property:

<class name = "Test" table = "TestA" >
.....
.....
<property name= "name" formula= "Select TestA.Name from TestA,TestB,TestC where TestA.ID =TestB.TestA_ID and TestC.ID = TestC.TestB_ID") />


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 19, 2004 4:46 am 
Senior
Senior

Joined: Sun Jan 04, 2004 2:46 pm
Posts: 147
I believe this feature will be in 2.2


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 19, 2004 6:40 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
<property name= "name" formula= "Select TestA.Name from TestA,TestB,TestC where TestA.ID =TestB.TestA_ID and TestC.ID = TestC.TestB_ID") />

may be ok also with hibernate 2.1.2 but you must use aliases for your table.
Note that modification to this property will not be persisted


Anthony


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.