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