Column key = lookup(rkn.getCol()); ObjectMap om = getMap(rkn); Column[] cols = new Column[] {key}; if (key.getTable().getForeignKey(cols) == null) { ObjectMap sm = om.getSuperMap(); Table table = null; while (sm != null) { table = sm.getTable(); if (table != null) { break; } sm = sm.getSuperMap(); } if (table == null) { throw new IllegalStateException ("unable to find supertable"); } fk(cols, table.getPrimaryKey()); } }
Column key = lookup(rkn.getCol()); ObjectMap om = getMap(rkn); om.setTable(key.getTable()); }
		public void onReferenceKey(ReferenceKeyNd rkn) {		    Column key = lookup(rkn.getCol());		    ObjectMap om = getMap(rkn);		    Column[] cols = new Column[] {key};		    if (key.getTable().getForeignKey(cols) == null) {			ObjectMap sm = om.getSuperMap();			Table table = null;			while (sm != null) {			    table = sm.getTable();			    if (table != null) {				break;			    }			    sm = sm.getSuperMap();			}			if (table == null) {			    throw new IllegalStateException				("unable to find supertable");			}			fk(cols, table.getPrimaryKey());		    }		}