AnyDiscriminatorValue with entity in another java module

Hello,

I’m migrating to hibernate 6.1.5 and I have issue with using @AnyDiscriminatorValue because a referenced entity is not in the same java module (.jar).

Is there a solution to do this?

thanking you

Either use XML mappings or add a provided/compileOnly dependency.

A priori complicated to add the dependence which is not expected in this direction.

I will try to use XML mapping with XX.hbm.xml file

Thanks to you