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

Confusing warning when saving/retrieving object with custom Value Converter #15

Open
isalvadori opened this issue Jul 11, 2023 · 1 comment
Assignees

Comments

@isalvadori
Copy link

When saving/retrieving an object with a data type that needs a custom ValueConverter to be registered, a warning logging appears, coming from the EObjectBuilderImpl, saying something like

WARNING: Error detected invalid Mongo - Ecore data type combination: Mongo: STRING, Ecore: org.eclipse.emf.ecore.impl.EDataTypeImpl@79308a2 (name: ELocalDate) (instanceClassName: java.time.LocalDate) (serializable: true) InstanceClassName null. Maybe use the ValueConverter for that.

The logging is confusing since the check for a proper ValueConverter seems to be done afterwards, resulting in the object properly saved/retrieved. So there should not be the need for that warning in the first place.

isalvadori pushed a commit that referenced this issue Aug 17, 2023
Signed-off-by: ilenia <ilenia@ilenia-XPS-15-9520>
@isalvadori
Copy link
Author

Fixed in https://github.com/geckoprojects-org/org.gecko.emf.persistence/tree/issue15-confusing-warning-value-converter.
The warning message is still there, but now it does not read as alarming as before. It just warns the user that he/she should have taken care of registering a custom ValueConverter to handle the otherwise possible incompatible type detected.

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

No branches or pull requests

2 participants