Metamodel generates invalid model classes for converters and user types

Description

My project does not compile after upgrading from 5.4.32 to 5.5.3.

For entities with @Convert or @Type annotations and a validator annotation, invalid imports are generated for the model class:

This is a minimal example to reproduce the issue:

Is there a test-case example for the metamodel generator? If so, I can provide a runnable reproducer as well.

Attachments

1

Activity

Show:

Thomas Heigl July 22, 2021 at 9:42 AM

I pushed a tentative fix to my original PR. It works, but it isn’t perfect, because it relies on string manipulation to strip annotation metadata from the type string.

Could someone please approve the test workflow for my PR on Github?

Thomas Heigl July 19, 2021 at 1:54 PM

I debugged it for about an hour yesterday, but I didn’t find the correct place or helper method for removing the annotation metadata from the type string. Maybe Vlad Mihalcea has an idea how to fix this?

Christian Beikov July 19, 2021 at 10:52 AM

Great, do you think you can provide a PR that fixes this?

Thomas Heigl July 17, 2021 at 10:13 AM

I can confirm that this is caused by

The declared type is inferred incorrectly:

Thomas Heigl July 17, 2021 at 9:50 AM

The only related change to the model generator seems to be in

Fixed

Details

Assignee

Reporter

Worked in

Components

Fix versions

Affects versions

Priority

Created July 9, 2021 at 5:31 PM
Updated May 11, 2022 at 10:00 AM
Resolved May 11, 2022 at 10:00 AM