|
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-23 18:45:53
|
[ http://216.121.112.228/browse/NH-2317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21160#action_21160 ]
Fabio Maulo commented on NH-2317:
---------------------------------
The matter is not when the last sentence is just a select...
in that case it can be reduced.
In practice this HQL
select a.id from Artist a where a in (from Artist take 3)
can be reduce to this other
select a.id from Artist a take 3
The matter is when the clause after a skip/take has a body (re-linq meaning of it) as
Query<A>().Take(10).Where(x=> x.Name.StartWith("P"))
In this last case we have to transform it with a subquery (... where possible in HQL)
> Select after Take does not work properly
> ----------------------------------------
>
> Key: NH-2317
> URL: http://216.121.112.228/browse/NH-2317
> Project: NHibernate
> Issue Type: Bug
> Components: Linq Provider
> Affects Versions: 3.0.0.Alpha2
> Reporter: Jose F. Romaniello
> Priority: Major
> Attachments: NH2317.7z
>
>
> artists.Take(10).Select(a => a.Id) throws exception on
> NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.GetClassName(IASTNode querySource) en PolymorphicQuerySourceDetector.cs: line 62
> artists.Select(a => a.Id).Take(10) works properly
> These two queries work with the old provider.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|