protected override IList <long> GetObjectIds() { if (this.Strategy != null) { if (this.AssociationType != null) { return(this.Strategy.ExtentGetCompositeAssociations(this.AssociationType)); } else { return(this.Strategy.Roles.GetCompositesRole(this.RoleType).ToList()); } } this.session.Flush(); var statement = new ExtentStatementRoot(this); var objectIds = new List <long>(); var alias = this.BuildSql(statement); using (var command = statement.CreateDbCommand(alias)) { if (command != null) { using (var reader = command.ExecuteReader()) { while (reader.Read()) { var objectId = this.session.State.GetObjectIdForExistingObject(reader.GetValue(0).ToString()); objectIds.Add(objectId); } } } } return(objectIds); }
protected override IList <long> GetObjectIds() { this.Session.Flush(); var statement = new ExtentStatementRoot(this); var alias = this.BuildSql(statement); var objectIds = new List <long>(); using (var command = statement.CreateDbCommand(alias)) { using (var reader = command.ExecuteReader()) { while (reader.Read()) { var objectId = this.Session.State.GetObjectIdForExistingObject(reader.GetValue(0).ToString()); objectIds.Add(objectId); } } } return(objectIds); }
internal ExtentStatementChild(ExtentStatementRoot root, SqlExtent extent, IAssociationType associationType) : base(extent) { this.root = root; this.AssociationType = associationType; }
internal ExtentStatementChild(ExtentStatementRoot root, SqlExtent extent, IRoleType roleType) : base(extent) { this.root = root; this.RoleType = roleType; }