boolean collection = true; Object obj = getEmitted(jpn.getParent()); if (obj != null && obj instanceof Property) { Property prop = (Property) obj; if (!prop.isCollection()) { collection = false; } }  if (collection) { unique(jpn, new Column[] { lookup(from), lookup(to) }, true); } else { unique(jpn, new Column[] { lookup(from) }, true); } }
if (from.isUniqueKey()) { unique(toNd, new Column[] { to }, true); fk(join, false); } else if (to.isUniqueKey()) { unique(fromNd, new Column[] { from }, true); fk(join, true); } else { m_errors.fatal (jpn, "join path does not connect to a primary key"); return; } }
		public void onJoinPath(JoinPathNd jpn) {		    List joins = jpn.getJoins();		    if (joins.size() != 2) {			return;		    }		    ColumnNd from = ((JoinNd) joins.get(0)).getTo();		    ColumnNd to = ((JoinNd) joins.get(1)).getFrom();                    boolean collection = true;                    Object obj = getEmitted(jpn.getParent());                    if (obj != null && obj instanceof Property) {                        Property prop = (Property) obj;                        if (!prop.isCollection()) {                            collection = false;                        }                    }                    if (collection) {                        unique(jpn, new Column[] { lookup(from), lookup(to) },                               true);                    } else {                        unique(jpn, new Column[] { lookup(from) }, true);                    }		}