Hi all,

I'm working with a legacy database that has some 'interesting' design
properties. One of the things I'm running into right now is the
following:

Let's say there's a table called 'PetStore' and a table called
'Animal'. A pet store can contain multiple animals. However, instead
of having an Animal.PetStoreID field, another decision was made.
PetStore has a column "Animals" containing a comma-separated list of
animal ID's (e.g.: "3,48,1028,4747").

Now, I'm quite new to NH so I thought I would go with an IUserType
that converts from string to IList<Animal>. So in NullSafeGet I would
convert the string to the list, in NullSafeSet I would convert it back
again.

However, is this a right approach to take? Would this mess up the
persistence cascade, for instance? Certainly the best route would be
to refactor the database itself, but I would like to have backup plan
just in case.

With regards,
Roy Jacobs
Civolution

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