-->
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: Nom de table dynamique
PostPosted: Thu Feb 21, 2008 11:27 am 
Newbie

Joined: Thu Feb 21, 2008 11:01 am
Posts: 2
Bonjour,

Je voudrais savoir comment peut-on avoir un nom de table dynamique en hybernate.

C'est à dire que j'ai (par exemple) 10 environnements avec 10 tables qui ont la même structure mais dont le nom est géré dynamiquement, je souhaiterai donc l'externaliser dans un fichier properties (par exemple) ou le spécifier dans mon code.

Voici un exemple :
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="fr.toto.domain">
<class name="BonDeTravail" table="TAB_X1" schema="F_SW">
<id name="numeroSecu" column="F_Id" > </id>
<property name="pole" column='"NOM"' type="string" />
</class>
</hibernate-mapping>

Sachant que "TAB_X1" peut être "TAB_N3" sur un autre environnement .....

Je ne sais pas si c'est clair...

Merci.


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.