-->
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: problem with list (in the list index). Possible enhancement
PostPosted: Thu Nov 17, 2005 7:35 pm 
Newbie

Joined: Wed Oct 12, 2005 7:06 pm
Posts: 10
Hi,

When I create List collection in hibernate, I want to use the oracle ROWNUM as the index column. But if i give the column name as ROWNUM, I get a database exception as the ROWNUM is not a physical column (as hibernate appends the columns names with table alias ).

So I made a change to the DTD as below

<!ELEMENT list-index ((column|formula)?)>
<!ATTLIST list-index column CDATA #IMPLIED>
<!ATTLIST list-index formula CDATA #IMPLIED>
<!ATTLIST list-index base CDATA "0">


and used 'formula' instead of column and it works perfectly fine. Is there a better workaround

My mapping information is below

<list name="currentDetailDVOs" table="HR_SCENARIO_INFO" inverse="true" lazy="false" cascade="merge">
<key column="CLASS_INFO_ID"/>
<list-index formula="ROWNUM" base="1"/>
<one-to-many class="com.classified.dvo.ModuleDetailDVO" />
</list>

Lakshmanan


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.