Pluralization of Relations for an existing project

Posts   
 
    
tomahawk
User
Posts: 169
Joined: 02-Mar-2005
# Posted on: 28-Jul-2009 20:11:49   

LLBLGenPro v2.6 6/6/08 designer

I have an existing project, and I'd like to pluralize my ManyToMany relations.

I added the event bindings, according to the documentation, and changed my FieldMappedOnManyToManyPattern in Properties to {$EndEntityName$P}.

However, when I refresh the catalog, nothing gets renamed.

How can I get my relations pluralized for an existing project, I've built several typed lists and don't want to have to recreate my project from scratch.

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 28-Jul-2009 22:32:52   

Just checking - did you set the value in File-Preferences or Project-Properties ?

tomahawk
User
Posts: 169
Joined: 02-Mar-2005
# Posted on: 28-Jul-2009 23:23:47   

It is set in both places. It does work when Adding/Re-Adding the entities. I have done quite a bit of work on the entities (including hierarchies) so I'd like to avoid doing this. Is there no other option?

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 29-Jul-2009 08:44:09   

You should run the plugin.

Please check this documentation section: Working with plug-ins

tomahawk
User
Posts: 169
Joined: 02-Mar-2005
# Posted on: 29-Jul-2009 09:50:56   

Reading the documentation, and using the designer as described is what prompted the question. How do I run the pluralization plugin on an existing project?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 29-Jul-2009 16:57:54   

It's not build in, but you can easily do this. Check the plugin for toggling the hidden flag for m:n relations. This gives you insight how to traverse all relations.

To produce a new name for Field mapped onto a relation, you've to set the UtilizingPropertyName of a relation object. You produce a new one by calling GeneralUtils.CreateUtilizingPropertyName(relation, projectProperties);

the projectProperties are the properties object from the active project. Set it by calling SetUtilizingPropertyNameManually() so refreshes won't overwrite it if you have set the property to sync names.

Another way, is to set the sync names properties in the PROJECT and refresh the catalog. However, that will also overwrite other names you might have, so it might not be the best choice.

Frans Bouma | Lead developer LLBLGen Pro