hibernate.hbm.xml.vm does not set cascade for $sourceEnd.one2OnePrimary
correctly
---------------------------------------------------------------------------------
Key: SPRING-8
URL: http://team.andromda.org:8080/jira/browse/SPRING-8
Project: Spring Cartridge
Type: Bug
Environment: hibernate.hbm.xml.vm
Reporter: greg johnson
Assigned to: Chad Brandon
Symtom:
Cascaded updates don't work for children if "hibernateDefaultCascade" is set to
"save-update"
Problem:
i think there is a problem with hibernate.hbm.xml.vm at
"$sourceEnd.one2OnePrimary".
if "$otherEnd.child = true",then cascade is set unconditionally to "delete",
which is not correct if "hibernateDefaultCascade" is set to "save-update"
instead of the default "none".
Solution:
at "$sourceEnd.one2OnePrimary" and if "$otherEnd.child = true" then:
if "hibernateDefaultCascade" is set to "save-update"
set "cascade=all"
else
set "cascade="delete"
really, there should be another property, eg "hibernateDefaultCascadeDelete",
to allow a choice of "all" or "all-delete-orphan" for the above case.
regards,
greg johnson
--
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:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Andromda-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-devel