protected override IList <long> GetObjectIds()
        {
            if (this.Strategy != null)
            {
                return(this.Strategy.ExtentGetCompositeAssociations(this.AssociationType));
            }

            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);
                        }

                        reader.Close();
                    }
                }
            }

            return(objectIds);
        }
Example #2
0
        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;
 }
Example #5
0
 internal ExtentStatementChild(ExtentStatementRoot root, SqlExtent extent, IAssociationType associationType)
     : base(extent)
 {
     this.root = root;
     this.associationType = associationType;
 }
Example #6
0
 internal ExtentStatementChild(ExtentStatementRoot root, SqlExtent extent, IRoleType roleType)
     : base(extent)
 {
     this.root = root;
     this.roleType = roleType;
 }
Example #7
0
        protected override IList<ObjectId> GetObjectIds()
        {
            if (this.Strategy != null)
            {
                return this.Strategy.ExtentGetCompositeAssociations(this.AssociationType);
            }

            this.session.Flush();

            var statement = new ExtentStatementRoot(this);
            var objectIds = new List<ObjectId>();

            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.Database.ObjectIds.Parse(reader.GetValue(0).ToString());
                            objectIds.Add(objectId);
                        }

                        reader.Close();
                    }
                }
            }

            return objectIds;
        }
Example #8
0
        protected override IList<ObjectId> GetObjectIds()
        {
            this.Session.Flush();

            var statement = new ExtentStatementRoot(this);
            var alias = this.BuildSql(statement);

            var objectIds = new List<ObjectId>();
            using (var command = statement.CreateDbCommand(alias))
            {
                using (var reader = command.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        var objectId = this.Session.Database.ObjectIds.Parse(reader.GetValue(0).ToString());
                        objectIds.Add(objectId);
                    }

                    reader.Close();
                }
            }

            return objectIds;
        }