Fluent Mapping Properties MissingFieldException

Thread is closed for posting
2 posts, 0 answers
  1. Roman
    Roman avatar
    1 posts
    Member since:
    Jul 2012

    Posted 26 Oct 2014 Link to this post


    i'm using Telerik Data Access 2014.2.918.1 and the Fluent API.
    I have models which use a custom libary named Catel (http://catelproject.com).
    The properties in Catel have no real backing field. Example:

      public partial class Country : ModelBase
            public virtual Guid Id
                    return GetValue<Guid>(IdProperty);
                    SetValue(IdProperty, value);

            public static readonly PropertyData IdProperty = RegisterProperty<Country, Guid>(o => o.Id);

                configuration.HasProperty(x => x.Id).IsIdentity(KeyGenerator.Autoinc).WithDataAccessKind(DataAccessKind.ReadWrite).ToColumn("Id").IsNotNullable().HasColumnType("uniqueidentifier").HasPrecision(0).HasScale(0).HasDefaultValue();

    Catel supports entity framework but i want to use Telerik Data Access.
    How do i map the Id property with Fluent API without getting the MissingFieldException error? Thanks!
  2. Boris Georgiev
    Boris Georgiev avatar
    190 posts

    Posted 29 Oct 2014 Link to this post

    Hi Markus,

    Unfortunately you have bumped against a limitation in Telerik Data Access. The issue is that your base class generated by the Catel module is in different assembly than the other persistent classes and the Enhancer cannot find and process the fields from the base class.

    If any other questions arise, do not hesitate to contact us again.

    Boris Georgiev
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
Back to Top