javahibernateannotationshbm

generate annotated java class from hbm file


I have an old project in which java classes are generated from hbm files.

Is it possible ,using these hbm files, to generate java classes with annotations?


Solution

  • I don't think you can do it directly from hbm to annotations, but it's possible to do it if you proceed like this:

    1. Generate the database schema from your hbm configuration.
    2. Use Hibernate reverse engeneering to generate annotated classes from this database.

    You may take a look at these links for further information: