From: <leg...@at...> - 2003-08-16 06:15:11
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-267 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-267 Summary: ObjectNotFoundException is thrown instead of setting the object to null Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Assignee: Reporter: abe zafar Created: Sat, 16 Aug 2003 1:12 AM Updated: Sat, 16 Aug 2003 1:12 AM Environment: JDK1.4 Description: Class A is associated with class B by a many-to-one relationship. Class B has a composite primary key which is composed of two columns, these two columns are used as foreign keys in class A. Hiberate creates the composite key for class B from the values of these two columns, but when one of the column's value is null the composite key created will not refer to a row in table B. As a result Hibernate throws an ObjectNotFoundException. I would have expected Hibernate to simply give a value of null for that instance of B instead of throwing the exception. In a database schema where the foreign key constraints are enforced this would not be a problem, but when that constraint is not present it is definitely a problem. Is there a workaround to this issue? --------------------------------------------------------------------- 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 |