-->
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: EntityMode.DOM4J et export d'un UserType
PostPosted: Wed Aug 30, 2006 2:18 pm 
Newbie

Joined: Wed Dec 01, 2004 12:27 pm
Posts: 11
Hibernate version:3.1.3

Bonjour,

Je me sers d'une Session en EntityMode.DOM4J pour exporter un résultat de requête vers un document XML.

Tout est exporté convenablement, sauf les propriétés qui utilisent un UserType : par exemple, si j'ai une classe X, avec une property dont le type retourne une classe A (un bean), et A disposant de propriétés et accessors du style :

private String foo, public String getFoo() return this.foo (...)

Le XML produit l'est sous la forme :

<X><property>com.company.A@1fe64</property></X>

(c'est à dire que dom4j ne "traverse" pas la classe retournée par mon UserType).

Je souhaiterais obtenir un XML de la forme :

<X><property><foo>valueOfFoo</foo></property></X>.

Est-ce possible, par exemple en "enregistrant" auprès de ma Session ce UserType pour que dom4j aille jusqu'aux accessors ?

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.