Page 1 of 1

Updating a relation?

Posted: Sat 26 Sep 2009 21:18
by drichter
Hi,

iam trying to update a FK-relation like below...

If iam REMOVING the "SubmitChanges()" in the line that i've marked below, the set of "a.Calculated_bid_price" throws an error during the "SubmitChanges() at the bottom"...

the field "Calculated_bid_price" is not related to the "new_relation_entity"..


I really don't understand why this happens? Can you explain the logic here?

Code: Select all

            Entity_Table_XXX a = GetTable();
            Entitiy_YYY new_relation_entity = GetNewRealtionEntity();

            a.Relation_Entity= new_relation_entity;
            db.SubmitChanges(); // If i remove this line, the error with "calculated_bid_price" occurs

            a.Calculated_bid_price = a.Calculated_bid_price + 1;
            db.SubmitChanges();

Posted: Mon 28 Sep 2009 12:55
by AndreyR
Thank you for the report, we have found the problem.
I will let you know about the results of our investigation.

Posted: Tue 06 Oct 2009 13:13
by AndreyR
We have fixed the problem. The fix will be uincluded in the nearest build.