Vanatec OpenAccess migration

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

    Posted 15 Apr 2009 Link to this post


    I'm trying to migrate a project from Visual Studio 2005 to 2008.

    Therefore I replaced the Vanatec OpenAccess with the lastet Telerik OpenAccess build and did all the steps from the article "Moving form Vanatec to Telerik OpenAccess".

    When I try to run my program I get the following exception:

    Class 'Astra.Mistra.Vmon.Common.DataModel.Persistence.Calendar' uses internal identity but has a pk field 'id'. --> DataModel, Version=, Culture=neutral, PublicKeyToken=null/namespace[Astra.Mistra.Vmon.Common.DataModel.Persistence]/class[Astra.Mistra.Vmon.Common.DataModel.Persistence.Calendar]

    The class is declared as


    Persistent(IdentityField = "id")]



    public class Calendar : VersionableObject




    The code runs with the same mapping under Vantec OpenAccess, any idea?

    When I try to change the mapping and open therefore  the "Forward Mapping" dialog, it opens, but when I try to select one of the persistent classes I get the following exception:

    Exception: Key cannot be null.


    Parameter name: key

    Generated by the method:

    System.Object get_Item(System.Object)


    Stack Trace:

    at System.Collections.Hashtable.get_Item(Object key)



    at notifyDatastore)



    at[] _mappingData, IDictionary _configProps)

    at Telerik.OpenAccess.Sdk.Addin.UserControls.MdProjectHelper.CreateMdProject(VAProject project)

    at Telerik.OpenAccess.Sdk.Addin.UserControls.MdProjectHelper.GetMdProject(VAProject project)

    at Telerik.OpenAccess.Sdk.Addin.UserControls.PersistentUserControl.ActivateUserControl(VAProject actualProject)

    at Telerik.OpenAccess.Sdk.Addin.UserControls.ClassViewControl.classTreeView_AfterSelect(Object sender, TreeViewEventArgs e)

    Exception Type:



    Is there something I have to remove/change from the existing "Vanatec" mapping?

    Thanks for your input!


  2. Jan Blessenohl
    Jan Blessenohl avatar
    707 posts

    Posted 16 Apr 2009 Link to this post

    Hello Roman,
    If the id field is in the base class you have to prepend it with the base class name. Can you please try:

    [Persistent(IdentityField = "")]

    Jan Blessenohl
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top