From: Kirill M. (JIRA) <nh...@gm...> - 2011-04-11 08:10:07
|
[ http://216.121.112.228/browse/NH-2634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20878#action_20878 ] Kirill Medvedev commented on NH-2634: ------------------------------------- Thank you for advice, I've checked it. Removing all collections' mappings didn't make any affect, exception appeared as before. But after removing <many-to-one name="DefaultItemSupplier" class="ItemSupplier" not-null="false" cascade="save-update" update="false" lazy="true"> <column name="ItemId"/> <column name="DefaultSupplierID"/> </many-to-one> query completed without exceptions. Therefore, problem is in this many-to-one mapping part. The most strange is that query session.QueryOver<Item>().Take(100).List(); generates correct TSQL query and results are correct too. DefaultItemSupplier property is initialized as expected. But if I add Skip() restriction, exception occurs. > NHibernate generates wrong select-query > --------------------------------------- > > Key: NH-2634 > URL: http://216.121.112.228/browse/NH-2634 > Project: NHibernate > Issue Type: Bug > Components: Core, QueryOver > Affects Versions: 3.1.0 > Reporter: Kirill Medvedev > Priority: Minor > Attachments: NH_Bug.zip > > > While transferring legacy project to NHibernate I found a bug... Nhibernate generates wrong SELECT query => GenericADOException occurs. See attachment. Thank you. -- 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 |