How to Run Pluralization and Singularization of Names

Posts   
 
    
briankb
User
Posts: 51
Joined: 03-Jun-2007
# Posted on: 13-May-2008 06:09:20   

I've setup a few project properties to remove the table and field prefixes, that worked great. I then setup, as described in the help file, so the Pluralization and Singularization plugins are set as Bind Designer Events.

How do I get it to run so tables like Tickets is transformed to Ticket?

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 13-May-2008 10:11:10   

If you did bind the plugins to the Designer events.

For entity names. The name will be automatically singular when you add a new entity, otherwise you'll need to manually rename the entity.

That's because that's a System plugin not a Direct Runable plugin, so you can't run the plugin yourself, rather it should be hooked with some Designer events.

If you want you may, modify the plugin (source code comes with the SDK), to change its type to DirectRun.

briankb
User
Posts: 51
Joined: 03-Jun-2007
# Posted on: 13-May-2008 10:34:15   

ok so I should bind the plugins before it gets the entities from table?

so I should start a new project, assign the plugins, then get the entities?

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 13-May-2008 10:43:12   

Yes

briankb
User
Posts: 51
Joined: 03-Jun-2007
# Posted on: 13-May-2008 10:48:12   

excellent. thanks I'll give that a try.

Filomeno
User
Posts: 14
Joined: 24-Oct-2007
# Posted on: 28-May-2008 06:21:33   

And how bout if i want to modify the plugin in order to dynamically change the fields from singular to plural with variations?

Field Example: o student.Subject -> student.Subjects o application.Assemblys -> application.Assemblies o store.News -> store.News

how to achieve this without manually renaming the fields?

Thanks

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 28-May-2008 10:59:26   

Please check my answer in the following thread: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=13443

I'll close this thread, so we can follow up in one place.

Filomeno
User
Posts: 14
Joined: 24-Oct-2007
# Posted on: 28-May-2008 13:42:04   

I have already found the solution to my problem. After looking into plug-in I was able to follow the logic and binds to an event.

Thanks