Chris Lewington wrote:
Hi all,
Does anyone know roughly what the biggest Collection size is that an object can contain when doing an update? Around 1000 seems OK, but 20,000 throws an OutOfMemoryError. Since OJB does 'delete + insert' for update, for an m:n relation with 20,000 objects you get 20,000 deletes, then 20,000+ array copies then 20,000 inserts if you don't touch anything in the Collection - thus changing eg only a String in the top object results in this behaviour when all you really wanted was to change a single column value in one table.
This is a result of the auto-update setting handling. There are two big threads on the dev-list discuss this behaviour.
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&msgNo=6531 http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&msgNo=6538
Currently I refactoring the auto-xxx handling in OJB. We will introduce additional values for auto-update/delete. For more detailed info, please read the " auto-XXX setting (PART II)" thread on dev-list.
regards, Armin
This is not an artifical situation - we have this in our project. We cannot update a String in our top level object simply because it is linked to 20,000 others, even though we are not touching those other objects (or the relation between the two).
Cheers,
Chris
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
