-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Reveng: entity class properties in the same order of table fields #4062
Comments
Triage: We should just do this, it doesn't need to be optional though. |
The same for code first approach would be nice, so the columns in the database should be in the same order as the model classes |
@ahmad-moussawi there has been a lot of discussion around that (and it's what we tried to do in EF6) but it causes a bunch of issues because reflection can give the properties in a different order on different architectures. While theoretically this doesn't really change the model... it can have subtle impacts on conventions etc. which ends up with different models on different architectures and it is super hard to debug why the differences occur. |
@rowanmiller thanks for the clarification, so it would be useful if we can set it by annotation attributes (I don't know if this was already implemented but at least I didn't find it in the docs) especially for the Maybe |
@ahmad-moussawi see #2272 for some ideas we have on providing a hint to migrations to the order columns would be in - which would often give you the order you defined things in the class (or at least close to it). |
Note to providers: this is now implemented. And you probably won't need to do anything. But if you override |
Can anyone has resolve this issue.I tried find the solution but completely unsuccessful... |
also has problem |
@icecream520 Can you submit a new issue with additional details about what you're seeing? |
In reverse engineer please consider to generate (eventually optional) the entity class with (field) properties listed not in alphabetic order but in the same order of the fields in related table.
The text was updated successfully, but these errors were encountered: