-->
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: CaveatEmptor Native Question
PostPosted: Wed Jul 25, 2007 6:42 am 
Beginner
Beginner

Joined: Wed Jul 25, 2007 6:32 am
Posts: 22
I have studied the CaveatEmptor Native example and most things are clear to me.

But I don't understand one thing.

In the Category.hbm.xml, the list with items has a <list-index column="DISPLAY_POSITION"/>, that matches the column DISPLAY_POSITION in the CATEGORY_ITEM table.

I think this orders the items in the List in the Category Object.

But where is this property set in the Java Object??, because the Item Object has no ordering property (displayPosition).

When I add a new Item in a Category, what sets the DISPLAY_POSITION in the CATEGORY_ITEM table??

I want the possibility to change the order of my items. Therefore the Items need some kind of order property.

How can I achieve this?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 25, 2007 7:00 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
The <list-index> is the index (position of each element) of a persistent java.util.List. It is not a separate property.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject: list-index
PostPosted: Wed Jul 25, 2007 7:31 am 
Beginner
Beginner

Joined: Wed Jul 25, 2007 6:32 am
Posts: 22
But how is this value filled in the table?

For example when I add a new item to a category, how does the display_position in the CATEGORY_ITEM table get filled?


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.