Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicting configuration settings were specified for property 'MyProperty' on type 'MyType'. MaxLength = 100 conflicts with MaxLength = 200 #35

Closed
IT-CASADO opened this issue Aug 3, 2016 · 2 comments

Comments

@IT-CASADO
Copy link

Hi,

i have a big problem on using Complex Types on my entities.
I created a small repro for my issue. You can find it as an attachment.

The VS Solution is attached so that following Package Manager command can be executed without any errors.

Add-Migration -Name Initial -Force

You can see the generated output in 201605111247310_Initial.cs.
I configured a MaxLength for all strings to 50 (see MyContext.cs).
Then I configured one of the sub property (PropB) of MyEntity.First (this is a complex type) to have a max length of 100.

Up to here all works as expected.

Now I'm trying to configure property "PropB" for MyEntity.Second to have a max length of 200.

For that uncomment line 18 in MyEntityConfiguration.cs and run the following command again:

Add-Migration -Name Initial -Force

Now I get this error:

Conflicting configuration settings were specified for property 'PropA' on type 'ComplexTypeWithStringLength.MyComplexType' MaxLength = 100 conflicts with MaxLength = 200

I don't understand why!? Is this a bug?

Regards,
Daniel
ComplexTypeWithStringLength.zip

@divega divega added this to the 6.2.0 milestone Aug 15, 2016
@AndriySvyryd
Copy link
Member

AndriySvyryd commented Dec 14, 2016

@IT-CASADO This is a limitation of EF, some property facets need to be stored in C-Space and EF doesn't have a way of configuring a particular usage of a complex type. So you can only specify different S-Space facets like ColumnName or ColumnType

@AndriySvyryd AndriySvyryd removed their assignment Dec 14, 2016
@divega divega removed this from the 6.2.0 milestone May 22, 2017
@omarpiani
Copy link

Why wont fix? need it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants