cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAY-1871) cdbimport: better naming of multiple relationships to the same entity
Date Thu, 19 Sep 2013 07:26:52 GMT

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

Andrus Adamchik updated CAY-1871:
---------------------------------

    Description: 
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.

  was:
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 may not be limited to 'cdbimport' (IIRC Modeler does a similar thing)

    
> 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
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message