Another reason is for translation. Having the data in db gives an easy
way to present to the user different languages without the need to
compile.

I was thinking maybe a code generation tool but everytime something
changes it must be generated and compiled...

any other thoughts???

On 11 Ιούλ, 15:14, Kenneth Siewers Møller <[email protected]>
wrote:
> I'm actually curious about this as well. Typically I would use lookup tables
> for values having persistance meaning. States I put in enums as an example.
> There's always a problem mapping between these layers when talking about
> "static" data.
> Sometimes I have immutable lookup tables mapped to entities and enums,
> which, most of the time, won't change. The reason for using lookup tables
> are typically for reporting etc. with tools unaware of my business
> logic/model.
>
> 2009/7/11 mantzas <[email protected]>
>
>
>
> > Hi,
>
> > i have read some posts about enum in NHibernate (Maybe not all).
>
> > i.e. User Status: Active,Inactive,Locked...
>
> > Until now i have persisted the values in the db so the user has the
> > chance to crud the thing.
>
> > My though:
>
> > If the user cruds then the business meaning of the enum is lost.
> > Such enums must be hardcoded in order to have a business meaning and
> > can be used in code (A newly added user status is meaningless until i
> > use it in code, which means write code, build deploy...).
>
> > what do you thing?
--~--~---------~--~----~------------~-------~--~----~
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