You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Oleg Artyukevich (JIRA)" <ji...@apache.org> on 2014/03/04 16:07:20 UTC

[jira] [Updated] (CAY-1871) cdbimport: better naming of multiple relationships to the same entity

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

Oleg Artyukevich updated CAY-1871:
----------------------------------

    Attachment: cay1871.patch

Update naming strategy, as written in description.

> cdbimport: better naming of multiple relationships to the same entity
> ---------------------------------------------------------------------
>
>                 Key: CAY-1871
>                 URL: https://issues.apache.org/jira/browse/CAY-1871
>             Project: Cayenne
>          Issue Type: Improvement
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>         Attachments: cay1871.patch
>
>
> Say we have the following tables:
> team:
>   ID PK
> game: 
>   ID PK
>   HOME_TEAM_ID FK
>   AWAY_TEAM_ID FK
> cdbimport reverse engineering results in correct property names in Game ('homeTeam', 'awayTeam'), but confusingly named reverse relationships from Team ('games', 'games1'). Wonder if we can devise an algorithm to name reverse  reslationships something more meaningful based on the FK name too? Maybe 'homeTeamGames' / 'awayTeamGames'?
> This is not limited to 'cdbimport'. IIRC Modeler does a similar thing. It is just that fixing naming in the Modeler is easier.



--
This message was sent by Atlassian JIRA
(v6.2#6252)