Hi,
Thanks for your reply
As Diego mentioned this
<property name="ResultTemplate" column="result_template" />
public virtual string ResultTemplate { get; set; }
And THEN, with that string in memory, you create your XmlDocument.
Once the mapping happens, XML Datatype binds into the string, after
this is there anyway i can put the string into XMLdocument if there
is another property as XMLDocument in the same class.
Thanks,
kiran
On Mon, Mar 29, 2010 at 2:02 PM, Diego Mijelshon <[email protected]>wrote:
> Kiran,
>
> What José posted is a good alternative if you want NH to handle the
> conversion.
> Internally, it instantiates the XmlDocument when loading from the DB, and
> gets its OuterXml when persisting it back (and then checking if dirty, I
> presume).
> You should consider the performance implications of these conversions
> before choosing your strategy.
>
> Diego
>
>
>
> On Mon, Mar 29, 2010 at 14:26, José F. Romaniello
> <[email protected]>wrote:
>
>> There is an iusertype described here:
>> http://216.121.112.228/browse/NH-866<http://216.121.112.228/browse/NH-866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel>
>>
>> the usertype:
>> http://216.121.112.228/secure/attachment/12905/XmlType.cs
>>
>>
>>
>> 2010/3/29 Diego Mijelshon <[email protected]>
>>
>>> No, you should map it as STRING.
>>>
>>> <property name="ResultTemplate" column="result_template" />
>>>
>>> public virtual string ResultTemplate { get; set; }
>>>
>>> And THEN, with that string in memory, you create your XmlDocument.
>>>
>>> Diego
>>>
>>>
>>>
>>> On Mon, Mar 29, 2010 at 13:52, Kiran Kumar <[email protected]>wrote:
>>>
>>>> Hi,
>>>> How should i map it
>>>>
>>>> EX:
>>>>
>>>> <property name="ResultTemplate" column="result_template" type="XML" />
>>>> where the property ResultTemplate is XMLDOCUMENT correct ?
>>>>
>>>> If so i get a error.
>>>>
>>>> Could you pls let me know how to map it.
>>>>
>>>> Thanks,
>>>> Kiran
>>>>
>>>>
>>>>
>>>> On Mon, Mar 29, 2010 at 12:31 PM, Diego Mijelshon <
>>>> [email protected]> wrote:
>>>>
>>>>> Sorry, I wasn't clear enough. The only out-of-the-box way to map a
>>>>> SQLServer xml column is as string.
>>>>> You can then instantiate any of those classes I mentioned from there.
>>>>>
>>>>> Diego
>>>>>
>>>>>
>>>>> On Mon, Mar 29, 2010 at 13:13, Kiran Kumar
>>>>> <[email protected]>wrote:
>>>>>
>>>>>> Hi,
>>>>>> Thanks for your reply, if string is a datatype, then property of
>>>>>> the class should be a string,
>>>>>>
>>>>>> If i need to specify the property as XMLdocument, how should i do
>>>>>> it.
>>>>>>
>>>>>> Thanks,
>>>>>> Kiran
>>>>>> On Mon, Mar 29, 2010 at 11:43 AM, Diego Mijelshon <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> string. If you need to manipulate it, you can use XDocument,
>>>>>>> XmlDocument, XPathDocument or XmlReader.
>>>>>>>
>>>>>>> Diego
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Mar 29, 2010 at 11:22, Kiran Kumar
>>>>>>> <[email protected]>wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>> What would be mapping for sql server xml datatype with
>>>>>>>> nhibernate property type.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Kiran
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "nhusers" group.
>>>>>>>> To post to this group, send email to [email protected].
>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>> [email protected]<nhusers%[email protected]>
>>>>>>>> .
>>>>>>>> For more options, visit this group at
>>>>>>>> http://groups.google.com/group/nhusers?hl=en.
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "nhusers" group.
>>>>>>> To post to this group, send email to [email protected].
>>>>>>> To unsubscribe from this group, send email to
>>>>>>> [email protected]<nhusers%[email protected]>
>>>>>>> .
>>>>>>> For more options, visit this group at
>>>>>>> http://groups.google.com/group/nhusers?hl=en.
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "nhusers" group.
>>>>>> To post to this group, send email to [email protected].
>>>>>> To unsubscribe from this group, send email to
>>>>>> [email protected]<nhusers%[email protected]>
>>>>>> .
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/nhusers?hl=en.
>>>>>>
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "nhusers" group.
>>>>> To post to this group, send email to [email protected].
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected]<nhusers%[email protected]>
>>>>> .
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/nhusers?hl=en.
>>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "nhusers" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected]<nhusers%[email protected]>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/nhusers?hl=en.
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "nhusers" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected]<nhusers%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/nhusers?hl=en.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "nhusers" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<nhusers%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/nhusers?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.