Register / Login
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Object Relational Mapping
using hbm.xml and annotation in the same project
posted 7 years ago
I've started working on an application that uses hibernate.
The mapping uses xml (the *.hbm.xml files).
I am considering moving to annotations instead.
By moving to annotations, I mean that for new tables I will use it instead of the hbm.xml.
now, I'm not sure I should, and would happily get your insight.
The main reason on NOT doing that is that I will have mixed metadata mapping, which may cause development hell.
moving the old ones to annotations is another possibility, but a dangerous one (I need to set many
And actually, the first question, should have been: can I even mix the two ways of mapping?
It is sorta covered in the
JavaRanch Style Guide
Boost this thread!
Replacing *.hbm.xml files with @Annotations.
Hibernate: Integration problems
How to map .hbm.xml file in persistence.xml