Regular |
|
Joined: Fri Oct 08, 2004 4:11 am Posts: 78 Location: Nottingham, England
|
I am developing a web application using hibernate and wondered if using a uniquely generated id like a session variable and then assigning that as my key id would be an issue? That way I could add and delete child elements to a parent before I saved the parent, right??? I want to be able to do:
Parent p = new Parent();
Child c = new Child();
p.setChildren(new HashSet());
p.getChildren().add(c);
c.setParent(p);
without having to issue a session.saveorupdate() first before i can add another child item to the parent. Also knowing the key id of the child item will also allow to delete the item if i wish to. Am I way off the mark here???
regards
Andrew
|
|