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

Support for @Convert on types #127

Open
tzaeschke opened this issue Jan 29, 2023 · 1 comment
Open

Support for @Convert on types #127

tzaeschke opened this issue Jan 29, 2023 · 1 comment

Comments

@tzaeschke
Copy link

Feature request

JDO and Datanucleus support @convert annotations on fields and methods but not on types.
It would be nice to add this feature, it is, for example, also present in JPA.

Specifically, the annotation @Convert would be changed to:
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})

If a persistent class (for example this) has a field of a type that is annotated with @Convert (for example this, then instances of the annotated class should always be converted, even if the fields or not annotated.

A test case, including a modified JDO-API jar, is available here. The relevant classes are:

The other files are for reference to demonstrate that the the parallel implementation for @convert on fields works as expected.

The issue is also discussed in JDO-709 starting October 17th, 2022.

@andyjefferson
Copy link
Member

See datanucleus/datanucleus-core#483.
Not currently supported by DataNucleus for JDO or JPA (or Jakarta persistence), largely due to the fact that in all of the years of using converters not one person had requested it.

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