This question is locked. New answers and comments are not allowed.
Hi,
I am struggling to get a rather simple class/data mapping working out and am not finding a resolution in the various documentation sources.
I have a class:
[Telerik.OpenAccess.Persistent(IdentityField = "Id")] |
public partial class Site |
{ |
private Guid _id; // pk |
private string _baseUrl; |
private string _siteName; |
private string _theme; |
} |
... with the "other side" of the partial class looking like:
public partial class Site : ISite |
{ |
//The 'no-args' constructor required by OpenAccess. |
public Site() |
{ |
} |
[Telerik.OpenAccess.FieldAlias("id")] |
public Guid Id |
{ |
get { return _id; } |
set { this._id = value; } |
} |
[Telerik.OpenAccess.FieldAlias("baseUrl")] |
public string BaseUrl |
{ |
get { return _baseUrl; } |
set { this._baseUrl = value; } |
} |
[Telerik.OpenAccess.FieldAlias("siteName")] |
public string SiteName |
{ |
get { return _siteName; } |
set { this._siteName = value; } |
} |
[Telerik.OpenAccess.FieldAlias("theme")] |
public string Theme |
{ |
get { return _theme; } |
set { this._theme = value; } |
} |
} |
All very simple.
And yet I get the compile error:
Error 102 OpenAccess Error: The IdentityField specified is not declared on this class. [class=ProgramX.Xsist.Core.Data.Site] [field=Id] D:\dev_px\Xsist\ProgramX.Xsist\Site.cs 10
Do I not specify the Persistant attribute, which should define a one-way primary key? Your documentation at http://www.telerik.com/help/openaccess-orm/object-identity-single-field.html also does not tell me how to get to that window. And despite searching for it, I can't find it. I'm using the Express version, until I decide to upgrade my sub, depending on whether I get on with it.