03-07-2014 01:10 PM
I've added a field from an extension entity (extending Opportunity) to my Add/Edit and Detail views.
When Adding a new Opportunity, the Extension entity is created and the value is correctly saved.
When displaying the Opportunity details page, the Extension entity property I query for (by adding it to querySelect) displays properly.
When I go to Edit things fall apart. If the field changes, I get an NHibernate NonUniqueObjectException thrown from the Extension entity. The edit view seems to behave as if I'm trying to add a new Extension entity (like adding from a new Opportunity), instead of updating the existing one that it was bound to in the first place.
and it is coming back FALSE, which is what I expected from navigating to Edit mode. But is there a specific way to tell the view that I am trying to update the Extension entity instead of attempting to add a new one? If I omit the Extension entity fields and save the Opportunity, it updates successfully.
03-07-2014 07:39 PM
If this is a 1:1 extension.. why bother? Since Scorpion (vers 7.0 SLX) 99% of us just extend the base table(s).. SO much easier.
03-13-2014 08:50 AM
What happens in the SLX profiler? How about fiddler? Seems like setting the property via EntityExtension.Fieldname should not be doing an insert at all. Maybe if we could see the layout code for the field.
Did you redeploy SData with the entity changes? I forgot to do this and it really screwed me up for a while.