} else {
NSMutableArray relationshipCache = new NSMutableArray();
for (Enumeration e = entity.relationships().objectEnumerator(); e.hasMoreElements();) {
EORelationship relationship = (EORelationship)e.nextElement();
if (relationship.userInfo() != null
&& ERXValueUtilities.booleanValue(relationship.userInfo().objectForKey(SortedJoinRelationshipUserInfoKey))) {
relationshipCache.addObject(relationship);
}
}
if (relationshipCache.count() != 2)
throw new RuntimeException("Did not find two relationships with user info entries: " +