Hello
I need to know if it’s possible to control the Hibernate code generation to follow some naming conventions I want.
For example I want to avoid specific prefixes and suffixes on my class creation.
For example:
1. If the db table name is TBL_CUSTOMER I would like my resulting Hibernate class to be Customer.\
2. If the id column of the db table TBL_CUSTOMER is CUSTOMER_ID I would would like the resulting Customer class to have a corresponding property named id
3. If the table name starts with SPE_CUSTOMER I would like my resulting Hibernate class to reside in a package called com.spe so the class would be “…spe.Customer”
I checked some velocity templates that the documentation proposes but I dont have much time to spend on this. Can someone please give me some guidelines? Some examples.
I managed to do what I want with Hibernate Tools and the DelegatingReverseEngineeringStrategy class but Hibernate tools have other limitations on the DAO creation which MyEclipse is perfect on that.
If there is a way to create DAO objects from Hibernate mappings then my problem is also almost solved.
Thank you in advance…I am really having a difficult time here with the project deadlines 😯