Beispiel #1
0
 public void doSecondPass(Map persistentClasses) throws MappingException {
   Value element = collection.getElement();
   DependantValue dep = null;
   String oldFkName = null;
   if (element instanceof DependantValue) {
     dep = (DependantValue) element;
     oldFkName = dep.getForeignKeyName();
     dep.setForeignKeyName(
         "none"); // Workaround to avoid DependantValue to create foreignkey just because
                  // reference columns are not the same + no need to create keys already in the
                  // db!
   }
   super.doSecondPass(persistentClasses);
   if (dep != null) {
     dep.setForeignKeyName(oldFkName);
   }
 }