You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "ana benko (JIRA)" <ji...@apache.org> on 2016/11/24 09:22:58 UTC

[jira] [Created] (CAY-2154) Migrate db: queries order

ana benko created CAY-2154:
------------------------------

             Summary: Migrate db: queries order
                 Key: CAY-2154
                 URL: https://issues.apache.org/jira/browse/CAY-2154
             Project: Cayenne
          Issue Type: Bug
          Components: Modeler
    Affects Versions: 4.0.M4
            Reporter: ana benko


1. Reverse Engineer db, that has eg. Salary dbEntity
2. Add eg. dept_id column to Salary
3. Add new Dept dbEntity, add id column
4. Join Salary and Dept entities by 1->many relationship. Save
5. Migrate Db, view Generated SQL tab

-> migrate first attempts to create FK, and only then adds new column
ALTER TABLE testdb.salary ADD FOREIGN KEY (dept_id) REFERENCES dept (id);
ALTER TABLE testdb.salary ADD COLUMN dept_id INT;
which results in a error



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)