I've just ran the patched code and it appears that the composite id class is getting generated in it's proper (non-inner) class.
What do you mean with "proper (non-inner) class"? If I try your example using your patch, the generated class is org.hibernate.jpamodelgen.test.innerclasses.WorkOrderId_. However, should it not be org.hibernate.jpamodelgen.test.innerclasses.WorkOrder$WorkOrderId_?
The JPA spec says (6.2.1.1 Canonical Metamodel):
-
For each managed class X in package p, a metamodel class X_ in package p is created.
-
The name of the metamodel class is derived from the name of the managed class by appending
"_" to the name of the managed class.
To make this happen inner classes need to be tracked explicitly and the class writer need to be adjusted to write inner classes. Thoughts?
|