Using JDeveloper and ADF 12.1.2.0.
I have a master-detail relationship where there can be 200,000 or more details to a single master. In the database, I created the FK constraint with the CASCADE DELETE option. In the ADF BC, I set the Association Object between the two EOs with Composition Association checked, Optimize for Database Cascade Delete checked, and Implement Cascade Delete is automatically checked.
The cascade delete works fine - when the user deletes a master record, its details are also deleted. At least it works as long as the particular master only has say, 50,000 details.
But the more details there are, the more memory is used on the server, when a master record is deleted. With the larger detail sets (say, more than 50,000 details), this can cause an "out of memory" error, and then the server (WebLogic 12.1.2.0) crashes.
I'm not sure I understand why it is behaving as if it is bringing ALL the detail records into memory to do the delete, when the actual delete activity should be all database-side. Anything I can do about this? Or do we just have to give the server lots of memory and hope for the best?