Exemplo n.º 1
0
        public ICriteria SetFetchMode(string associationPath, FetchMode fetchMode)
        {
            ICriteriaEvent criteriaEvent = new SetFetchModeEvent(associationPath, fetchMode);

            foreach (IShard shard in shards)
            {
                if (shard.GetCriteriaById(criteriaId) != null)
                {
                    shard.GetCriteriaById(criteriaId).SetFetchMode(associationPath, fetchMode);
                }
                else
                {
                    shard.AddCriteriaEvent(criteriaId, criteriaEvent);
                }
            }
            return(this);
        }
Exemplo n.º 2
0
        public ICriteria SetFetchMode(string associationPath, FetchMode fetchMode)
        {
            ICriteriaEvent criteriaEvent = new SetFetchModeEvent(associationPath, fetchMode);

            foreach (IShard shard in shards)
            {
                if (shardToCriteriaMap[shard] != null)
                {
                    shardToCriteriaMap[shard].SetFetchMode(associationPath, fetchMode);
                }
                else
                {
                    shardToEventListMap[shard].Add(criteriaEvent);
                }
            }
            return(this);
        }