Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Designer> Singular to Plural Fields
 

Pages: 1
Designer
Singular to Plural Fields
Page:1/1 

  Print all messages in this thread  
Poster Message
Filomeno
User



Location:
Davao City, Philippines
Joined on:
24-Oct-2007 07:50:10
Posted:
14 posts
# Posted on: 27-May-2008 13:12:01.  
Hello Experts,
Is it possible to have a template for me to include some conditional statement in pluralizing a fields that are mapped from relationship? I badly need to know this feature so that I could achieve some of my goals in renaming the fields. I know I can achieve this by explicitly rename the field but it is somehow helpful to have a template or some area to be configured to have it automatic after refreshing the catalog.
        a) In CustomerEntity
             o Rename Order Field to Orders
        b) In OrderEntity
             o Rename OrderLine Field To OrderLines

I simply achieve this by putting 's' at the end of FieldMappedOnOneToMannyPattern property of the project. But since there are fields that ends with 'y', 's', or 'ss', just like having foreign tables 'News', "Address' or 'Assembly'. So there will be fields like 'Addresss', 'Newss', or 'Assemblys' which is not good. How is it possible to have a good plural field name?
Instead of having:
     o Addresss, should be changed to Addresses
     o News, stick with it
     o Assembly, should be changed to Assemblies

Thanks
  Top
goose
User



Location:
Central America
Joined on:
06-Aug-2007 18:21:05
Posted:
385 posts
# Posted on: 27-May-2008 19:44:40.  
You can customize the generation templates, please see Template Studio in the documentation. Keep in mind that you must implement the pluralizing algorithm, I'm sure there are plenty examples of this in the web.



gansodesoya  Top
Filomeno
User



Location:
Davao City, Philippines
Joined on:
24-Oct-2007 07:50:10
Posted:
14 posts
# Posted on: 28-May-2008 04:43:33.  
Which template do i need to customize with template studio?

Thanks
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14464 posts
# Posted on: 28-May-2008 10:58:22.  
I think all the pluralization rules have been taken care of, so you don't need to modify anything.


Anyway the following is copied from the manual:
Quote:
These plug-ins are based on the Castle Project's Inspector class for singularization/pluralization of English names. As this is an Open Source project, the sourcecode of this class is available in the SDK sourcecode, available to all LLBLGen Pro customers in the customer area.


Hint: check the Inflector.cs file for all rules. (SDK\Sourcecode\Plugins\)


  Top
Filomeno
User



Location:
Davao City, Philippines
Joined on:
24-Oct-2007 07:50:10
Posted:
14 posts
# Posted on: 28-May-2008 13:42:07.  
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
  Top
Pablo
User



Location:
Sneek
Joined on:
21-Mar-2005 01:17:52
Posted:
81 posts
# Posted on: 19-Nov-2013 10:57:04.  
sorry ...

  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.