[ 
https://issues.apache.org/jira/browse/CAY-2980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrus Adamchik updated CAY-2980:
---------------------------------
    Description: 
Current model name generation is based on an old third-party "inflector" 
library. Let's internalize these algorithms and get rid of the dependency and 
try improve name generation intelligence.  

1. Get rid of the old inflector. 
2. Implement an internal pluralization based on a common two-form English 
inflection algorithm. It is not fully backwards compatible. Hopefully we didn't 
lose and pluralization rules, and looks like we fixed a few ("logos" instead of 
"logoes", "equipment" instead of "equipments")
3. Implement fk-based to-many relationship naming ("home_team_id" -> 
"homeGames")
4. Check for Java reserved words
5. Strip common prefixes from relationships ("pp_table" -> "tables" instead of 
"ppTables", if "pp_" is used for the entire model)

  was:
Current model name generation is based on an old third-party "inflector" 
library. Let's internalize these algorithms and get rid of the dependency and 
try improve name generation intelligence.  

1. Get rid of the old inflector. 
2. Implement an internal pluralization based on a common two-form English 
inflection algorithm. It is not fully backwards compatible. Hopefully we didn't 
lose and pluralization rules, and looks like we fixed a few ("logos" instead of 
"logoes", "equipment" instead of "equipments"), 


> Improve model name generation
> -----------------------------
>
>                 Key: CAY-2980
>                 URL: https://issues.apache.org/jira/browse/CAY-2980
>             Project: Cayenne
>          Issue Type: Task
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>            Priority: Minor
>             Fix For: 5.0-M3
>
>
> Current model name generation is based on an old third-party "inflector" 
> library. Let's internalize these algorithms and get rid of the dependency and 
> try improve name generation intelligence.  
> 1. Get rid of the old inflector. 
> 2. Implement an internal pluralization based on a common two-form English 
> inflection algorithm. It is not fully backwards compatible. Hopefully we 
> didn't lose and pluralization rules, and looks like we fixed a few ("logos" 
> instead of "logoes", "equipment" instead of "equipments")
> 3. Implement fk-based to-many relationship naming ("home_team_id" -> 
> "homeGames")
> 4. Check for Java reserved words
> 5. Strip common prefixes from relationships ("pp_table" -> "tables" instead 
> of "ppTables", if "pp_" is used for the entire model)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to