-->
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: Where we must do mapping?
PostPosted: Mon Jan 04, 2016 3:24 pm 
Newbie

Joined: Sun Jan 03, 2016 3:35 pm
Posts: 4
Where we must do mapping? In "hibernate.cfg.xml" or in "Entity classes"? Because I saw two options.


Top
 Profile  
 
 Post subject: Re: Where we must do mapping?
PostPosted: Mon Jan 04, 2016 4:07 pm 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
The `hibernate.cfg.xml` is a legacy configuration file that was used prior to JPA.
Back then, the mapping were done in HBM XML files.

Nowadays, although Hibernate can still use the legacy mappings, it's more common to use the `persistence.xml` configuration provided by the JPA specs and annotations on entity classes.


Top
 Profile  
 
 Post subject: Re: Where we must do mapping?
PostPosted: Mon Jan 04, 2016 5:07 pm 
Newbie

Joined: Sun Jan 03, 2016 3:35 pm
Posts: 4
If i correctly understand, we can use "ClassName.hbm.xml" or "Entity classes" for mapping? On my choice.
Sorry for the stupid questions, I just see into hibernate. And bad know english.


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.