0 Replies Latest reply on Apr 26, 2007 7:13 PM by rschauer

    Hibernate annotation versus hibernate mapping files .hbm.xml

    rschauer

      Hello,

      in the tutorials and trailblazers I have read of the two ways of using the hibernate mapping. First is using the Java 5.0 annotation and the second is using the "old" method of typing .hbm.xml mapping files.

      First I tried to type the .hbm.xml files and let the DAOs be generated from the files by help of the hibernate tools (Eclipse IDE).
      The second I tried were of course the annotations - without the help of any generators.

      My question is: Which way is better for large software-projects. Lets say up to 120 database tables.
      In every paper I read, the annotations are preffered but the examples are always very small. I think that for larger projects it would be difficult to keep the track of all the tables if the mapping is done in the code (with annotations).

      What is your opinion?

      Thanks
      Reinhard