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, Using latest nightly build. I have a situation where calling UOW.Remove(Customer) causes a database error because I also have a OrderSummary Entity (backed by a database view) in the model that references Customer, and Lightspeed is issuing an update on the (nonupdateable) OrderSummary view. I notice that a few months back the RemovalBehaviour functionality for value NoActionNoCheck was expanded to include one-way relationships (see http://www.mindscapehq.com/forums/thread/283535). Is there any possibility that this could be expanded to standard one-to-many relationships. This would allow these view-backed entities to be excluded from the cascade delete behaviour. Alternatively (although probably not so good as its possible some people are using updateable views) Lightspeed could automatically exclude the cascade delete on related entities that have their AccessMethod set to view. I think option 1 would be more flexible - what is the justification for not supporting NoActionNoCheck on one-to-many relationships currently, and can it be changed? Thanks, Greg |
|
|
Any comments guys? |
|
|
Hi Greg, Ill take a look at whats involved. I dont think there was any particular reason why it wasn't applied other than it wasn't specifically related to the issue at hand. Ill let you know if I discover a blocker though otherwise Ill update this when Ive had a chance to look at adding this in for a nightly.
|
|
|
Hi Jeremy, I don't suppose you've had a chance to take another look at this? It's turning into a bit of a blocker for me... Thanks, Greg |
|
|
No, unfortunately have not had a chance to look into this one yet. Ill try and have a look into this during this week for you though.
|
|
|
Hi Greg, I have updated this so you can now apply this behavior more generally on ToMany's. As with before the responsibility shifts over to you to tidy up any FK's as needed to handle the actual entity deletion :) This will be updated in tonights nightly build.
|
|