Just to say I tried this test from FluentNhibernate.Testing/AutoMap/
Apm/AutoPersistanceModelTests.cs

[Test]
        public void TestAutoMapsProperties()
        {
            var autoMapper = AutoPersistenceModel
                .MapEntitiesFromAssemblyOf<ExampleClass>()
                .Where(t => t.Namespace ==
"FluentNHibernate.AutoMap.TestFixtures");

            autoMapper.Configure(cfg);

            new AutoMappingTester<ExampleClass>(autoMapper)
                .Element("//property").HasAttribute("name",
"ExampleClassId");
        }

Which I believe is a simple test to check the generated XML from the
automapper.
Anyway if you look at the generated XML you will see that the
ExampleEnum Enum declared in the ExmapleClass (TestFixture.cs)
is not present in the generated XML.

Not sure if this is a bug or not.

Thanks, Mark





On Feb 12, 2:50 pm, Steven Harman <[email protected]> wrote:
> Mark,
> I like Derick Bailey's approach to solving this - Mapping a State Pattern
> with 
> NHibernate:http://www.lostechies.com/blogs/derickbailey/archive/2008/11/26/mappi...
>
> -steve
>
> //----  90% of being smart is knowing what you're dumb at  
> ----//http://stevenharman.net/
>
> On Thu, Feb 12, 2009 at 9:12 AM, Mark Perry <[email protected]>wrote:
>
>
>
> > Hi
>
> > Sorry to keep pestering the list like this I feel like I'm being a
> > right pain in the [insert word here].
>
> > I wanted to have to AutoMapper map one of my properties which is an
> > Enum but it seems as
> > if the AutoMapper just ignores it.
>
> > I know there is an example on the wiki
> >http://wiki.fluentnhibernate.org/show/AutoMappingTypeConventions
> > but I just want to store my enum as an Int in the Db and have it as an
> > enum in my object and not go to the
> > length of implementing IUserType.
>
> > I think I need to add an ITypeConvention to handle my EnumType and add
> > a custom attribute to describe
> > the type of my enum?
>
> > Am I along the right lines here?
>
> > Thanks, Mark
--~--~---------~--~----~------------~-------~--~----~
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