Issues
- Nhibernate - The same in parameter value will be applied with different name to different future queriesNH-4044Resolved issue: NH-4044
- ORA-01483 when inserting two blobs and a date using the OracleManagedDataClientDriverNH-3620Resolved issue: NH-3620
- Using Projections.Conditional inside of Projections.Count and Projections.Avg generates invalid sql.NH-3609Resolved issue: NH-3609Alex Zaytsev
- AbstractSessionImpl abstract method visibilityNH-3608Resolved issue: NH-3608Alex Zaytsev
- NullReferenceException in StatefulPersistenceContext.OnDeserialization() with proxies not completely deserializedNH-3574Resolved issue: NH-3574Alex Zaytsev
- memory when using default_batch_fetch_sizeNH-3530Resolved issue: NH-3530
- Adding object to list wont be savedNH-3520
- NHibernate SqlServer2012Dialect drop sequence bugNH-3496Resolved issue: NH-3496
- Can't set precision and scale on decimal when creating SQL Server CE table with NHibernateNH-3481Resolved issue: NH-3481
- StatefulPersistenceContext.RemoveEntity KeyNotFoundException on EvictNH-3478Resolved issue: NH-3478Alex Zaytsev
- Ability to select the root entity in a criteria projectionNH-3435Resolved issue: NH-3435
- Merge fix for bug NH-3058 into 3.NextNH-3432Resolved issue: NH-3432
- Configuration.GenerateSchemaCreationScript doesn't quote column names no matter hbm2ddl.keywordsNH-3427
- Indexes: Generated Identifier Too LongNH-3422
- Indexes for associations to non physical classes/tablesNH-3421
- Support fetch grandchildren on QueryOver().Fetch()NH-3419Resolved issue: NH-3419Richard Brown
- HQL "Is" Is Not Working for Joined and Union Subclass MappingNH-3418Resolved issue: NH-3418
- Group By Entity Does Not WorkNH-3416Resolved issue: NH-3416
- Queries with sub-query in ThenBy failNH-3414Resolved issue: NH-3414
- Clearing a list used by Contains causes subsequent queries to failNH-3413Resolved issue: NH-3413Alex Zaytsev
- Reflection optimizer not used for componentsNH-3410Resolved issue: NH-3410Alex Zaytsev
- Cannot Use XDocument When Setting Wrap ResultsetsNH-3405Resolved issue: NH-3405Alex Zaytsev
- Wrong parameter size in query with MsSql2000Dialect,MsSql2005Dialect and MsSql2008DialectNH-3403Resolved issue: NH-3403
- When using ComponentAsId, mappings to Id fields that are from a base class (virtual or not) do not work.NH-3390Resolved issue: NH-3390Alex Zaytsev
- Add Support For Mapping Set Elements in Conventions Model MapperNH-3388Resolved issue: NH-3388Alex Zaytsev
- Linq OrderBy NewID()NH-3386Resolved issue: NH-3386
- Add ability to expand many subcollections with WCF Data ServicesNH-3385Resolved issue: NH-3385Alex Zaytsev
- Fix for multiple objects of CascadeStyle in Memory that should be singletonNH-3383Resolved issue: NH-3383Oskar Berggren
- One-To-Many of Union-Subclass saves to wrong tableNH-3380
- Oracle8iDialect and FirebirdDialect incorrect handle DbType.Currency typeNH-3379Resolved issue: NH-3379Alex Zaytsev
- MySQLDialect incorrect handle DbType.Currency as MONEYNH-3378Resolved issue: NH-3378Alex Zaytsev
- Constants inside Linq aggregates not supportedNH-3376Resolved issue: NH-3376Alex Zaytsev
- Session.Merge throws InvalidCastException when using a Lazy bytes[] propertyNH-3374Resolved issue: NH-3374
- Linq Fetch through components has no effectNH-3373Resolved issue: NH-3373Alex Zaytsev
- Support generated columns in combination with explicit loaderNH-3372Resolved issue: NH-3372Alex Zaytsev
- Remove warning about "NHibernate.Type.CustomType -- the custom type * is not serializable"NH-3370Resolved issue: NH-3370Alex Zaytsev
- ToFuture/ToFutureValue should fall-back on dialects without MultiQuery supportNH-3369Resolved issue: NH-3369Alex Zaytsev
- Add support for Equals method of sbyte, DateTimeOffset and unsigned numericsNH-3368Resolved issue: NH-3368Alex Zaytsev
- Support string.Equals()NH-3367Resolved issue: NH-3367Alex Zaytsev
- LINQ query with various Compare() and CompareTo() fails (WCF Data Services)NH-3366Resolved issue: NH-3366Oskar Berggren
- Support for HasFlag method for enums with Flags attribute applied.NH-3365Resolved issue: NH-3365
- Dynamic EntityModeNH-3364Resolved issue: NH-3364
- Initializing a bag after queued add causes incorrect behaviorNH-3362Resolved issue: NH-3362
- Select statement is not working if composite key with a string type keyNH-3361Resolved issue: NH-3361
- System.NotSupportedException : Don't currently support idents of type DateTimeOffsetNH-3357Resolved issue: NH-3357Oskar Berggren
- ExpandedWrapper over collection property throws TargetInvocationExceptionNH-3354Resolved issue: NH-3354
- Duplicate records using Future()NH-3350Resolved issue: NH-3350
- Allow many-to-one using not-null foreign-key while using inverse=false on the one-sideNH-3348
- Lazy loading of ISet throws exception when no resultNH-3342
- Cast<> confuses Linq translator: drops filtersNH-3335
50 of 68
0
down vote
favorite
1
We are trying to eager load some data using Nhibernate future queries. As you already know while calling ToList(), all the future query that we have before will get executed in one transaction.
var selectedPhysicianIds = new List<int> {1, 2};
var query = this.physicianReviewQuery.Clone()
.TransformUsing(new DistinctRootEntityResultTransformer())
.AndRestrictionOn(p => p.Id)
.IsIn(selectedPhysicianIds)
.Future();
var collectionsQuery = this.session.QueryOver<Physician>()
.AndRestrictionOn(p => p.Id)
.IsIn(selectedPhysicianIds);
collectionsQuery.Clone().Fetch(p => p.Specialties).Eager.Future();
collectionsQuery.Clone().Fetch(p => p.HospitalPhysicianBridges).Eager.Future();
collectionsQuery.Clone().Fetch(p => p.SpecialtyPhysicianBridges).Eager.Future();
selectedPhysicians.AddRange(query.ToList());
This code will generate below set of queries,
Select * from PhysicianReview where PhysicianKey in (@p0, @p1)
Select * from Physician P left outer join Specialties S on P.Specialty = S.Specialty
Where P.PhysicianKey in (@p2, @p3)
Select * from Physician P left outer join HospitalBridge HB on P.Physician = HB.Physician
Where PhysicianKey in (@p4, @p5)
Select * from Physician P left outer join SpecialtyBridge SB on P.Physican = SB.Physician
Where PhysicianKey in (@p6, @p7)
',N'@p0 int,@p1 int,@p2 int,@p3 int,@p4 int,@p5 int,@p6 int,@p7 int,
@p0=1,@p1=2,@p2=1,@p3=2,@p4=1,@p5=2,@p6=1,@p7=2
While looking into the sql queries, the same number of parameters value will be applied for all the queries with different parameter name.
Let say the selectedPhysicianIds contains array of 1000 integer(user can choose whatever they want).
var selectedPhysicianIds = new List<int> {1, 2,....998, 999, 1000};
In this case, the same number of parameter value will be applied for all the four future queries. So total number of parameter count will be (4 * 1000) 4000. But we have the below limitation in the sql server. "The incoming request has too many parameters. The server supports a maximum of 2100 parameters"
Is there any option to solve this issue with the help of Nhibernate?