related to bug 30016: upgrading from 2.50 to pi some FKs are missing
authorAsier Lostalé <asier.lostale@openbravo.com>
Tue, 26 May 2015 15:13:15 +0200
changeset 600 d369daa5dda0
parent 599 94360b8e364e
child 601 386d20e998ca
related to bug 30016: upgrading from 2.50 to pi some FKs are missing

added test case
src-test/src/org/openbravo/dbsm/test/model/recreation/OtherRecreations.java
--- a/src-test/src/org/openbravo/dbsm/test/model/recreation/OtherRecreations.java	Tue May 26 12:52:33 2015 +0200
+++ b/src-test/src/org/openbravo/dbsm/test/model/recreation/OtherRecreations.java	Tue May 26 15:13:15 2015 +0200
@@ -185,6 +185,17 @@
     updateDatabase("recreation/FK41.xml", "data/createDefault", Arrays.asList("TEST"));
   }
 
+  /**
+   * FKs from recreated to non recreated tables in case none of them are in AD are lost when
+   * updating. See issue #30016
+   */
+  @Test
+  public void fkFromRecreatedTable() throws SQLException {
+    resetDB();
+    updateDatabase("recreation/FK4.xml");
+    updateDatabase("recreation/FK41.xml");
+  }
+
   @Test
   public void newTableWithDiffDefaultAndOCD() {
     resetDB();