Nhibernate ValueType Collection as delimited string in DB
Posted
by JWendel
on Stack Overflow
See other posts from Stack Overflow
or by JWendel
Published on 2008-11-26T10:01:47Z
Indexed on
2010/04/10
22:03 UTC
Read the original article
Hit count: 278
nhibernate
|nhibernate-mapping
Hi
I have a legacy db that I am mapping with Nhibernate. And in several locations a list och strigs or domain objects are mapped as a delimited string in the database. Either 'string|string|string' in the value type cases and like 'domainID|domainID|domainID' in the references type cases.
I know I can create a dummy property on the class and map to that fields but I would like to do it in a more clean way, like when mapping Enums as their string representation with the EnumStringType class.
Is a IUserType the way to go here?
Thanks in advance /Johan
© Stack Overflow or respective owner