-->
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: Properties File Constants in Mappings
PostPosted: Wed Nov 24, 2004 11:39 pm 
Newbie

Joined: Wed Nov 24, 2004 11:32 pm
Posts: 1
[b]Hibernate version:[/b] 2.1.6

I would like to know if it's possible to have properties from hibernate.properties or some other location to be subsituted in mapping files.

instead of :

<class
name="my.class.Name"
table="tablename"
schema="schemaname"
...

I want to be able to do:

<class
name="my.class.Name"
table="tablename"
schema="${my.propertyfile.schemaname}"
...

Is this possible to bind this at runtime? I can do the subsitution at compile time using XDoclet and Ant, but I would rather define it in a separate property file and just have to change the value in one place without re-compiling.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 25, 2004 12:38 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Should be possible to write a wrapper/helper-class around configuration to do this.


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.