Is this a bug?

Posts   
 
    
Jeff M
User
Posts: 250
Joined: 04-Aug-2004
# Posted on: 02-Sep-2005 07:41:49   

TemplateStudio March 22, 2005 LLBLGenPro August 5, 2005

I'm trying to create a script that uses that field name of related fields (under the "Fields on Related Fields" tab). The actual related field name is RelatedEntity.Description however, I've changed the field name to "NewDescription" so as to not conflict with the "Description" field in the primary entity. For this purpose, I'm using the "RelatedEntityFieldName" macro in TemplateStudio.

However, instead of generating "NewDescription", the generator is generating "Description". The entity does not compile because two fields with the same name are created.

What am I doing wrong?

Thanks, Frans.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 02-Sep-2005 09:49:51   

Could you please paste the template code you're using? Perhaps you're using the wrong TDL statement.

Frans Bouma | Lead developer LLBLGen Pro
Jeff M
User
Posts: 250
Joined: 04-Aug-2004
# Posted on: 02-Sep-2005 18:03:31   

Otis wrote:

Could you please paste the template code you're using? Perhaps you're using the wrong TDL statement.

<[Foreach RelatedEntityField CrLf]>public <[TypeOfField]> [<RelatedEntityFieldName ]>
{
       get { return _<[RelatedEntityFieldName]> ; }
       set { _<[RelatedEntityFieldName]> = value ; }
}<[NextForeach]>

RelatedEntityFieldName is generating the actual RelatedEntityFieldName instead of the modified field name that I enter into LLBLGen.

Thanks.

Jeff

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 02-Sep-2005 20:46:19   

Use <[MappedFieldNameRelatedField]> instead simple_smile

to camel case it for your variable, use <[CaseCamel MappedFieldNameRelatedField]>

Frans Bouma | Lead developer LLBLGen Pro
Jeff M
User
Posts: 250
Joined: 04-Aug-2004
# Posted on: 02-Sep-2005 22:10:15   

Worked! Thanks.