Problem with horizontal inheritance

Thread is closed for posting
2 posts, 1 answers
  1. Christian
    Christian avatar
    81 posts
    Member since:
    Aug 2008

    Posted 03 Mar 2010 Link to this post

    I have an abstract base class and then define the key. I can't do the horizontal inheritance. I get the following error message:

    Fehler 3 OpenAccess Error: Telerik.OpenAccess: Updating SQL schema failed. Unknown inheritance strategy: 3 for Berlin.Polizei.INGO.Daten.Basis.Adresse Polizei.Berlin.INGO.Daten.Basis   

    If I turn off the update of the database, there is no error message.

    Here ist my app.config:
    <?xml version="1.0"?>  
    <section name="openaccess" type="Telerik.OpenAccess.Config.ConfigSectionHandler, Telerik.OpenAccess.Config, Version=, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342" requirePermission="false" /> 
    <openaccess xmlns="">  
    <references /> 
    <connection id="INGO_TEST">  
    <backendconfiguration id="mssqlConfiguration" backend="mssql">  
    <mappings current="mssqlMapping">  
    <mapping id="mssqlMapping">  

    My base class has the following source code:
    using System;  
    using Telerik.OpenAccess;  
    namespace Polizei.Berlin.INGO.Daten.Basis  
        [Persistent(IdentityField = "id")]  
        public abstract class MetaDaten   
            public MetaDaten()  
            protected Guid id ;  
            public Guid ID  
                get { return id; }  
                set { id = value; }  
            private string bezeichnung;  
            public string Bezeichnung  
                get { return bezeichnung; }  
                set { bezeichnung = value; }  
            private DateTime aenderung;  
            public DateTime Aenderung  
                get { return aenderung; }  
                set { aenderung = value; }  
            private DateTime erstellungsdatum;  
            public DateTime Erstellungsdatum  
                get { return erstellungsdatum; }  
                set { erstellungsdatum = value; }  
     And a last my adress-class:
    using Polizei.Berlin.INGO.Daten.Basis;  
    using Telerik.OpenAccess;  
    namespace Berlin.Polizei.INGO.Daten.Basis  
        public class Adresse : MetaDaten  
            public  Adresse()  
            private string strasse;  
            private string hausnummer;  
            private string plz;  
            private string ort;  
            private string geoKorordinate;  
            public string Strasse  
                get { return strasse; }  
                set { strasse = value; }  
            public string Hausnummer  
                get { return hausnummer; }  
                set { hausnummer = value; }  
            public string Plz  
                get { return plz; }  
                set { plz = value; }  
            public string Ort  
                get { return this.ort; }  
                set { this.ort = value; }  
            public string GeoKorordinate  
                get { return geoKorordinate; }  
                set { geoKorordinate = value; }  

    If I try to start the wizard the system produce the following error message:

    Fehler 3 OpenAccess: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.  
       bei OpenAccessRuntime.Relational.metadata.RelationalClass.SetupInMemoryHandling()  
       bei OpenAccessRuntime.metadata.ClassMetaData.SetupInMemoryHandling()  
       bei OpenAccessRuntime.metadata.MetaDataBuilder.SetupInMemoryHandling(ClassMetaData[] classes)  
       bei OpenAccessRuntime.metadata.MetaDataBuilder.buildMetaData(DataObjectsRoot[] roots, Boolean ignoreNoClasses)  
       bei OpenAccessRuntime.Relational.RelationalMetaDataBuilder.buildMetaData(DataObjectsRoot[] roots, Boolean ignoreNoClasses)  
       bei OpenAccessRuntime.Relational.RelationalStorageManagerFactory..ctor(StorageManagerFactoryBuilder b)  
       bei OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL()    

    I use VS 2008 and the lastet version of your components.
    For help would be appreciated.


  2. Answer
    Jan Blessenohl
    Jan Blessenohl avatar
    707 posts

    Posted 03 Mar 2010 Link to this post

    Hi Christian,
    It is not a good idea to specify the horizontal mapping as global strategy. Please specify it directly at the MetaDaten class. The identity mechanism must be specified at the derived class. The forward mapping wizard should work in that case.

    Best wishes,
    Jan Blessenohl
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top