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: Utilisation de la Configuration (ou est property-ref)
PostPosted: Wed Jan 02, 2008 10:36 am 
Newbie

Joined: Wed Jan 02, 2008 7:22 am
Posts: 5
Bonjour,

Je développe un requêteur et j'utilise le contenu de l'objet Configuration. J'ai besoin de récupérer les valeurs property-ref d'une association manyToOne. Je n'arrive pas à trouver l'objet dans le quel est stocké cette propriété et je ne souhaite pas utiliser de parserXML pour y arriver : hibernate fournit de nombreuses méthodes pour accéder au contenu du mapping.

voici un bout du code que j'utilise :


it = HibernateUtil2.getConfiguration().getClassMappings();
while (it.hasNext()) {
pc = (PersistentClass) it.next();
nomrootclass = pc.getRootClass().getNodeName();
if (pc.getKey() instanceof Component) {
it1 = ((Component) pc.getKey()).getPropertyIterator();
while (it1.hasNext()) {
p = (Property) it1.next();
nomparent = p.getType().getName();
nomAtt = p.getNodeName();
nomAttSQL = ((Column) p.getColumnIterator().next()).getName();


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.