From: Andrei A. (JIRA) <nh...@gm...> - 2011-05-23 13:06:47
|
[ http://216.121.112.228/browse/NH-2328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21151#action_21151 ] Andrei Alecu commented on NH-2328: ---------------------------------- After further experimenting I'm certain this is broken in HQL, and is not really a Linq issue, so once HQL is fixed, Linq should work too. Running: var boxes = s.CreateQuery("from ToyBox t where t.Shape.class = Square") .List<ToyBox>(); I tracked it down to ProcessConstant(SqlNode constant, bool resolveIdent) in LiteralProcessor.cs The code ends up here: IQueryable queryable = _walker.SessionFactoryHelper.FindQueryableUsingImports(constant.Text); if (isIdent && queryable != null) { constant.Text = queryable.DiscriminatorSQLValue; } But queryable.DiscriminatorSQLValue is null because queryable contains an instance of a non-polymorphic SingleTableEntityPersister<>. If, while debugging, I manually put the value "2" (the meta-value of Shape) instead of null in constant.Text, the test passes. I'm looking at ways of extracting the meta-value so it can be used there. > Linq query on <Any/> fails > -------------------------- > > Key: NH-2328 > URL: http://216.121.112.228/browse/NH-2328 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.Alpha2 > Reporter: Michael Kobaly > Priority: Major > Attachments: NHibernate.Test.zip > > > Please read NHUsers group posting here for description of problem. > http://groups.google.com/group/nhusers/browse_thread/thread/fa831bd703842e1e > I excluded the lib folder from the zip file since upload says not to include dlls. I am using NH 3 Alpha 2 with all supporting dlls. First time posting bug..sorry in advance if I am doing it wrong. -- 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 |