cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ana benko (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAY-2154) Migrate db: queries order
Date Thu, 24 Nov 2016 09:22:58 GMT
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)

Mime
View raw message