Skip to content Skip to sidebar Skip to footer

New Breeze 1.4.9 - Duplicate Entity - Possible Bug?

This problem started appearing after I upgraded to Breeze 1.4.9. I have the following entity: public class ProjectMember { public int ProjectId { get; set; } [ForeignKey('

Solution 1:

Updated March 7 2014

This was a bug and is now fixed and available on GitHub. It will be released with a complete zip within the next few days. Any version above 1.4.9 should contain the fix.

Original post

Sorry, I can't tell from the screenshots that anything is duplicated. Are you seeing two entities in the EntityManager cache with the same key, And if so how?. Are you also seeing some form of duplication on the database as well?

Or is the problem that a 'new' entity is being created on the client after the save?

Is it possible that one part of these keys is an Identity column on the database? If so, then it's worth checking the metadata to insure that the autoGeneratedKeyType property for this EntityType is set to Identity. This would cause the database to generate a new key on insert and this entity would then be sent back to the client. Merging this entity with its previous incarnation will only occur if the AutoGeneratedKeyType is set to Identity. Otherwise, you will end up with both the original entity with the old key and a cloned version its new key.

Otherwise, I think we need more information.


Post a Comment for "New Breeze 1.4.9 - Duplicate Entity - Possible Bug?"