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, I have a table - Calendar - that is soft-deleted. I have one table that is a child table - CalendarException - of Calendar. I have another table - Workflow - that is also child table of Calendar. When doing a Remove() on a Calendar object, I want to: a) delete all rows in CalendarException that have CalendarID set to the one being removed. b) throw exception if any row in Workflow has CalendarID set to the one being removed. So, I have:
However, when I call UOW.Remove(calendar) I get the exception: "The NoAction Removal Behavior is not compatible with Remove by Query or Soft Deleted entities." Is there some way to achieve what I want? Thanks - Imtiaz |
|
|
In short, no, not automatically. We have deliberately restricted this scenario so if you want to handle it you will need to add an equivalent check into your application to compensate. Out of interest - is CalendarException also being soft deleted?
|
|
|
Hi Jeremy, No, CalendarException is not being soft-deleted. In any case, I have implemented a custom delete strategy and its all working well. Thanks - Imtiaz |
|