-->
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.  [ 2 posts ] 
Author Message
 Post subject: Can I translate a dom4j object straight into a pojo / map?
PostPosted: Tue Jun 14, 2005 10:31 am 
Newbie

Joined: Thu Jan 08, 2004 11:54 am
Posts: 10
Hibernate version: 3.0.5 (say)

I want to load test data using the dom4j mapping, and then translate it straight into a POJO object graph or Map-Of-Maps, without persisting it to the database. Can I do this?

I have working hbm mapping docs for all the above. (In fact I have to generate some of them on the fly, which is why I use EntityMode.MAP). I can go to/from the database using each EntityMode. But I want to go straight from one in-memory representation to one of the others. I can't see how this can be done.

I can create a dom4j object, call dom4jsession.save(), but when I create a pojoSession and call get, it doesn't find my object, unless I've called commit - in which case it's saved to the database, which I don't want.

Do I have any chance of getting this to work? Can you think of a better way around it?

I could write something myself, but given that all the mapping information is concentrated in the hbm files, it seems a shame if Hibernate can't do this itself.

Many thanks
Jeremy


Top
 Profile  
 
 Post subject: transform() method
PostPosted: Wed Jun 15, 2005 5:16 am 
Newbie

Joined: Thu Jan 08, 2004 11:54 am
Posts: 10
I think there is a reference here from Gavin
http://forum.hibernate.org/viewtopic.ph ... 32&start=0

...which seems to imply that this will be implemented with a "transform()" method - assuming they are talking about the same thing.


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