-
1. Re: cascade-delete performing update instead of delete
chadlavy Mar 24, 2004 2:39 PM (in response to chadlavy)OK... after searching the web for a while I found a snippit about sync-on-commit-only. By flipping this value to true (<sync-on-commit-only>true</sync-on-commit-only>), the deletes are happening without the update and everything seems to be working great. I don't know the impact of this change, however. I own the JBoss documentation and I can't find anything in there about it. The description in the DTD seems a little vague... Does anyone know if I am shooting myself in the foot with this change?
Thanks for your help,
Chad -
2. Re: cascade-delete performing update instead of delete
mkyaj Mar 25, 2004 10:44 AM (in response to chadlavy)Hi Chad,
When i browsed the web. I got the following information.
"Use <sync-on-commit-only>true</sync-on-commit-only>: What this switch does is to only do SQL UPDATEs at commit time. By default, JBoss will do updates of any dirty entities whenever a finder is called. With sync-on-commit-only set to true, however, this synchronization will still happen when deletes/removes are done to ensure that cascade deletes work correctly."
But when i changed this flag to "true", i got some exceptions like "cannot remove PK" like that. So i had to change it back to the default value "false".
Murali. -
3. Re: cascade-delete performing update instead of delete
chadlavy Mar 25, 2004 11:16 AM (in response to chadlavy)Thanks for the info mkyaj. Do you (or any other reader) have any ideas as to what the downside of only doing the updates at commit time? Will it slow things down or be less optimal? Is it dangerous from a data integrity standpoint?
-
4. Re: cascade-delete performing update instead of delete
mkyaj Mar 25, 2004 4:15 PM (in response to chadlavy)Hi,
Definitely it wont slow down things as we are reduding the number of database transactions. If it works as per the documentation, then i think there shouldn't be any problems as we are not committing while calling finder methods(reading the data).
I too want to know more about this option.
Murali. -
5. Re: cascade-delete performing update instead of delete
aloubyansky Mar 29, 2004 5:16 AM (in response to chadlavy)Set it up for batch-cascade-delete.
http://sourceforge.net/tracker/?func=detail&aid=838522&group_id=22866&atid=381174