Property 'X' on type 'Y' can't be set... error

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
Thenrich
Posts: 74
Joined: Sun 21 Dec 2014 19:47

Property 'X' on type 'Y' can't be set... error

Post by Thenrich » Mon 22 Dec 2014 07:37

I have two tables in SQL Server 2012. One table has a foreign key (ReportCategoryID) to another table. The Entity Developer model designer created the two entities shown in the image. Retrieving data for TtbSRReport works fine in the designer. When I retrieve data for the other table, I get the error message shown. I am using the latest 5.7 version with EF 6.

Any idea why this error happens?

"The property 'TtbSRReports' on type 'TtbSRReportCategory_4E05BDD77956EA2ABCB005B78E513AE812A61232FEC44A80858D91FDE7305FD3' cannot be set because the collection is already set to an EntityCollection."

Image

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: Property 'X' on type 'Y' can't be set... error

Post by Shalex » Mon 22 Dec 2014 16:50

We cannot reproduce the issue at the moment. Please send us the following:
a) the DDL script of your TtbSRReport / TtbSRReportCategory tables
b) a test model (*.edml, *.edps)

Thenrich
Posts: 74
Joined: Sun 21 Dec 2014 19:47

Re: Property 'X' on type 'Y' can't be set... error

Post by Thenrich » Wed 24 Dec 2014 05:34

I turned off ProxyCreationEnabled and it worked.

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: Property 'X' on type 'Y' can't be set... error

Post by Shalex » Thu 15 Jan 2015 14:53

The bug you have encountered is fixed in the new (5.7.530) build of Entity Developer.

Post Reply