This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi Friends, Can we mix the hibernate annotations and .hbm files approach?
In my project we were using .hbm mapping file to map the entity objects. When I came to know about Hibernate annotations then I tried to implement hibernate annotations for the further developement but it is showing error that "Can not fetch simultaneous bags"
Can anyone help me out as I am not able to resolve this problem.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Indeed, you can conbine the use of the AnnotationConfiguration object and mapping files. Here's a quote from the Hibernate documentation:
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