Missing ModelInfoProviderSingleton

Posts   
 
    
cadsjo
User
Posts: 17
Joined: 30-Nov-2015
# Posted on: 27-Mar-2023 09:15:19   

Dear,

I have a llblgen project upgraded from version 4.2 to 5.10. It looks like most of the upgrading went fine, but I am still missing a ModelInfoProviderSingleton class. It is situated in the relationClasses

public partial class AdviesRelations: RelationFactory
    {
        /// <summary>Returns a new IEntityRelation object, between AdviesEntity and StapEntity over the 1:n relation they have, using the relation between the fields: Advies.AdviesId - Stap.AdviesId</summary>
        public virtual IEntityRelation StapEntityUsingAdviesId
        {
            get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "Stappen", true, new[] { AdviesFields.AdviesId, StapFields.AdviesId }); }
        }

        /// <summary>Returns a new IEntityRelation object, between AdviesEntity and StappenplanEntity over the 1:n relation they have, using the relation between the fields: Advies.AdviesId - Stappenplan.AdviesId</summary>
        public virtual IEntityRelation StappenplanEntityUsingAdviesId
        {
            get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "Stappenplannen", true, new[] { AdviesFields.AdviesId, StappenplanFields.AdviesId }); }
        }

Where should this class be situated? I checked my references to the new version dll's twice, but no solution yet.

Can anyone give me a hint?

Regards, John

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39612
Joined: 17-Aug-2003
# Posted on: 27-Mar-2023 09:37:45   

These are now present in the generated entity classes at the bottom simple_smile So in this particular example, it's located in the AdviesEntity class file

Frans Bouma | Lead developer LLBLGen Pro
cadsjo
User
Posts: 17
Joined: 30-Nov-2015
# Posted on: 27-Mar-2023 09:45:16   

Otis wrote:

These are now present in the generated entity classes at the bottom simple_smile So in this particular example, it's located in the AdviesEntity class file

I indeed expected that, but I have an empty constructor for the StaticAdviesRelations. See below

        /// <summary>Returns a new IEntityRelation object, between AdviesEntity and TriagetypeEntity over the m:1 relation they have, using the relation between the fields: Advies.TriagetypeId - Triagetype.TriagetypeId</summary>
        public virtual IEntityRelation TriagetypeEntityUsingTriagetypeId
        {
            get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.ManyToOne, "Triagetype", false, new[] { TriagetypeFields.TriagetypeId, AdviesFields.TriagetypeId }); }
        }

    }
    
    /// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
    internal static class StaticAdviesRelations
    {
        internal static readonly IEntityRelation StapEntityUsingAdviesIdStatic = new AdviesRelations().StapEntityUsingAdviesId;
        internal static readonly IEntityRelation StappenplanEntityUsingAdviesIdStatic = new AdviesRelations().StappenplanEntityUsingAdviesId;
        internal static readonly IEntityRelation WeergaveAdviesEntityUsingAdviesIdStatic = new AdviesRelations().WeergaveAdviesEntityUsingAdviesId;
        internal static readonly IEntityRelation AdviesTypeEntityUsingAdviestypeIdStatic = new AdviesRelations().AdviesTypeEntityUsingAdviestypeId;
        internal static readonly IEntityRelation TriagetypeEntityUsingTriagetypeIdStatic = new AdviesRelations().TriagetypeEntityUsingTriagetypeId;

        /// <summary>CTor</summary>
        static StaticAdviesRelations() { }
    }
}
cadsjo
User
Posts: 17
Joined: 30-Nov-2015
# Posted on: 27-Mar-2023 09:58:29   

Hi Otis,

I think I found it.

There are 2 new .csproj files generated. I am going to use those. And there is a ModelInfoProviderSingleton class..

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39612
Joined: 17-Aug-2003
# Posted on: 27-Mar-2023 12:53:19   

cadsjo wrote:

Hi Otis,

I think I found it.

There are 2 new .csproj files generated. I am going to use those. And there is a ModelInfoProviderSingleton class..

You might have missed the important remark about the migration of the csproj files. https://www.llblgen.com/Documentation/5.10/LLBLGen%20Pro%20RTF/migratingcode.htm#migrating-generated-code-from-v5.3-to-v5.4

Frans Bouma | Lead developer LLBLGen Pro
cadsjo
User
Posts: 17
Joined: 30-Nov-2015
# Posted on: 27-Mar-2023 13:10:16   

Yes, I think so..

Thanks!!