-->
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: How to serialize a transient object using EntityMode.DOM4J?
PostPosted: Thu May 24, 2007 4:14 am 
Newbie

Joined: Wed Mar 03, 2004 5:54 pm
Posts: 3
The ability to serialize entity introduced with Hibernate 3 using the configurable EntityMode is very powerful.


I've found simple examples on how serialize to XML persisted object using the
Hibernate API.

BUT I haven't found any example that shows how to serialize (with a EntityMode.DOM4J session) a transient object i.e. an object that has not been persisted.

I would like to to something like that:

Code:
MyEntity e = new MyEntity();
e.setXxx(..);

Session dom4jSession = session.getSession(EnityMode.DOM4J);
xmlString = dom4jSession.serializeToXml( e );

// .. store xmlString in local repository


Is it possible to do something like that using Hibernate mapping API or I'm on the wrong way?

Thank you.

Regards, Paolo


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.