/* */ {
/* 788 */ JDBCFieldBridge[] parentFkFields = cmrField.getForeignKeyFields();
/* 789 */ int i = 0;
/* 790 */ while (i < parentFkFields.length)
/* */ {
/* 792 */ JDBCFieldBridge parentField = parentFkFields[(i++)];
/* 793 */ JDBCFieldBridge childField = (JDBCFieldBridge)childEntity.getFieldByName(parentField.getFieldName());
/* 794 */ getJoinClause(parentField, parentAlias, childField, childAlias, buf);
/* 795 */ if (i < parentFkFields.length) {
/* 796 */ buf.append(" AND ");
/* */ }
/* */ }
/* */ }
/* */ else
/* */ {
/* 802 */ JDBCFieldBridge[] childFkFields = cmrField.getRelatedCMRField().getForeignKeyFields();
/* 803 */ int i = 0;
/* 804 */ while (i < childFkFields.length)
/* */ {
/* 806 */ JDBCFieldBridge childField = childFkFields[(i++)];
/* 807 */ JDBCFieldBridge parentField = (JDBCFieldBridge)parentEntity.getFieldByName(childField.getFieldName());
/* */
/* 810 */ getJoinClause(parentField, parentAlias, childField, childAlias, buf);
/* 811 */ if (i >= childFkFields.length)
/* */ continue;
/* 813 */ buf.append(" AND ");