I want to be able to add new properties to an entity without having to
define schema for them, and have them all persist to a single db
column.

Unless I'm mistaken about their capabilities, I'm not sure an
IUserType is what I'm after - I previously wrote an XML serialized
generic UserType before, but what that did was map 1 property -> 1 db
column. I want to map n properties to 1 column.

On Jul 23, 6:30 pm, Fabio Maulo <[email protected]> wrote:
> No Jason... it is very easy... IUserType
> Note: He said "map some properties of an entity"
>
> On Fri, Jul 23, 2010 at 1:23 PM, Jason Dentler <[email protected]>wrote:
>
>
>
>
>
> > I'm sure you can do this with some seriously heavy lifting, like writing a
> > custom persister, but it would be easier to map this to some field in your
> > entity and then parse it.
>
> > On Fri, Jul 23, 2010 at 11:15 AM, mcintyre321 <[email protected]>wrote:
>
> >> I've been wondering if its possible to have NH map some properties on
> >> an entity from a schema-free json (or xml) column
>
> >> e.g. map a db table like
> >> Id, Name, Json
> >> 1, Marmaduke, {address1: Windsor Castle, address2: London }
>
> >> to a class like
>
> >> class Person{
> >>    int Id{get;set;}
> >>    string Name {get;set;}
> >>    string Address1 {get;set;}
> >>    string Address2 {get;set;}
> >> }
>
> >> Is there a way to do this, or an extension point I could use to enable
> >> this?
>
> >> --
> >> 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.
>
> --
> Fabio Maulo

-- 
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.

Reply via email to