You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrey Razumovsky (JIRA)" <ji...@apache.org> on 2009/05/11 13:23:45 UTC
[jira] Commented: (CAY-1205) toOne change + rename field leads to
project that doesn't validate anymore
[ https://issues.apache.org/jira/browse/CAY-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12707975#action_12707975 ]
Andrey Razumovsky commented on CAY-1205:
----------------------------------------
The actual reason of the problem is that Cayenne in DbEntity.dbRelationshipChanged() changes path of ALL rels in map with same name, which is obviously incorrect.
I actually don't understand why ObjRelationship uses String representation of the path instead-of references (List<DbRelationship>). I could try reconsider inner representation of ObjRelationship if noone minds.
Also note that currently NamingStrategy only acts withing reverse-engineering, therefore exists Error 1 mentioned here.
> toOne change + rename field leads to project that doesn't validate anymore
> --------------------------------------------------------------------------
>
> Key: CAY-1205
> URL: https://issues.apache.org/jira/browse/CAY-1205
> Project: Cayenne
> Issue Type: Bug
> Components: CayenneModeler GUI
> Affects Versions: 3.0M5
> Reporter: Joseph Schmidt
> Priority: Critical
>
> Cayenne modeler seems to behave very strange after changing the relationship type from toMany at toOne: when doing a relationship renamename, it does not validate anymore. It complaints that "ObjRelationship xxx has no DbRelationship mapping", but there is - i.e. all names are consistent.
> Scenario:
> - reverse engineer a database with many FKs .
> - set for some db entities the relationship from toMany to toOne (since they're supposed to be one to one).
> - Error 1: Cayenne Modeler doesn't seem to pick this change with the "smart naming strategy" - the field names still remain at plural (exactly how were generated during the reverse engineering process)
> - trying to manually change those field names from plural to singular from
> - Error 2: project does not validate anymore after this (even if every renaming was done consistently in DB and OBJ relationships too).
> Other usability problem:
> - in the Attributes tab of an entity, I can see the corresponding DB fields (so I know it was selected correctly), but in the relationships entity tab I can't see this anymore :(, so I can't possibly know why is cayenne complaining about validity (a visual inspection of all fields in CM shows that it should be correct) :(.
> Also the Log Console shows no errors - only the usual blue logging messages.
> What can I do?
> thanks,
> Joseph.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.