Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1205

Renaming DbRelationships breaks different ObjRelationships

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.0M5
    • 3.0M6
    • Modeler
    • None

    Description

      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.

      Attachments

        Activity

          People

            antidote Andrey Razumovsky
            jschmidt71 Joseph Schmidt
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: