private void AddToCurrentJoin(PathExpressionParser.CollectionElement ce) { try { AddToCurrentJoin(ce.JoinSequence.ToJoinFragment().ToWhereFragmentString + ce.IndexValue.ToSqlString()); } catch (MappingException me) { throw new QueryException(me); } }
private string GetElementName(PathExpressionParser.CollectionElement element, QueryTranslator q) { string name; if (element.IsOneToMany) { name = element.Alias; } else { IType type = element.Type; if (type.IsEntityType) { //ie. a many-to-many string clazz = ((EntityType) type).GetAssociatedEntityName(); name = pathExpressionParser.ContinueFromManyToMany(clazz, element.ElementColumns, q); } else { throw new QueryException("illegally dereferenced collection element"); } } return name; }