-->
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: Mapping a XML Column to String variable
PostPosted: Wed Mar 04, 2015 4:11 pm 
Newbie

Joined: Wed Mar 04, 2015 3:02 pm
Posts: 1
Hi,

I would like to know if it is posible to map a column of type XML in oracle to a variable of type String.

In my table, I have a column of type XML that contains information in xml format and I am doing a select of that table through a HQL query (createQuery).
---> String HQL = "from TableName";
---> createQuery(HQL)

In order to map a column of type Varchar with a variable of type String I do the following in my hbm.xml file:
---> <property name="VariableName" column="ColumnName" length="100" type="string" not-null="true"/>

In this way, I am getting the varchar value from the column of the table to my string variable. What I need to do now is to get the column of type xml and map it as string in my string variable.
- Can I do this on hibernate?
- How should I map this in my hbm.xml file?

Thanks in advanced for your help.

Regards,
JeisonG


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.