This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, This is using LightSpeed 5.0 (it was not an issue in 4.0). It happens when LightSpeed performs a cascading delete across at least two one-to-many associations, and the lowest level entity type is a base class of another entity type using class table inheritance. Deleting a top level entity will delete all entities at the lowest level, not just children of the top level entity. I've attached an example project to demonstrate. The model contains entities:
If I delete a country, then all Landmarks get deleted, not just those belonging to the country being deleted. It seems to be because of this LightSpeed-generated SQL:
If you replace the Is this a known issue, and are you aware of any workarounds? |
|
|
Thanks for reporting this. Yes this behaviour is certainly not right, I have tracked down the issue here and have added in a fix. This will be available in the next nightly build for both 4.0 and 5.0.
|
|
|
Thanks, Jeremy. That resolved the issue. |
|