Page 1 of 1

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

Posted: Mon 22 Dec 2014 07:37
by Thenrich
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

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

Posted: Mon 22 Dec 2014 16:50
by Shalex
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)

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

Posted: Wed 24 Dec 2014 05:34
by Thenrich
I turned off ProxyCreationEnabled and it worked.

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

Posted: Thu 15 Jan 2015 14:53
by Shalex
The bug you have encountered is fixed in the new (5.7.530) build of Entity Developer.