Moving node adding link to that node save error

Hello all,



When I move a node and create a link to that node, when I click save to save the diagram info to the database, I get an error. Can someone please help explain/solve?



-Kind Regards

-Chau Nguyen

Could you provide more information about the error, please?

Also, you might want to look at the Trace listener output, to see if there are any error messages about muffled exceptions. That is common, for example, with data binding errors.

Hello Walter, thanks for the response.



After looking more into the error, it appears it might be error related to database integrity violations: System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint ‘PK_Table_1’. Cannot insert duplicate key in object ‘Table’



We are using ADO Entity Framework with RIA to persist the data, so for some reason, on the client side, something happened to cause ADO EF DomainContext to think an existing object is new and it tried to insert it again?



What I notice is this happens when I have at least 2 existing nodes, I create a new link between then, and then move at least 1 of the node… do you know why GoSilverlight might drop node(s) and recreate them or something like that? I’ll continue to look into it. THanks for you assistance.



-Kind Regards

-Chau Nguyen

Only some commands or tool actions will cause data to be deleted from the diagram’s model.

But the user’s simple moving of a Node by the DraggingTool is not such a case.

To be clear: each Diagram has a collection of Nodes and Links. These Nodes and Links are FrameworkElements, not model data. They are discarded and re-created as needed, which occurs, for example, when changing a DataTemplate or when modifying the data in the diagram’s model.