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
ExtraProperties Can Not be updated #772
Comments
Hmmm.. didn't know that. Should be tested. Thank you for informing. |
I added integration tests (works with inmemory SQLite) and it seems working: d07a689#diff-19dff7480171145bae8f3387b91a5059 Did you try it yourself? If so, we will also try with a real application. |
I have tested with MySQL and failed. For temporary solution, I have to added code below in every extra entity to fix that.
And I can not write an extension function for IHasExtraProperties cause ExtraProperties have no setter |
— https://www.jerriepelser.com/blog/store-dictionary-as-json-using-ef-core-21/ |
Good point @acjh that means repository.Update (or UpdateAsync) method should always be called. Actually, this is a best practice that we suggest with this ABP framework. All the pre-built modules do it (because some database APIs has no change tracking, like MongoDB driver). Creating a new dictionary for each change is not efficient and seems bad to me. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
EF Core ConfigureExtraProperties use Value Conversions to convert Dictionary to string colum. But if we directly set key-value in entity.ExtraProperties, ef cannot detect property change during update
The text was updated successfully, but these errors were encountered: