-->
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: Still problem with duplicated rows in SQL with 2.1.7!!!
PostPosted: Wed Nov 24, 2004 9:46 am 
Newbie

Joined: Thu Sep 30, 2004 3:19 pm
Posts: 3
I have problem with duplicated rows in Hibernate generated SQL for one-to-many relation, though other similar one-to-many works! Please help!!!

The generated SQL:
select
details0_.DetailsData_FundCountryID as DetailsD1___,
details0_.DetailsData_FundID as DetailsD2___,
details0_.DetailsData_FieldID as DetailsD3___,
details0_.DetailsData_FundCountryID as DetailsD1_0_,
details0_.DetailsData_FundID as DetailsD2_0_,
details0_.DetailsData_FieldID as DetailsD3_0_,
details0_.DetailsData_Data as DetailsD4_0_
from
MMDetailsData details0_
where details0_.DetailsData_FundCountryID=? and details0_.DetailsData_FundID=?

Hibernate version:
2.1.7

Mapping documents:
In Fund.xml:

<set name="Details" lazy="true" cascade="none">
<key>
<column name="DetailsData_FundCountryID"/>
<column name="DetailsData_FundID"/>
</key>
<one-to-many class="my.test.DetailsData"/>
</set>

The whole DetailsData.xml:

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

<hibernate-mapping package="my.test">
<class
name="DetailsData"
table="MMDetailsData"
>
<composite-id name="id" class="DetailsDataPK">
<key-property
name="DetailsdataFundcountryid"
column="DetailsData_FundCountryID"
type="string"
length="3"
/>
<key-property
name="DetailsdataFundid"
column="DetailsData_FundID"
type="integer"
/>
<key-property
name="DetailsdataFieldid"
column="DetailsData_FieldID"
type="integer"
/>
</composite-id>

<property
name="DetailsdataData"
column="DetailsData_Data"
type="string"
not-null="false"
/>
</class>
</hibernate-mapping>

Name and version of the database you are using:
Sybase ASE 12.5.


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.