-->
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: Profiling entity annotations as it was possible in XML conf?
PostPosted: Thu Feb 23, 2012 12:20 pm 
Newbie

Joined: Thu Feb 23, 2012 12:11 pm
Posts: 1
Hi.
I've to access a DB table that depending on the environment will be in different schema, so, as it's not possible to define annotations and XML configuration for Hibernate, I have a problem.
The class since now:

Code:
@Entity
@Table(name = "ARCHIVE")
public class Archive implements Serializable {
}


No need since now to have defined a schema so it was in dev environment, but after a time, to put it in production env, it's a requisite to set :

Code:
@Entity
@Table(name = "ARCHIVE", schema="DATA")
public class Archive implements Serializable {
}


In XML, you could define the schema property as schema=${data.schema} so, what about doing the same in annotation based configuration?

Someone has encountered the same problem?
It's possible to mavenize it an easy-way?

Regards.


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.