-->
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.  [ 2 posts ] 
Author Message
 Post subject: Define property-value in a file and use it in mapping?
PostPosted: Tue Dec 11, 2007 10:26 am 
Beginner
Beginner

Joined: Wed Apr 26, 2006 4:40 am
Posts: 24
Is it possible to use property values in hibernate mappings, which have been defined in the hibernate.properties file?

Sample hibernate.properties:
----------
current_db = my_db
----------


I tried to write a mapping:
----------
...
<class name="de.bla.bla.Clasz" table = "{$current_db}.clasz">
...
----------

but it did not work. The part between the {} brackets is ignored. I think that some kind of parsing is going on here, but I don't know how to tell the parser of the mapping document to replace that part with the value of the property.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 12, 2007 6:36 am 
Beginner
Beginner

Joined: Wed Apr 26, 2006 4:40 am
Posts: 24
Ok, I will just do it using XML entity definition.


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