-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate 5 mappings not working?
PostPosted: Thu Apr 06, 2017 1:04 pm 
Newbie

Joined: Wed Jul 02, 2008 11:36 am
Posts: 6
I cannot get hibernate to work, whatever I try, I get an exception like org.hibernate.UnknownEntityTypeException: Unable to locate persister: Relation. The hbm.xbm file is there, if I change the class name into a nonexistent name, this is noticed, so I guess it is not ignored, but that is as far as it goes. Now, the documentation looks a little rough at places (Section 2.1.7. Inheritance looks like WIP), so I wonder whether something was changed in Hibernate 5 without proper documentation that keeps me from getting this up and running. (Running WildFly)


Top
 Profile  
 
 Post subject: Re: Hibernate 5 mappings?
PostPosted: Thu Apr 06, 2017 1:07 pm 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Use the Hibernate 5.2 User Guide and forget about the docs prior to Hibernate 5.

Also, use annotations instead of the legacy HBM mappings.

Check also the Getting started guide too.


Top
 Profile  
 
 Post subject: Re: Hibernate 5 mappings not working?
PostPosted: Thu Apr 06, 2017 2:04 pm 
Newbie

Joined: Wed Jul 02, 2008 11:36 am
Posts: 6
I expect deprecated constructs to work; note that the 'Getting started guide' also uses mappings files, without mentioning they are deprecated. The same holds for the deprecated org.hibernate.tutorial.annotations.Event annotations. Anyways, I appreciate your suggestion, I will work my way through the annotation example to figure out what goes wrong here.

Thanks!
Izak


Top
 Profile  
 
 Post subject: Re: Hibernate 5 mappings not working?
PostPosted: Thu Apr 06, 2017 2:42 pm 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Quote:
I expect deprecated constructs to work;


They work. We use lots of examples using HBM mappings in our test cases, but that doesn't mean you should now start a project using the legacy mappings. I can ensure you that annotations are better supported than HBM, so keep that in mind too.

Quote:
note that the 'Getting started guide' also uses mappings files


But it also uses annotations. Anyway, it's just a configuration issue that you need to fix.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.