[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Hibernate annotation versus hibernate mapping files .hbm.xml

rschauer do-not-reply at jboss.com
Thu Apr 26 19:13:52 EDT 2007


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041231#4041231

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041231



More information about the jboss-user mailing list