-->
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: hibernate3 can't support one feature .when support?
PostPosted: Tue Jan 18, 2005 3:04 am 
Newbie

Joined: Tue Jan 18, 2005 2:48 am
Posts: 3
Hibernate version:

3.1beta1 version

Mapping documents:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<class name="Table_1_1_3_2_dynamic" table="Table_1_1_3_2_1" lazy="true">
<composite-id name="id"
class="Table_1_1_3_2_dynamic$Id">
<key-property name="col_1_1_3_1" />
<key-property name="it_state"/>
</composite-id>

<property name="col_1_1_3_13" column="col_1_1_3_13" not-null="true"/>
<property name="col_1_1_3_14" column="col_1_1_3_14" not-null="true"/>

<join table="Table_1_1_3_2_2">
<key column="col_1_1_3_1"/>
<key column="it_state"/>
<property name="col_1_1_3_66" column="col_1_1_3_66"/>
<property name="col_1_1_3_67" column="col_1_1_3_67"/>
</join>
<join table="Table_1_1_3_2_3">
<key column="col_1_1_3_1"/>
<key column="it_state"/>
<property name="col_1_1_3_115" column="col_1_1_3_115"/>
<property name="col_1_1_3_116" column="col_1_1_3_116"/>
</join>
</class>
</hibernate-mapping>

Sir ,I find hibernate can't support comsiteid for one class mapping some table . i have some table

Table_1_1_3_2_1 [col_1_1_3_1,it_state,col_1_1_3_13]
Table_1_1_3_2_2[col_1_1_3_1,it_state,col_1_1_3_66]
Table_1_1_3_2_3[col_1_1_3_1,it_state,col_1_1_3_116]

col_1_1_3_1,it_state is primary key !

now i want one class mapping some table

example SQL: select a.col_1_1_3_1,a.it_state ,a.col_1_1_3_13,b.col_1_1_3_66,c.col_1_1_3_116 from Table_1_1_3_2_1 a inner join Table_1_1_3_2_2 b a.col_1_1_3_1=b.col_1_1_3_1 and a.it_state =b.it_state inner join Table_1_1_3_2_3 c a.col_1_1_3_1=c.col_1_1_3_1 and a.it_state =c.it_state

but 3.0 support it !this is a commonly apply for database operation,so do you intend slove this problem?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 18, 2005 3:05 am 
Newbie

Joined: Tue Jan 18, 2005 2:48 am
Posts: 3
<join table="Table_1_1_3_2_2">
<key column="col_1_1_3_1"/>
<key column="it_state"/>
<property name="col_1_1_3_66" column="col_1_1_3_66"/>
<property name="col_1_1_3_67" column="col_1_1_3_67"/>
</join>


above <join ../> only support one <key/> why not support some <key/> this is important for somebody!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 18, 2005 3:29 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
have you read the docs and DTD ?

<key> can contain multiple columns - isn't that what you want ?

_________________
Max
Don't forget to rate


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.