-->
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.  [ 2 posts ] 
Author Message
 Post subject: Why is class="assigned" bad to use?
PostPosted: Sun Oct 17, 2004 4:36 am 
Regular
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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 24, 2004 7:29 pm 
Regular
Regular

Joined: Sat Aug 28, 2004 4:15 pm
Posts: 61
I too am looking for a discussion on this topic.

I think I realize why we want to let hibernate manage the identifiers. But, their availability prior to save() in a webapp is quite useful.

I look forward to discussion of strategies in this area.



Joe

_________________
Joe W


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.