You can mix annotations and xml. Here is a quote from the API document:
Quote:
Note that you can mix the hbm.xml use and the new annotation one. The resource element can be either an hbm file or an EJB3 XML deployment descriptor. The distinction is transparent for your configuration process.
Alternatively, you can define the annotated classes and packages using the programmatic API
Precedence decision as per the API doc is as follows
Quote:
To ease the migration process from hbm files to annotations, the configuration mechanism detects the mapping duplication between annotations and hbm files. HBM files are then prioritized over annotated metadata on a class to class basis. You can change the priority using hibernate.mapping.precedence property. The default is hbm, class, changing it to class, hbm will prioritize the annotated classes over hbm files when a conflict occurs.
You may read the complete doc and tutorial in the following URL
http://docs.jboss.org/hibernate/stable/annotations/reference/en/html_single/