There are probably several possibilities, but in some cases I've
implemented the State classes as immutable value objects, and provided
a well-known instance for each state as static members of some class.
For me it was then enough to have a custom user type that could
convert from the State instance to some corresponding code word when
persisting, and conversely select the correct well-known instance when
loading from db.

/Oskar


2011/1/13 Peter Forstmeier <[email protected]>:
> Hi,
> i have just downloaded FNH 1.1 and baning my head to map the State
> Pattern.
> What i have:
>
> Project  with references to Customwer and some other stuff  (mapping
> is ok)
>
> The Project can have different state's as
> {created,approved,billed,finished}
>
> This state's are mapped to enum's at the moment, but i would like
> (have) to change this to the State Pattern because of further
> development.
>
> Any idea's????
> Thanks
> Peter
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Fluent NHibernate" 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/fluent-nhibernate?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" 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/fluent-nhibernate?hl=en.

Reply via email to