-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Mixing xml with Annotation
PostPosted: Mon Aug 23, 2010 5:43 am 
Beginner
Beginner

Joined: Thu Nov 12, 2009 1:57 am
Posts: 22
I am trying to configure hibernate using xml file, so i used

Code:
factory = new Configuration().configure().buildSessionFactory();


While trying to configure hibernate using annotation, I am using

Code:
factory = new AnnotationConfiguration().configure().buildSessionFactory();


In order to use XML and hibernate simultaneously, what would be correct code to use for configuring hibernate application.

Thanks in advance


Top
 Profile  
 
 Post subject: Re: Mixing xml with Annotation
PostPosted: Mon Aug 23, 2010 6:02 am 
Beginner
Beginner

Joined: Thu Dec 11, 2008 8:18 am
Posts: 35
you can not mix the mappings for the same Pojo in both ways.


Top
 Profile  
 
 Post subject: Re: Mixing xml with Annotation
PostPosted: Mon Aug 23, 2010 6:40 am 
Beginner
Beginner

Joined: Thu Nov 12, 2009 1:57 am
Posts: 22
I want to configure different pojos in different ways.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.