Open sdelamo opened 10 months ago
@dstepanov do you know what could be going on?
Don't know how and when this started to happen, but for some reason generated introspection classes for Genre
and Book
contain imports
import io.micronaut.data.annotation.GeneratedValue.Type;
import io.micronaut.data.annotation.Relation.Kind;
import io.micronaut.data.model.DataType;
and introspection is used when building session factory so that is when exception is thrown. Feels like io.micronaut.data.model.*
imports shouldn't be here because Genre
and Book
have jakarta annotations but don't know why are these being used as micronaut-data-processor (ie annotation mapper) is not supposed be used here but maybe @dstepanov knows what is going on here.
When did it appear? I think we always remapped to our annotations.
This might be improved by not generating the enum reference but a simple string.
I didn't realize first that data-processor is added as dependency through gradle (and in maven it's not added) so that is doing mapping and adding dependencies for data-model in the generated introspections. Tried this in 3.x and gives the same error, so not sure what and when changed that we now need to add data-model explicitly.
I expected the following dependencies to be enough:
but without:
We don't mention in the docs micronaut-data-model is necessary.
Without it, I get:
This is the domain of the sample app:
Steps to reproduce:
clone https://github.com/grails-core-issues-forks/micronaut-sql-1157