new generated code is missing some data

Posts   
 
    
lss
User
Posts: 25
Joined: 23-Dec-2008
# Posted on: 23-Mar-2009 14:49:12   

On our application, we are using the generated code form the original LLBLGen Pro project, but I do not know where the project is actually stored

I have to update some of the tables in the database, and since I don't have the original LLBLGen Pro project, I have created a new LLBLGen Pro project using the actual database that we are using on our application. Most parts of the application work and only need minor name chenges. Howerever there is one part that seems to be missing from the EntityClasses in the new LLBLGen project. Both old and new LLBLGen Pro EntityClasses, we have a file called "ListClericalSkillsEntity.cs", and on the new Generated code, we donot have related field called "Catagory" which exists in the original Generated code as

/// <summary> Gets / Sets the value of the related field this.ListClericalSkillCategories.Category.</summary>
        public virtual System.String Category
        {
            get
            {
                ListClericalSkillCategoriesEntity relatedEntity = this.ListClericalSkillCategories;
                if(relatedEntity!=null)
                {
                    return relatedEntity.Category;
                }
                else
                {
                    return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
                }
            }
            set
            {
                ListClericalSkillCategoriesEntity relatedEntity = this.ListClericalSkillCategories;
                if(relatedEntity!=null)
                {
                    relatedEntity.Category = value;
                }               
            }
        }

The part showing above is not exist in the new generated code at all, and that made part of my application working improperly.

Would you please explain why some data are missing in new generated code eventhough we use the same database. And how to add that part into the new generated code.

Thanks, Lss

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 23-Mar-2009 14:55:41   

This looks like code generated for a field mapped on a related field. Which you should define in the designer before generating the code.

Please check Fields mapped on related fields sub tab

lss
User
Posts: 25
Joined: 23-Dec-2008
# Posted on: 23-Mar-2009 20:07:46   

Thanks Walaa, that's exactly what the problem was..