Currently we are doing impact analysis of Hibernate Upgrade activity (2.0 to 4.3.6) on our application. As first step, we tried Hibernate table mapping classes’ generation for the newer version using hibernate tools.
We used middlegen to generate Hibernate POJO classes for version Hibernate Version 2.0 which mapped the table columns with different data types. Now that we are using hibernate tools, we are seeing some issues listed below:
Issue: Integer type column field in hibernate 2.0 using middlegen is now generated as a primitive type ‘int’ field using hibernate tools. Similarly CHAR (1) field in table was mapped as String using middlegen, whereas it gets mapped to primitive char type using hibernate tools.
Because of this, we have received more than 1000 compilation errors in codebase where we would have to fix the String to Char, Integer to int and so on.
Is there any possible options to overcome this? Please advise.
Thanks Anand M
|