Beginner |
 |
Joined: Wed Mar 10, 2004 9:51 am Posts: 42 Location: France
|
Hibernate version:2.16
Hi there,
I've got myself a parent object called Property which contains
a List of PropertyImages.
Everything works a treat and is working fine.
Now the thing is this. I want my users to be able to move PropertyImages
up and down the index.
If an image is at 0 it will be the first image displayed on the page.
If it is at 1 it will be second etc etc.
Now the dirty way to do this would be to just go in there and
directly manipulate the indexes.
Ie increment one objects index and decrement the others.
Is this a very bad way to do this or is there a more elegant fashion ?
Even more so, will I have to delete the List and recreate it from
scratch if I want to do this ?
I could just use a set and handle it all myself but I would like to
use the hibernate features if possible.
--b[/b]
_________________ Pesimist: The glass is half empty
Optimist: The glass is half full
Engineer:The glass should be half that size
|
|