Skip to content

Fix cacheable CreateSQLQuery throws on query with AddJoin #2088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 3, 2019

Conversation

bahusoid
Copy link
Member

Example of problem query:

s.CreateSQLQuery(query)
	.AddEntity("org", typeof(Organization))
	.AddJoin("emp", "org.employments")
	.SetCacheable(true)
	.List();

Thrown exception:

System.ArgumentException : If aliases is not null, then the length of aliases[] must equal the number of true elements in includeInTuple; aliases.Length=2; tuple 'true' length=1
Parameter name: aliases

   at NHibernate.Transform.CacheableResultTransformer.GetIncludeInTransform(IResultTransformer transformer, String[] aliases, Boolean[] includeInTuple) 

@hazzik

This comment has been minimized.

@bahusoid

This comment has been minimized.

@hazzik hazzik merged commit 151194f into nhibernate:master Apr 3, 2019
@hazzik hazzik added the r: Fixed label Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants