From: Kelly S. (JIRA) <nh...@gm...> - 2011-06-06 13:46:09
|
[ http://216.121.112.228/browse/NH-2759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kelly Stuard updated NH-2759: ----------------------------- Attachment: NH2759.zip 2 unit tests: 1 passing, 1 failing Notice how adding the property in the where clause confuses the parser in the any portion. > Any() in where clause along with property access confuses parser. > ----------------------------------------------------------------- > > Key: NH-2759 > URL: http://216.121.112.228/browse/NH-2759 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.2.0Beta1 > Reporter: Kelly Stuard > Attachments: NH2759-Exception.txt, NH2759.zip > > > (I have a passing and a failing test case and the exception lined up to attach, shortly.) > The following code throws an exception; the parser thinks the property in the any clause should be an asset, not a library permission. However, if I remove the property access in the where clause, the parser figures out everything, fine. > var recentlyViewed = > from voa in session.Query<ViewsOnAsset>() > select voa.Asset; > var query = > from asset in recentlyViewed > let library = asset.Library > where library.LibraryType == 1 && library.LibraryPermissions.Any(p => > p.CanViewAssets) > select asset; -- 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 |