Association cardinalities ignored in Hibernate cartridge
--------------------------------------------------------
Key: HIB-45
URL: http://team.andromda.org:8080/jira/browse/HIB-45
Project: Hibernate Cartridge
Type: Bug
Environment: Binary release, 3.0-RC1-SNAPSHOT, dated 30. Jan 2005
Reporter: David R. Allen
Assigned to: Martin West
There are some problems with the not-null attribute in *.hbm.xml files.
1. If association is many-to-one, "inheritance" strategy in use, and
cardinality is actually 0..1 on the one side, the many side declares the
foreign key as not-null="true".
2. If association is many-to-one, no inheritance, and cardinality is actually
1 on the one side, the foreign key does not have a not-null="true" setting.
Other conditions workout OK, but I believe just due to the constant behavior.
I suspect that cardinalities are never payed any attention, and that the
following rules are in effect for association foreign keys:
1. If any inheritance is used, subclass or inheritance strategies, all
associations become not-null="true".
2. If no class hierarchy exists, just a plain single class, all associations
do not have any not-null attribute specified regardless of whether the model
requires it or not.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://team.andromda.org:8080/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel