-->
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.  [ 4 posts ] 
Author Message
 Post subject: Importer un fichier de mapping dans un autre ?
PostPosted: Wed Sep 14, 2005 11:21 am 
Newbie

Joined: Wed Sep 14, 2005 11:13 am
Posts: 4
Bonjour à tous.

J'aimerai savoir si il est possible d'avoir un fichier de mapping qui importe d'autres fichiers mapping.

En fait c'est pour éviter de lister tous mes fichiers de mapping dans mon fichier hibernate.cfg.xml. Si je pouvais le faire cela me permettrait de n' avoir dans mon fichier de configuration que les fichiers de mapping contenant
les imports !

voilà !

Merci de vos réponses

Stef[/img]


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 15, 2005 5:27 am 
Newbie

Joined: Tue Sep 13, 2005 12:24 pm
Posts: 5
Location: paris
tu peut utilisé hibernate synchronizer avec une connection a la base de donnée il ecrit le mapping a ta place :-) .


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 15, 2005 11:41 am 
Newbie

Joined: Wed Sep 07, 2005 5:54 am
Posts: 16
Location: Chambéry
Bonjour,

Pour éviter de lister tous les fichiers de mapping dans le fichier hibernate.cfg.xml, tu peux procéder à une instanciation dynamique à l'initialisation de la Configuration.

Ex:
Configuration cfg = new Configuration();
cfg.addResource("hello/Message.hbm.xml");
cfg.setProperties( System.getProperties() );


Par extension tu peux avoir une méthode qui liste les fichiers hbm.xml et que les ajoute comme ressource de la Configuration.

Xavier


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 15, 2005 4:38 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Or simply XML entities

_________________
Emmanuel


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