-->
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: indexed list collection autogenerating the index
PostPosted: Mon Oct 23, 2006 4:09 pm 
Newbie

Joined: Mon Oct 23, 2006 3:51 pm
Posts: 1
Hi. I'm creating a catalog navigation servlet using hibernate for persistent layer. I have basically two tables, catalog and category ones. They are references by a foregin key, each catalog contains some categories. This foreign key is on category table, referencing one catalog.

In the catalog mapping xml file, i have mapped the many-to-one relationship using a <list>, with a <index column = "id_catalog">.

When i load persitent objects, for each catalog, categories appears in order using index as reference.

But what i want is on creating a persitent object, this field should be autogenerated, in order to not to find max value of index and putting it on the object manually.

Only writting <index column> on list mapped xml file it not generate the index automatically, so i would want to know what to write in the xml so this process can be user transparent.

Thanks and sorry for my engilsh :)


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.