: Mapping enums to INT values - not strings
When was the last time you did an update? There was a bug relating to this
that I fixed about an hour ago.
On Thu, Feb 19, 2009 at 2:54 PM, Tom Warnat wrote:
This does not seem to work with MySQL.
The SQL Query is something like this:
Create table foo
When was the last time you did an update? There was a bug relating to this
that I fixed about an hour ago.
On Thu, Feb 19, 2009 at 2:54 PM, Tom Warnat wrote:
> This does not seem to work with MySQL.
>
> The SQL Query is something like this:
>
> Create table foo (
>
> FooID INTEGER N
The mapping of enums is controlled by conventions. The Conventions
constructor adds a EnumerationTypeConvention to itself. That
convention is what is specifying that enums should be mapped as
strings. Seems like the best way to tackle this issue would be to
inject a different convention but I must
@Craig,
> This seemed to work for me, but anyone speak up if this is wrong:
>
> Map(x => x.SomeEnumProperty ).CustomTypeIs(typeof(int));
>
> -Craig
D'OH! It would be something that simple. :) thanks Craig!
--~--~-~--~~~---~--~~
You received this message because
This seemed to work for me, but anyone speak up if this is wrong:
Map(x => x.SomeEnumProperty ).CustomTypeIs(typeof(int));
-Craig
On Dec 15, 12:43 pm, "Tuna Toksöz" wrote:
> NH has its own Generic Enum Mapper BTW
>
> On Mon, Dec 15, 2008 at 8:33 PM, Derick Bailey wrote:
>
>
>
>
>
> > in NHiber
NH has its own Generic Enum Mapper BTW
On Mon, Dec 15, 2008 at 8:33 PM, Derick Bailey wrote:
>
> in NHibernate, the default mapping of an Enum is to an integer (at
> least, I've never told it to do anything special, and it has always
> mapped to my integer columns fine). In FluentNHibernate, the