Fluent mapping and enumds

Thread is closed for posting
2 posts, 1 answers
  1. Herbert
    Herbert avatar
    4 posts
    Member since:
    Aug 2012

    Posted 07 Aug 2012 Link to this post


    I've just downloaded the free edition and experienced a problem with fluent mapping and enums.
    This is my class:

    public enum SomeEnum
    public class SomeClass
      public int Id {get;set;}
      public string Bla {get;set;}
      public SomeEnum Test {get;set;}

    And I created the following fluent mapping configuration:
    MappingConfiguration<SomeClass> cl= new MappingConfiguration<SomeClass>();
    cl.HasProperty(x => x.Id).IsIdentity(KeyGenerator.Autoinc);

    This results in a table with the Id and Bla column only. The Test column is missing.
    If I use explicit mapping (MapType(x=> new {......}) ) the Test column is also in the database table.

    I really like the implicit mapping - how can I fix this ?

    Thank you


  2. Answer
    Zoran avatar
    534 posts

    Posted 10 Aug 2012 Link to this post

    Hi Herbert,

     We verified and confirm this is a bug on our side, regression from about 2 months ago. I can assure you that it will be fixed for our next release. In the meantime, you can use the explicit mapping approach for this particular property.

    Thanks a lot for reporting this bug to us. Your Telerik points have been updated.

    Kind regards,
    the Telerik team
    Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
Back to Top