Entity Classes declare AlreadyFetched Twice

Posts   
 
    
Kevinksy
User
Posts: 27
Joined: 05-Jun-2013
# Posted on: 13-Sep-2013 16:26:02   

LLBL 4.0 Final Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production Database first Code Generation from one Schema Visual Studio 2010 Target Framework LLBL Gen Pro Runtime Framework Target language C#, platform .NET 4.0 Template Self Servicing Selected Preset SD.Presets.SelfServicing.General

I seem to have made some change in LLBL that my notes do not cover. I was able to generate a Visual Studio solution that would compile and build without errors....but that was last week.

Now when I use the same settings on the same database for a new project or an existing one every Entity Class is considered to have the same error "Member with the same name is declared already". Technically this is correct as the sample code shows below from line 609 of CaseDateActivityEntity.cs

        /// <summary>Gets / Sets the lazy loading flag if the property CaseActivity already has been fetched. Setting this property to false when CaseActivity has been fetched
        /// will set CaseActivity to null as well. Setting this property to true while CaseActivity hasn't been fetched disables lazy loading for CaseActivity</summary>
        [Browsable(false)]
        public bool AlreadyFetchedCaseActivity
        {
            get { return _alreadyFetchedCaseActivity;}
            set 
            {
                if(_alreadyFetchedCaseActivity && !value)
                {
                    this.CaseActivity = null;
                }
                _alreadyFetchedCaseActivity = value;
            }
        }

and from line 655 of the same file

        #region Included code

        /// <summary>
        /// Gets whether or not the related entity has already been fetched.
        /// </summary>
        public bool AlreadyFetchedCaseActivity
        {
            get { return _alreadyFetchedCaseActivity; }
        }

Obviously this is something I have done, some setting somewhere but I reverted all the binding changes and templates I had added to no effect.

Any suggestions?

Thanks

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 14-Sep-2013 07:48:05   

Honestly this looks like you have modified the built-in templates, because there is no other reason I can see that produces this code you have.

My advise: Reinstall LLBLGen, open your project and regenerate the code.

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39912
Joined: 17-Aug-2003
# Posted on: 14-Sep-2013 17:19:59   

ALso, you don't have any templatebindings files located in the additional templates folder specified in the project settings?

You can see which templatebindings files are in-scope by clicking 'advanced' in the code generation configuration dialog and then on the second tab, you can see which templates are 'active' and will be used.

Frans Bouma | Lead developer LLBLGen Pro
Kevinksy
User
Posts: 27
Joined: 05-Jun-2013
# Posted on: 16-Sep-2013 18:26:06   

Yes, the problem is with the custom templates the previous developer supplied. Once I removed them the project compiled normally. Thank you