-->
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.  [ 1 post ] 
Author Message
 Post subject: import XML definitions in hibernate mapping files
PostPosted: Thu May 22, 2008 11:55 am 
Beginner
Beginner

Joined: Mon Mar 31, 2008 10:05 am
Posts: 20
Hi,

Is it possible to import XML mapping snippets and re-use these across several hibernate mapping files ?

The only thing I came across is the Entity Resolver feature and it only seems to be recommended for custom type definition imports. See the following link:
http://www.hibernate.org/hib_docs/reference/en/html/mapping.html#mapping-declaration-entity-resolution

Im using hibernate 3.2.6 and I want to import the whole class mapping element and override the id definition. In one usecase I use a sequence generator and the other the assigned generator. I would like to avoid duplicating the whole class mapping as this is the only difference.

The reason I have this, is to copy a row from 1 schema to the other but only 1 schema is the owning schema and is entitled to generate the ids.

I know this sounds like a database replication scenario but I have to do with the current company infrastructure.


Thanks,
-Guillaume


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

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.