|[Edapt] Unexpected behavior by defaultValueLiteral change [message #1798230]
||Wed, 14 November 2018 14:19
| Michael Berger
Registered: November 2018
I have a question about the migration behavior of edapt in case of changed defaultValueLiteral. Maybe, it's a bug.
I have create a model with an enumeration and an element with an attribute from type of this enumeration. Additionally, the defaultValueLiteral is set to a literal of this enumeration.
After edapt release, the enumeration was extended by a new literal. This new literal was set to the new defaultValueLiteral in the element as before.
Now, here comes the problems in case of save options with XMLResource.OPTION_KEEP_DEFAULT_CONTENT = false. That means, a model instance with an element with attribute=default will not serialized the attribute.
A model instance from old release with old default will serialize no attribute, same as a model instance from new release with new default. But, the edapt migration will set the newest default value for both instances, old and new model.
It seems, that the migrator takes the newest default value defined, independently of the history.
I have not found any other problems of the same issue, maybe someone can explain the behavior or tell me, its a bug :)
Powered by FUDForum
. Page generated in 0.02719 seconds