I have 2 classes, Persona and Alumno like this
namespace FormaModel { [Persistent(IdentityField = "id", VersionField = "version")] public abstract class Persona { protected int id; [FieldAlias("id")] public int Id { get { return id; } set { id = value; } } private string nombre; public string Nombre { get { return nombre; } set { nombre = value; } } protected short version; [FieldAlias("version")] public short VERSION { get { return version; } set { version = value; } } } } namespace FormaModel { [Telerik.OpenAccess.Persistent()] public class Alumno : Persona { private int clase; public int Clase { get { return clase; } set { clase = value; } } } } I use a RadGrid to show all objects from class Alumno I can also add a new one but, when I try to update i always get the following error
Changes are not possible if the primary key fields are not visible.
Please specify the id and version fields in the persistent attribute.
[Telerik.OpenAccess.Persistent(IdentityFied="id", VersionField="version"]
[UnsupportedException: Changes are not possible if the primary key fields are not visible.
Please specify the id and version fields in the persistent attribute.
[Telerik.OpenAccess.Persistent(IdentityFied="id", VersionField="version"]]
Telerik.OpenAccess.RT.DataSource.OpenAccessDataSourceView.CreateObjectId(IDictionary keys, String& oldVersion) +99
Telerik.OpenAccess.RT.DataSource.OpenAccessDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +215
System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +92
Telerik.Web.UI.GridTableView.PerformUpdate(GridEditableItem editedItem, Boolean suppressRebind) +353
Telerik.Web.UI.GridCommandEventArgs.ExecuteCommand(Object source) +1996
In OpenAccess guide it says you just need to specify identity and version in the base class, not in subclasses so I don't know.
Id and version fileds are protected in the base class so visible from the subclass.
I have used OpneAccess 2009.02 version (purchased) and I have now installed trial 2010.1 and I still have the same problem.
Any ideas about what I'm doing wrong?
Thanks
Miguel