Sorry - I should expand on that…
Under 5.3, logging from the compile phase appeared to list all mapped (with.hbm.xml) classes and some but not all other project classes.
Under 5.4, no classes are listed as enhanced. Do I understand from your reply that enhancement only takes place for annotated classes? Maybe the plugin docs need to be more explicit?
db
Do I understand from your reply that enhancement only takes place for annotated classes?
No. It should work for any mapped entity, be it annotated or using XML mappings (e.g. HBM or orm.xml). If the entities are not enhanced, it’s a bug. But you have to decompile your compiled classes and see if the enhancement has not taken place.
Hi Vlad
I’ve checked the output - it seems clear that enhancement is not taking place with either 5.3.7 or 5.4.0 (despite multiple [INFO] Successfully enhanced class… messages in the case of 5.3.7)
If you wish to check I have uploaded a small sample of the generated classes here.
The project as a whole connects to three separate database (two located in UK third in Slovkia).
The project is a swing based desktop application, fully functional, including hibernate aspects. Compile time enhancement is a ‘nice to have’ feature but not essential.
I will attempt to replicate the issue with a small test project using the same database but just a couple of mapped tables.
db
Compiling on a windows platform with jdk1.8.0_192 appears to proceed normally but I can see no evidence that the classes in package com.bolsover.aws.hibernate.visual653 are enhanced.
The test case is composed of just a couple classes from the original application. If you check the .hbm.xml, you can see that I’ve commented out all the foreign key relationships.
Each of the original database has at least 700 tables. The complete application connects to three separate database and extracts VAT related data for reporting in UK and Slovakia.
Although annotations are more common than XML, we still need to support enhancing entity classes that are mapped via XML. I haven’t tested it with XML, but, in case it doe snot work, a new Jira issue would have to be created for this.
Yeah, it’s not really “caused” by this issue, it’s just that it has always been implemented to support annotated classes only.
IIRC, the idea at the time was to push the elements declared in XML to a Jandex index together with the annotations and then deal with everything in a totally unified way.