public bool VisitPath(QueryContext context, PropertyInfo[] path, out BracketedName alias, out PropertyMap map) { var entity = EntityMap; alias = Alias; map = null; for (var i = 0; i < path.Length - 1; i++) { var prop = path[i]; var item = JoinGroup.FindJoin(prop); if (item == null) { var reference = entity.FindReferenceMap(prop); if (reference == null) return false; item = JoinGroup.AddJoin(alias, context.NextAlias(), reference); } alias = item.ToAlias; entity = item.ReferenceMap.To; } var last = path[path.Length - 1]; map = entity.FindPropertyMap(last) ?? entity.FindReferenceMap(last); return true; }
public Select(QueryContext context) : this(context.GetEntityMap(context.EntityType), context.NextAlias()) { }