-->
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.  [ 4 posts ] 
Author Message
 Post subject: how to map a table which contain XML file as one column????
PostPosted: Fri Jan 27, 2006 8:55 pm 
Beginner
Beginner

Joined: Thu Jan 12, 2006 7:38 pm
Posts: 25
Hi All,

I have a table with 4 columns. the 4th column contain XML file.

that xml file contain 3 fields.

I need to display 3+3 columns to the user.

so how to retrieve value from XML file and how to map those fields??

please provide some information.


thanks in advance
Gopal


Top
 Profile  
 
 Post subject: We have a similar problem
PostPosted: Fri Jan 27, 2006 9:18 pm 
Beginner
Beginner

Joined: Mon Mar 14, 2005 6:07 pm
Posts: 36
Our product has a similar problem, and here is what we did:

1. Added real columns for data that comes from the XML, in addition to the BLOB for storing the XML itself
2. Gave each additional column a public getter and a private setter, use access="property"
3. Mapped the XML property with access="field"
4. Added a getter and a setter for the XML property, and parsed the XML in the setter. Then we called the private setters of the fields we added in step 1with the values that came from parsing the XML.

Good luck!
------------------

Don't forget to rate.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 31, 2006 7:52 pm 
Beginner
Beginner

Joined: Thu Jan 12, 2006 7:38 pm
Posts: 25
do you have a sample code so that will be helpful for me.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 03, 2006 5:44 pm 
Beginner
Beginner

Joined: Thu Jan 12, 2006 7:38 pm
Posts: 25
HI i got this , i used Hibernate createSQLQuery()

and there is a method called extractValue() i used this method to extract value from xml file.


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