How to add a prefix to field names?

Posts   
 
    
ahmetmeral
User
Posts: 4
Joined: 23-Jul-2008
# Posted on: 12-May-2009 23:26:41   

hi

How to add a prefix to field names?

ex : Previous version = ProductId Next version = FldProductId or FieldProductId

rdhatch
User
Posts: 198
Joined: 03-Nov-2007
# Posted on: 13-May-2009 02:57:51   

If I understand you correctly, You can simply rename fields manually in the Designer. After entering Edit mode for your Entity, on the EntityFields tab, Highlight the field you wish to rename, look at the bottom of the designer and you can change the name of the field that will be generated.

If you would like to do this automatically, perhaps someone else who has done this before could help you further.

Ryan

ahmetmeral
User
Posts: 4
Joined: 23-Jul-2008
# Posted on: 13-May-2009 08:11:12   

thank you,

I want to make automaticlly,you said someone made this before,and can i learen who made this please?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 13-May-2009 09:28:11   

Why do you want to prefix field names?

Anyway, modify the code generation tamplates or create a plugin to rename fields in the designer.

ahmetmeral
User
Posts: 4
Joined: 23-Jul-2008
# Posted on: 13-May-2009 12:25:25   

Why do you want to prefix field names? 1-not change the names on the table for fields 2-while coding , easier to set data in fıealds etc..

Do you have any examples or articles about this topic?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 13-May-2009 14:33:24   

1-not change the names on the table for fields

I don't understand, you mean you database column names contain the "fld" prefix, and you want the generated code to have exactly the same name, if this is the case, then you should know that this is LLBLgen Pro default behaviour unless you specified a strip pattern for the EntityFieldNameStripPatter Project Property in the Designer. If that's not what you want, then definitly i didn't catch what you are after.

2-while coding , easier to set data in fıealds etc..

Could you show soem code examples to prove your point here.

ahmetmeral
User
Posts: 4
Joined: 23-Jul-2008
# Posted on: 17-May-2009 20:10:05   

thank you Walaa,

problem was solved with the plug-in,I add as attachment plug-in

Attachments
Filename File size Added on Approval
ST.LLBLGen.Prefix.Plugin.rar 11,645 17-May-2009 20:10.19 Approved
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39951
Joined: 17-Aug-2003
# Posted on: 18-May-2009 10:11:37   

Thanks for sharing! simple_smile

Frans Bouma | Lead developer LLBLGen Pro