Closed aquisio closed 1 year ago
My application uses a schema in which one of the entity types has two properties of the same owned entity type:
protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity<Listing>().OwnsOne(c => c.BuyerAddress); modelBuilder.Entity<Listing>().OwnsOne(c => c.SellerAddress); }
With this configuration, MetadataBuilder.BuildFrom(), throws an ArgumentException: 'An item with the same key has already been added. Key: Address'.
MetadataBuilder.BuildFrom()
Is this a bug, or perhaps something that can be resolved with a change of model builder configuration?
Any advice will be much appreciated. Thanks.
That sounds like issue #186 which was fixed in version 7.1.0. What version of breeze are you using?
Apologies - you're right. Just updated to 7.1.0 and the issue is gone. Thanks.
My application uses a schema in which one of the entity types has two properties of the same owned entity type:
With this configuration,
MetadataBuilder.BuildFrom()
, throws an ArgumentException: 'An item with the same key has already been added. Key: Address'.Is this a bug, or perhaps something that can be resolved with a change of model builder configuration?
Any advice will be much appreciated. Thanks.