Enum in composite key gets mapped to int when I need string
Can someone please answer this question at Stackoverflow
http://stackoverflow.com/questions/2486275/fluent-nhibernate-enum-i...
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by James Gregory on 23 Mar, 2010 08:55 PM
Seems like there's a bug here; we should be consistent with the rest of the enum behaviour.
There's an easy workaround though, if a little funky:
I've created a ticket for this, so we'll get it fixed to work like the rest of the enum support.
3 Posted by quintinpar on 24 Mar, 2010 07:09 AM
The second parameter in KeyProperty accepts a columName. Using
kp => kp.Type(typeof(GenericEnumMapper<AddressType>)
did not compile
The options are
public CompositeIdentityPart<T> KeyProperty(Expression<Func<T, object>> expression, string columnName) public CompositeIdentityPart<T> KeyReference(Expression<Func<T, object>> expression)
Am I missing something?
4 Posted by quintinpar on 24 Mar, 2010 08:37 AM
The second parameter in KeyProperty accepts a columName. Using
kp => kp.Type(typeof(GenericEnumMapper<AddressType>)
did not compile
The options are
public CompositeIdentityPart<T> KeyProperty(Expression<Func<T, object>>
expression, string columnName) public CompositeIdentityPart<T>
KeyReference(Expression<Func<T, object>> expression)
Support Staff 5 Posted by James Gregory on 24 Mar, 2010 08:54 AM
You need to update to a newer build of Fluent NHibernate; that particular overload has been available since November.
Support Staff 6 Posted by James Gregory on 01 May, 2010 02:16 PM
This has been fixed in master.
James Gregory resolved this discussion on 01 May, 2010 02:16 PM.