private DbORTable findParentTable(DbORTable t1) throws DbException { DbORTable parent = null; DbRelationN relN = t1.getAssociationEnds(); DbEnumeration enu = relN.elements(DbORAssociationEnd.metaClass); while (enu.hasMoreElements()) { DbORAssociationEnd end = (DbORAssociationEnd) enu.nextElement(); int mult = end.getMultiplicity().getValue(); if (mult == SMSMultiplicity.EXACTLY_ONE) { DbORAssociationEnd oppEnd = end.getOppositeEnd(); DbORAbsTable t = oppEnd.getClassifier(); if (t instanceof DbORTable) { parent = (DbORTable) t; break; } } // end if } // end while enu.close(); return parent; }