From: Kirill M. (JIRA) <nh...@gm...> - 2011-04-08 07:57:50
|
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: Critical 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 |
From: Kirill M. (JIRA) <nh...@gm...> - 2011-04-08 08:44:58
|
[ http://216.121.112.228/browse/NH-2634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20858#action_20858 ] Kirill Medvedev commented on NH-2634: ------------------------------------- I've checked another ways to retrieve data. Criteria API and HQL behave the same way, as QueryOver, and cause an exception. IList<Item> items = session.QueryOver<Item>().Skip(1).Take(20).List(); IList<Item> items = session.CreateCriteria<Item>().SetFirstResult(1).SetMaxResults(20).List<Item>(); IList<Item> items = session.CreateQuery("from Item").SetFirstResult(1).SetMaxResults(20).List<Item>(); > 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: Critical > 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 |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-04-08 14:15:49
|
[ http://216.121.112.228/browse/NH-2634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2634: ---------------------------- Priority: Major (was: Critical) > 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: Major > 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 |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-04-08 15:46:02
|
[ http://216.121.112.228/browse/NH-2634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20863#action_20863 ] Fabio Maulo commented on NH-2634: --------------------------------- It seems yo have a wrong mapping in a collection. The key of the collection point only to a part of the composite id of the related entity. > 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: Major > 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 |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-04-08 15:46:06
|
[ http://216.121.112.228/browse/NH-2634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2634: ---------------------------- Priority: Minor (was: Major) > 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 |
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 |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-04-12 22:22:05
|
[ http://216.121.112.228/browse/NH-2634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2634: ---------------------------- Component/s: (was: Core) DataProviders / Dialects > NHibernate generates wrong select-query > --------------------------------------- > > Key: NH-2634 > URL: http://216.121.112.228/browse/NH-2634 > Project: NHibernate > Issue Type: Bug > Components: DataProviders / Dialects, 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 |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-04-12 22:26:04
|
[ http://216.121.112.228/browse/NH-2634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2634: ---------------------------- Summary: wrong select-query with many-to-one + cpmpositeId + pagination (was: NHibernate generates wrong select-query) > wrong select-query with many-to-one + cpmpositeId + pagination > -------------------------------------------------------------- > > Key: NH-2634 > URL: http://216.121.112.228/browse/NH-2634 > Project: NHibernate > Issue Type: Bug > Components: DataProviders / Dialects, 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 |