-->
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: Question about DOM4J EntityMode vs. POJO
PostPosted: Wed Sep 17, 2008 7:47 pm 
Newbie

Joined: Wed Sep 17, 2008 7:35 pm
Posts: 2
I'm new to Hibernate... but it looks like when I use the DOM4J EntityMode to persist data from an XML Document into my database table, it never makes it into the POJO!

My mapping xml uses both the "node" attribute (for mapping to XML) and "name" attribute (for mapping to my POJO property). But neither the fields nor the getter/setters in my POJO are being used! The only thing the POJO seems to be used for is when the mapping is loaded, for Hibernate to obtain type info for my properties.

So to summarize: it looks like Hibernate is doing XML --> DB, rather than XML --> POJO --> DB.

I would like a way to access the data in POJO form before it is persisted to the DB, to perform data translations, formatting, etc. Is there a way to do this? Otherwise I will have to use another framework (like JiBX, JAXB, etc.) to convert my XML to POJOs so I can change the data, then use Hibernate to persist the POJOs.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 30, 2008 7:03 am 
Newbie

Joined: Wed Sep 17, 2008 7:35 pm
Posts: 2
Anybody?


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.