Accessing Data in XMLType Columns or XMLType Tables

228 views
Skip to first unread message

santosh9y

unread,
May 3, 2012, 6:04:40 AM5/3/12
to Fluent NHibernate
Does Fluent NHibernate support Accessing Data in XMLType Columns or
XMLType Tables. If Yes, can someone post me back with sample code
snippet please...

Santosh Kumar

unread,
May 4, 2012, 10:12:22 AM5/4/12
to Fluent NHibernate, santosh...@dell.com
Guys,

Gentle Reminder! Any update on my below query

Regards,
Santosh

Ben Fulton

unread,
May 7, 2012, 10:04:02 AM5/7/12
to fluent-n...@googlegroups.com, santosh...@dell.com
Don't know about the Fluent side of things, but we created a custom NHibernate XMLUserType for this purpose, connecting to an Oracle database. We implemented NullSafeGet of IUserType as

        public override object NullSafeGet( IDataReader rs, string[] names, object owner )
       {
           return NHibernateUtil.StringClob.NullSafeGet( rs, names[0] );
        }

The mapped property is still a string though.

--
You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group.
To post to this group, send email to fluent-n...@googlegroups.com.
To unsubscribe from this group, send email to fluent-nhibern...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.

Michael Möhle

unread,
May 7, 2012, 12:04:04 PM5/7/12
to fluent-n...@googlegroups.com

Something like this:

 

http://www.codewrecks.com/blog/index.php/2009/05/14/use-xml-field-in-sqlserver-with-nhibernate/

or this

http://www.smelser.net/blog/post/2009/01/02/Hibernate-my-XML.aspx

 

This has nothing to with FluentNH. It is simply a Usertype. A UserType can be everything: e.g. A Picture with additional picture Infos like here:

http://www.martinwilley.com/net/code/nhibernate/usertype.html

 

If you are going to map other usertypes a more generic version:

http://darrell.mozingo.net/2009/02/10/generic-nhibernate-user-type-base-class/

 

 

Michael

Reply all
Reply to author
Forward
0 new messages