[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2280) Not-Null Constraint-Violation with unidirectional one-to-many mapping

Robert Herschke (JIRA) noreply at atlassian.com
Mon Dec 4 03:26:04 EST 2006


Not-Null Constraint-Violation with unidirectional one-to-many mapping
---------------------------------------------------------------------

         Key: HHH-2280
         URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2280
     Project: Hibernate3
        Type: Bug

    Versions: 3.2.0.cr4    
 Environment: Hibernate 3.2.0.cr4, Oracle 10XE
    Reporter: Robert Herschke
    Priority: Blocker
 Attachments: one-to-many-test.zip

In some cases it is neccessary to have an unidirectional one-to-many mapping, but not using Join-Tables due to a legacy database system.

So it must be possible, to have a one-to-many mapping just via a foreign-key-mapping. The Child-Object must not know the Parent-Object in this case.
It must also be possible, to pay respect to a NOT-NULL-Constraint at this foreign-key due to restrictions on legacy database systems.

Hibernate doesn't support this, but throw a NOT-NULL-Constraint Violation Exception. The documentation says, "this is unusual" - to which I want to dissent.

See the attached testcase for details, that is adopted from your "one-to-many" testcase found in the 3.2.0 sources.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list