Register / Login
Object Relational Mapping
using hbm.xml and annotation in the same project
posted 6 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
, 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?
Replacing *.hbm.xml files with @Annotations.
Hibernate: Integration problems
How to map .hbm.xml file in persistence.xml