-->
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: Override mapping
PostPosted: Tue Mar 22, 2016 8:18 am 
Newbie

Joined: Tue Jan 12, 2016 12:16 pm
Posts: 10
Hi,

For a projet we have a full mapping configuration that feets 90% of projects.
But in some cases we have 2 different projects using the same root project with it mapping.
We use XML mapping (old projects)
CASE : one projet has to overide mapping on its side ; add column/relation in a persisted object

Is it possible and how, to overide class mapping only in this project wihout having to get all the XML file and change it ?


Top
 Profile  
 
 Post subject: Re: Override mapping
PostPosted: Tue Mar 22, 2016 11:47 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
XML mappings can override annotation ones. But the XML mappings can't be overridden. You need to break the mappings and only chose the ones that are appropriate for your project.


Top
 Profile  
 
 Post subject: Re: Override mapping
PostPosted: Tue Mar 22, 2016 11:52 am 
Newbie

Joined: Tue Jan 12, 2016 12:16 pm
Posts: 10
ok thanks.

So in that case I'll have to split hbm file in several files and change my configuration settings in order to inject hbm file I want.
If I used anotations it would be easier, because I would set Spring configuration, scanning the package with the Entity I want.


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.