From: <leg...@at...> - 2003-07-09 00:11:48
|
Message: The following issue has been resolved as REJECTED. Resolver: Gavin King Date: Tue, 8 Jul 2003 7:10 PM I suppose that the reason for this is that Hibernate is calling setA() while the collection is being initialized. You just need to make a different setter that your app will use, from the one that Hibernate uses. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-149 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-149 Summary: Using Sets Before Fully Initialized causes NullPointerException Type: Bug Status: Resolved Priority: Minor Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.0.1 Assignee: Gavin King Reporter: Christian Bauer Created: Tue, 8 Jul 2003 3:30 PM Updated: Tue, 8 Jul 2003 7:10 PM Environment: JDK 1.4.1 Description: one-to-man from A -> B A.addB(B foo) { if(null != foo) { set_of_bs.add(foo); foo.setA(this); } } B.setA(A bar) { a = bar; if(null != a && !a.getBs().contains(this)) { a.addB(b); } } I'm not sure why but the tempList in the net.sf.hibernate.collection.Set ends up being null at some point during initialization. endRead is being called twice, the first time its ok the second time it throws a NullPointerException. I'm not sure this is a bug with Hibernate or if I should not be maintaining the backwards pointers in this way. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |