-->
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: Custom variables in XML mapping: Same with annotations?
PostPosted: Mon Oct 27, 2008 1:17 pm 
Beginner
Beginner

Joined: Thu Oct 04, 2007 12:22 pm
Posts: 48
Hello!

For a project of mine it was necessary to handle variables within xml-mappings, which extend the names of the tables with a given id. E.g. the mapped table {application_id}_Customer would be replaced to 12_Customer.
To achive that I only used the Configuration.addXml(..) method instead the addClass to add the connect the maping - but before replaced the variable placeholders of the loaded xml manually. Something like this:

Code:
// pseudo example
Configuration conf = new Configuration()...
String customerXmlMapping = loadMapping(...);
customerXmlMapping = replaceVariables(customerXmlMapping);
conf.addXml(customerXmlMapping)


Now I want to migrate from xml mappings to annotations but do not know how to keep my variables-context. Does anyone have an idea?

Hibernate version:
3.3


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.