You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(110) |
Nov
(296) |
Dec
(107) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(212) |
Feb
(263) |
Mar
(161) |
Apr
(183) |
May
(183) |
Jun
(75) |
Jul
(106) |
Aug
(88) |
Sep
(227) |
Oct
(143) |
Nov
(154) |
Dec
(53) |
2008 |
Jan
(77) |
Feb
|
Mar
|
Apr
(6) |
May
(103) |
Jun
(296) |
Jul
(54) |
Aug
|
Sep
(379) |
Oct
(283) |
Nov
(224) |
Dec
(214) |
2009 |
Jan
(129) |
Feb
(257) |
Mar
(136) |
Apr
(12) |
May
(329) |
Jun
(434) |
Jul
(375) |
Aug
(171) |
Sep
|
Oct
|
Nov
|
Dec
(54) |
2010 |
Jan
(198) |
Feb
(76) |
Mar
(3) |
Apr
(1) |
May
|
Jun
(62) |
Jul
(210) |
Aug
(447) |
Sep
(330) |
Oct
(257) |
Nov
(133) |
Dec
(453) |
2011 |
Jan
(240) |
Feb
(128) |
Mar
(442) |
Apr
(320) |
May
(428) |
Jun
(141) |
Jul
(13) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-06 21:57:48
|
[ http://216.121.112.228/browse/NH-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21010#action_21010 ] Fabio Maulo commented on NH-2697: --------------------------------- Lars, Have you tried? > Named parameter not found in HQL with mapping using "entity-name" > ----------------------------------------------------------------- > > Key: NH-2697 > URL: http://216.121.112.228/browse/NH-2697 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Jenar > Priority: Minor > > string HQL = "update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); > Throws exception "System.ArgumentException: Parameter ID does not exist as a named parameter in [update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID]" > if we use different mapping (through entity-name="..")for the same class ("ArticleItem") > <class name="ArticleItem" ... entity-name="Article" polymorphism="explicit"> > <class name="ArticleItem" ... entity-name="Article2" polymorphism="explicit"> > The same code was working without problems as we had only one mapping for "ArticleItem": > <class name="ArticleItem" ... polymorphism="explicit"> > string HQL = "update ArticleItem a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); -- 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: Alexey G. (JIRA) <nh...@gm...> - 2011-05-06 20:03:07
|
[ http://216.121.112.228/browse/NH-2510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey Gorbach updated NH-2510: ------------------------------- Attachment: NH2510-Fixture.patch Hi! This patch adds failing unit test to current trunk. It throws following exception: System.InvalidCastException : Unable to cast object of type 'System.Object' to type 'System.Byte[]'. at NHibernate.Type.BinaryType.ToInternalFormat(Object bytes) in BinaryType.cs: line 39 at NHibernate.Type.AbstractBinaryType.DeepCopyNotNull(Object value) in AbstractBinaryType.cs: line 148 at NHibernate.Type.MutableType.DeepCopy(Object value, EntityMode entityMode, ISessionFactoryImplementor factory) in MutableType.cs: line 48 at NHibernate.Type.AbstractType.Assemble(Object cached, ISessionImplementor session, Object owner) in AbstractType.cs: line 92 at NHibernate.Type.TypeHelper.Assemble(Object[] row, ICacheAssembler[] types, ISessionImplementor session, Object owner) in TypeHelper.cs: line 67 at NHibernate.Cache.Entry.CacheEntry.Assemble(Object[] values, Object result, Object id, IEntityPersister persister, IInterceptor interceptor, ISessionImplementor session) in CacheEntry.cs: line 79 at NHibernate.Cache.Entry.CacheEntry.Assemble(Object instance, Object id, IEntityPersister persister, IInterceptor interceptor, ISessionImplementor session) in CacheEntry.cs: line 72 at NHibernate.Event.Default.DefaultLoadEventListener.AssembleCacheEntry(CacheEntry entry, Object id, IEntityPersister persister, LoadEvent event) in DefaultLoadEventListener.cs: line 475 at NHibernate.Event.Default.DefaultLoadEventListener.LoadFromSecondLevelCache(LoadEvent event, IEntityPersister persister, LoadType options) in DefaultLoadEventListener.cs: line 448 at NHibernate.Event.Default.DefaultLoadEventListener.DoLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) in DefaultLoadEventListener.cs: line 314 at NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) in DefaultLoadEventListener.cs: line 110 at NHibernate.Event.Default.DefaultLoadEventListener.ProxyOrLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) in DefaultLoadEventListener.cs: line 166 at NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent event, LoadType loadType) in DefaultLoadEventListener.cs: line 82 at NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType loadType) in SessionImpl.cs: line 2494 at NHibernate.Impl.SessionImpl.Get(String entityName, Object id) in SessionImpl.cs: line 1336 at NHibernate.Impl.SessionImpl.Get(Type entityClass, Object id) in SessionImpl.cs: line 1273 at NHibernate.Impl.SessionImpl.Get(Object id) in SessionImpl.cs: line 1257 at NHibernate.Test.LazyProperty.NH2510Fixture.PropertyLoadedNotInitialized() in NH2510.cs: line 49 > Lazy-loading doesn't work with cache > ------------------------------------ > > Key: NH-2510 > URL: http://216.121.112.228/browse/NH-2510 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.GA > Reporter: Sławomir Rosiek > Priority: Minor > Attachments: NH2510-Fixture.patch > > > If I set caching in entity which has lazy property I have the following exception: > System.InvalidCastException: Unable to cast object of type 'System.Object' to type 'System.Byte[]'. -- 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: Ricardo P. (JIRA) <nh...@gm...> - 2011-05-06 16:12:29
|
[ http://216.121.112.228/browse/NH-2107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21008#action_21008 ] Ricardo Peres commented on NH-2107: ----------------------------------- Davy Brion described the problem one year ago: http://davybrion.com/blog/2010/05/avoiding-leaking-connections-with-nhibernate-and-transactionscope/ I don't know if NHibernate can be changed to use only ambient transactions without the need for its own transactions, and keep things from leaking, but it is a known fact that, since ever, we need its own transactions. > Database connection is not closed after rollback in TransactionScope > -------------------------------------------------------------------- > > Key: NH-2107 > URL: http://216.121.112.228/browse/NH-2107 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.1.2.GA > Reporter: William Lai > Attachments: ProgramToReproduce.zip > > > .Net Framework Version: 3.5 > Database: SQL Server 2005 > We have just migrated from version 1.2.1 to 2.1.2GA since we need to integrate multiple layer of components using the TransactionScope. After some testing, we find that the database connection increases continuously after every transaction rollback. At the end, all the connections in the connection pool are used up. The problem does not occur in commit case. > Here is the testing code: > ISession session = null; > Test test = null; // Database object > using (TransactionScope scope = new TransactionScope()) > { > session = NHibernateHelper.OpenSession(); > Test test2 = new Test(); > test2.Name = DateTime.Now.ToString(); > session.SaveOrUpdate(test2); > //scope.Complete(); > } > After running the above case, a new connection will be used in SQL Server. The connection will not free up in SQL Server until we close our application. > Any advise for the problem? Thanks in advance. -- 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: Lars S. (JIRA) <nh...@gm...> - 2011-05-06 15:51:07
|
[ http://216.121.112.228/browse/NH-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21007#action_21007 ] Lars Schneider commented on NH-2697: ------------------------------------ I'm a collegue of jenar and just curious: Basically you are saying that it seems that our code should be working? Because all the time we where thinking that something might be wrong with the code, but we couldn't find clear examples. Most examples are much working with much simpler mapping files. If you can't reproduce the issue it would be nice if you can give us a hint what might be wrong with the mapping. Thanks in advance. > Named parameter not found in HQL with mapping using "entity-name" > ----------------------------------------------------------------- > > Key: NH-2697 > URL: http://216.121.112.228/browse/NH-2697 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Jenar > Priority: Minor > > string HQL = "update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); > Throws exception "System.ArgumentException: Parameter ID does not exist as a named parameter in [update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID]" > if we use different mapping (through entity-name="..")for the same class ("ArticleItem") > <class name="ArticleItem" ... entity-name="Article" polymorphism="explicit"> > <class name="ArticleItem" ... entity-name="Article2" polymorphism="explicit"> > The same code was working without problems as we had only one mapping for "ArticleItem": > <class name="ArticleItem" ... polymorphism="explicit"> > string HQL = "update ArticleItem a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); -- 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-05-06 14:51:08
|
[ http://216.121.112.228/browse/NH-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21006#action_21006 ] Fabio Maulo commented on NH-2697: --------------------------------- Ok I'll create a little mapping with just two properties. If I can recreate the issue than I'll try a fix, otherwise "Cannot reproduce". > Named parameter not found in HQL with mapping using "entity-name" > ----------------------------------------------------------------- > > Key: NH-2697 > URL: http://216.121.112.228/browse/NH-2697 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Jenar > Priority: Minor > > string HQL = "update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); > Throws exception "System.ArgumentException: Parameter ID does not exist as a named parameter in [update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID]" > if we use different mapping (through entity-name="..")for the same class ("ArticleItem") > <class name="ArticleItem" ... entity-name="Article" polymorphism="explicit"> > <class name="ArticleItem" ... entity-name="Article2" polymorphism="explicit"> > The same code was working without problems as we had only one mapping for "ArticleItem": > <class name="ArticleItem" ... polymorphism="explicit"> > string HQL = "update ArticleItem a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); -- 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: Jenar (JIRA) <nh...@gm...> - 2011-05-06 14:25:07
|
[ http://216.121.112.228/browse/NH-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21005#action_21005 ] Jenar commented on NH-2697: --------------------------- PS. Mapping can be found hier: https://forum.hibernate.org/viewtopic.php?f=25&t=1010801 > Named parameter not found in HQL with mapping using "entity-name" > ----------------------------------------------------------------- > > Key: NH-2697 > URL: http://216.121.112.228/browse/NH-2697 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Jenar > Priority: Minor > > string HQL = "update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); > Throws exception "System.ArgumentException: Parameter ID does not exist as a named parameter in [update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID]" > if we use different mapping (through entity-name="..")for the same class ("ArticleItem") > <class name="ArticleItem" ... entity-name="Article" polymorphism="explicit"> > <class name="ArticleItem" ... entity-name="Article2" polymorphism="explicit"> > The same code was working without problems as we had only one mapping for "ArticleItem": > <class name="ArticleItem" ... polymorphism="explicit"> > string HQL = "update ArticleItem a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); -- 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: Jenar (JIRA) <nh...@gm...> - 2011-05-06 14:23:08
|
[ http://216.121.112.228/browse/NH-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21004#action_21004 ] Jenar commented on NH-2697: --------------------------- I have described it shortly, because it is a part of our bigger application. Please tell me what you exactly need. Should i send whole mapping, test or something like this ? > Named parameter not found in HQL with mapping using "entity-name" > ----------------------------------------------------------------- > > Key: NH-2697 > URL: http://216.121.112.228/browse/NH-2697 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Jenar > Priority: Minor > > string HQL = "update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); > Throws exception "System.ArgumentException: Parameter ID does not exist as a named parameter in [update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID]" > if we use different mapping (through entity-name="..")for the same class ("ArticleItem") > <class name="ArticleItem" ... entity-name="Article" polymorphism="explicit"> > <class name="ArticleItem" ... entity-name="Article2" polymorphism="explicit"> > The same code was working without problems as we had only one mapping for "ArticleItem": > <class name="ArticleItem" ... polymorphism="explicit"> > string HQL = "update ArticleItem a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); -- 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-05-06 14:04:15
|
[ http://216.121.112.228/browse/NH-2696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21003#action_21003 ] Fabio Maulo commented on NH-2696: --------------------------------- Thanks for the image, it is fundamental to understand how reproduce the issue. > ReadOnly without lazyInitializer.IsReadOnlySettingAvailable in TwoPhaseLoad.cs > ------------------------------------------------------------------------------ > > Key: NH-2696 > URL: http://216.121.112.228/browse/NH-2696 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0, 3.2.0Alpha1, 3.2.0Alpha2 > Reporter: Phillip Conrad > Priority: Minor > Attachments: nh-bug-scenario.png, TwoPhaseLoad.fix.cs > > > Bug-Scenario: > - 2 component-types of the same datatype in one union-subclass > - lazy="true" in uni-subclass definition > - proxyfactory.factory_class: NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle > - NH 3.1.0GA > The "((INHibernateProxy) proxy).HibernateLazyInitializer.ReadOnly"-Property throw a exception, because > the session in the lazyInitializer is null. > Exception: "Proxy is detached (i.e, session is null). The read-only/modifiable setting is only accessible when the proxy is associated with an open session." > A similar bug was reported here: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5871 > The same fix will remove this error in nhibernate. > The solution is to use "lazyInitializer.IsReadOnlySettingAvailable". > I have posted the same bug here: http://groups.google.com/group/nhusers/browse_thread/thread/d223e79b81a7be41 -- 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-05-06 14:04:00
|
[ http://216.121.112.228/browse/NH-2696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2696: ---------------------------- Priority: Minor (was: Major) > ReadOnly without lazyInitializer.IsReadOnlySettingAvailable in TwoPhaseLoad.cs > ------------------------------------------------------------------------------ > > Key: NH-2696 > URL: http://216.121.112.228/browse/NH-2696 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0, 3.2.0Alpha1, 3.2.0Alpha2 > Reporter: Phillip Conrad > Priority: Minor > Attachments: nh-bug-scenario.png, TwoPhaseLoad.fix.cs > > > Bug-Scenario: > - 2 component-types of the same datatype in one union-subclass > - lazy="true" in uni-subclass definition > - proxyfactory.factory_class: NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle > - NH 3.1.0GA > The "((INHibernateProxy) proxy).HibernateLazyInitializer.ReadOnly"-Property throw a exception, because > the session in the lazyInitializer is null. > Exception: "Proxy is detached (i.e, session is null). The read-only/modifiable setting is only accessible when the proxy is associated with an open session." > A similar bug was reported here: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5871 > The same fix will remove this error in nhibernate. > The solution is to use "lazyInitializer.IsReadOnlySettingAvailable". > I have posted the same bug here: http://groups.google.com/group/nhusers/browse_thread/thread/d223e79b81a7be41 -- 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-05-06 13:59:10
|
[ http://216.121.112.228/browse/NH-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2697: ---------------------------- Priority: Minor (was: Critical) > Named parameter not found in HQL with mapping using "entity-name" > ----------------------------------------------------------------- > > Key: NH-2697 > URL: http://216.121.112.228/browse/NH-2697 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Jenar > Priority: Minor > > string HQL = "update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); > Throws exception "System.ArgumentException: Parameter ID does not exist as a named parameter in [update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID]" > if we use different mapping (through entity-name="..")for the same class ("ArticleItem") > <class name="ArticleItem" ... entity-name="Article" polymorphism="explicit"> > <class name="ArticleItem" ... entity-name="Article2" polymorphism="explicit"> > The same code was working without problems as we had only one mapping for "ArticleItem": > <class name="ArticleItem" ... polymorphism="explicit"> > string HQL = "update ArticleItem a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); -- 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-05-06 13:59:06
|
[ http://216.121.112.228/browse/NH-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21002#action_21002 ] Fabio Maulo commented on NH-2697: --------------------------------- Now we have to think a domain, write its mappings, write a test and only then we can try a fix. Perhaps you may help translating your instruction in a test. > Named parameter not found in HQL with mapping using "entity-name" > ----------------------------------------------------------------- > > Key: NH-2697 > URL: http://216.121.112.228/browse/NH-2697 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.1.0 > Reporter: Jenar > Priority: Critical > > string HQL = "update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); > Throws exception "System.ArgumentException: Parameter ID does not exist as a named parameter in [update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID]" > if we use different mapping (through entity-name="..")for the same class ("ArticleItem") > <class name="ArticleItem" ... entity-name="Article" polymorphism="explicit"> > <class name="ArticleItem" ... entity-name="Article2" polymorphism="explicit"> > The same code was working without problems as we had only one mapping for "ArticleItem": > <class name="ArticleItem" ... polymorphism="explicit"> > string HQL = "update ArticleItem a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; > IQuery iquery = _session.CreateQuery(HQL); > iquery.SetInt32("ID", articleGrp.Articlegroupid); -- 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: Jason Y. (JIRA) <nh...@gm...> - 2011-05-06 13:45:23
|
[ http://216.121.112.228/browse/NH-2107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21001#action_21001 ] Jason Young commented on NH-2107: --------------------------------- I agree with Sam Ritchie's comments, you should NOT be required to interact with the nhibernate session. Can anyone explain why this is NOT and issue with SQL2008. The issue only occurs on SQL2005 for me? > Database connection is not closed after rollback in TransactionScope > -------------------------------------------------------------------- > > Key: NH-2107 > URL: http://216.121.112.228/browse/NH-2107 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.1.2.GA > Reporter: William Lai > Attachments: ProgramToReproduce.zip > > > .Net Framework Version: 3.5 > Database: SQL Server 2005 > We have just migrated from version 1.2.1 to 2.1.2GA since we need to integrate multiple layer of components using the TransactionScope. After some testing, we find that the database connection increases continuously after every transaction rollback. At the end, all the connections in the connection pool are used up. The problem does not occur in commit case. > Here is the testing code: > ISession session = null; > Test test = null; // Database object > using (TransactionScope scope = new TransactionScope()) > { > session = NHibernateHelper.OpenSession(); > Test test2 = new Test(); > test2.Name = DateTime.Now.ToString(); > session.SaveOrUpdate(test2); > //scope.Complete(); > } > After running the above case, a new connection will be used in SQL Server. The connection will not free up in SQL Server until we close our application. > Any advise for the problem? Thanks in advance. -- 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: Jenar (JIRA) <nh...@gm...> - 2011-05-06 08:42:59
|
Named parameter not found in HQL with mapping using "entity-name" ----------------------------------------------------------------- Key: NH-2697 URL: http://216.121.112.228/browse/NH-2697 Project: NHibernate Issue Type: Bug Components: Core Affects Versions: 3.1.0 Reporter: Jenar Priority: Critical string HQL = "update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; IQuery iquery = _session.CreateQuery(HQL); iquery.SetInt32("ID", articleGrp.Articlegroupid); Throws exception "System.ArgumentException: Parameter ID does not exist as a named parameter in [update Article a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID]" if we use different mapping (through entity-name="..")for the same class ("ArticleItem") <class name="ArticleItem" ... entity-name="Article" polymorphism="explicit"> <class name="ArticleItem" ... entity-name="Article2" polymorphism="explicit"> The same code was working without problems as we had only one mapping for "ArticleItem": <class name="ArticleItem" ... polymorphism="explicit"> string HQL = "update ArticleItem a set a.IsFavorite = 0 where a.IsFavorite = 1 and a.Articlegroup.Articlegroupid = :ID"; IQuery iquery = _session.CreateQuery(HQL); iquery.SetInt32("ID", articleGrp.Articlegroupid); -- 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: Phillip C. (JIRA) <nh...@gm...> - 2011-05-06 07:58:59
|
ReadOnly without lazyInitializer.IsReadOnlySettingAvailable in TwoPhaseLoad.cs ------------------------------------------------------------------------------ Key: NH-2696 URL: http://216.121.112.228/browse/NH-2696 Project: NHibernate Issue Type: Bug Components: Core Affects Versions: 3.2.0Alpha2, 3.2.0Alpha1, 3.1.0 Reporter: Phillip Conrad Priority: Major Attachments: nh-bug-scenario.png, TwoPhaseLoad.fix.cs Bug-Scenario: - 2 component-types of the same datatype in one union-subclass - lazy="true" in uni-subclass definition - proxyfactory.factory_class: NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle - NH 3.1.0GA The "((INHibernateProxy) proxy).HibernateLazyInitializer.ReadOnly"-Property throw a exception, because the session in the lazyInitializer is null. Exception: "Proxy is detached (i.e, session is null). The read-only/modifiable setting is only accessible when the proxy is associated with an open session." A similar bug was reported here: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5871 The same fix will remove this error in nhibernate. The solution is to use "lazyInitializer.IsReadOnlySettingAvailable". I have posted the same bug here: http://groups.google.com/group/nhusers/browse_thread/thread/d223e79b81a7be41 -- 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-05-05 15:05:59
|
[ http://216.121.112.228/browse/NH-2694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2694. --------------------------- Resolution: Not an Issue Wrong usage. Correct: query = query.Where(expression); The next time, please read what mean "Blocker" thinking that the subject is NHibernate and not your project, especially when you do the same thing 2 times in few minutes. For question use the nhusers list. Thanks. > CLONE - Where clause error > -------------------------- > > Key: NH-2694 > URL: http://216.121.112.228/browse/NH-2694 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.1.0 > Reporter: Alexander Kozlenko > Attachments: nh-v3.1.0.4000-bug-1.txt, NHibernate.NH2689.TestCase.zip > > > Have a query as "query.Where(x => expression(x)).ToList()" where "expression" is "LambdaExpression.Lambda(Expression.IsTrue(...), ...)" which trows this exception on data fetch. -- 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: korkless (JIRA) <nh...@gm...> - 2011-05-05 14:59:56
|
update default driver of firebird dialect to FirebirdClientDriver (FirebirdDriver is obsolete) ---------------------------------------------------------------------------------------------- Key: NH-2695 URL: http://216.121.112.228/browse/NH-2695 Project: NHibernate Issue Type: Improvement Components: DataProviders / Dialects Affects Versions: 3.2.0Alpha2 Reporter: korkless the default driver of firebirddialect is FirebirdDriver but that driver is obsolete (i think that nobody is using it becouse refers to a very old data provider version), the correct driver for firebird is FirebirdClientDriver so i suggest to update it (this is a breaking change but probably concerns to very few people, maybe 0) -- 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-05-05 14:53:59
|
[ http://216.121.112.228/browse/NH-2694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2694: ---------------------------- Priority: Trivial (was: Blocker) > CLONE - Where clause error > -------------------------- > > Key: NH-2694 > URL: http://216.121.112.228/browse/NH-2694 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.1.0 > Reporter: Alexander Kozlenko > Attachments: nh-v3.1.0.4000-bug-1.txt, NHibernate.NH2689.TestCase.zip > > > Have a query as "query.Where(x => expression(x)).ToList()" where "expression" is "LambdaExpression.Lambda(Expression.IsTrue(...), ...)" which trows this exception on data fetch. -- 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: Alexander K. (JIRA) <nh...@gm...> - 2011-05-05 14:21:57
|
[ http://216.121.112.228/browse/NH-2694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexander Kozlenko updated NH-2694: ----------------------------------- Attachment: NHibernate.NH2689.TestCase.zip Test project > CLONE - Where clause error > -------------------------- > > Key: NH-2694 > URL: http://216.121.112.228/browse/NH-2694 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.1.0 > Reporter: Alexander Kozlenko > Priority: Blocker > Attachments: nh-v3.1.0.4000-bug-1.txt, NHibernate.NH2689.TestCase.zip > > > Have a query as "query.Where(x => expression(x)).ToList()" where "expression" is "LambdaExpression.Lambda(Expression.IsTrue(...), ...)" which trows this exception on data fetch. -- 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: Alexander K. (JIRA) <nh...@gm...> - 2011-05-05 14:19:57
|
CLONE - Where clause error -------------------------- Key: NH-2694 URL: http://216.121.112.228/browse/NH-2694 Project: NHibernate Issue Type: Bug Components: Linq Provider Affects Versions: 3.1.0 Reporter: Alexander Kozlenko Priority: Blocker Attachments: nh-v3.1.0.4000-bug-1.txt Have a query as "query.Where(x => expression(x)).ToList()" where "expression" is "LambdaExpression.Lambda(Expression.IsTrue(...), ...)" which trows this exception on data fetch. -- 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-05-05 12:06:01
|
[ http://216.121.112.228/browse/NH-2689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2689. --------------------------- Resolution: Incomplete > Where clause error > ------------------ > > Key: NH-2689 > URL: http://216.121.112.228/browse/NH-2689 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.1.0 > Reporter: Alexander Kozlenko > Priority: Blocker > Attachments: nh-v3.1.0.4000-bug-1.txt > > > Have a query as "query.Where(x => expression(x)).ToList()" where "expression" is "LambdaExpression.Lambda(Expression.IsTrue(...), ...)" which trows this exception on data fetch. -- 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: cremor (JIRA) <nh...@gm...> - 2011-05-05 11:17:56
|
[ http://216.121.112.228/browse/NH-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] cremor updated NH-2693: ----------------------- Attachment: NH2693 Test.zip > Queries with nested subqueries either fail or return wrong results > ------------------------------------------------------------------ > > Key: NH-2693 > URL: http://216.121.112.228/browse/NH-2693 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.2.0Alpha2 > Reporter: cremor > Priority: Major > Attachments: NH2693 Test.zip > > > The attached test shows multiple failing queries which have in common that they are all using nested subqueries. I have no idea if the different queries fail because of different bugs or if it's all because of the same, but I hope they are clear enough that they can be fixed. > Following is an explanation of the test: > Domain model: > FirstLevel has a set of components of type SecondLevelComponent. > SecondLevelComponent has a many-to-one to ThirdLevel. > ThirdLevel is the abstract base of SpecificThirdLevel (table-per-subclass mapping). > SpecificThirdLevel has a set of entities of type FourthLevel. > The queries and why they are failing: > * _1_Querying_BasedOnFourthLevelExistence_WithIsAndCasting_ShouldReturnSameEntitiesAsLinqToObjects > + Should select all FirstLevel entities that have at least one FourthLevel entity as child, implemented by using the "is" operator and then casting the ThirdLevel to a SpecificThirdLevel. > - Returns wrong results, the generated SQL checks for existing ThirdLevel childs instead of FourthLevel childs. > * _2_Querying_BasedOnFourthLevelExistence_WithSelectAndOfType_ShouldReturnSameEntitiesAsLinqToObjects > + Should select same as first query, but this time implemented by using the Select() and OfType() methods. > - Fails with exception "QueryException : could not resolve property: class of: component[ThirdLevel,SpecificThirdLevel,SomeBool]". I think it should check the class of ThirdLevel instead of SecondLevelComponent. > * _3_Querying_BasedOnFourthLevelProperty_WithIsAndCasting_ShouldReturnSameEntitiesAsLinqToObjects > + Should select all FirstLevel entities that have at least one FourthLevel entity _with a specific property_ as child. Implemented with "is" and casting like the first query. > - Fails with exception "QueryException : could not resolve property: SomeString of: ThirdLevel". It should search the "SomeString" property on FourthLevel instead of ThirdLevel. > * _4_Querying_BasedOnFourthLevelProperty_WithSelectAndOfType_ShouldReturnSameEntitiesAsLinqToObjects > + Should select same as third query, but this time implemented with Select() and OfType() like the second query. > - Fails with same exception as the second query. > The last two queries are not using a polymorphistic association. Instead they are using the property SecondLevelComponent.SpecificThirdLevel so that no type checking or casting is needed. But they are still failing: > * _5_Querying_BasedOnFourthLevelExistence_ByUsingSpecificThirdLevelProperty_ShouldReturnSameEntitiesAsLinqToObjects > + Should select same as first and second query. > - Returns no entities. But I'm not sure why it doesn't return anything. > * _6_Querying_BasedOnFourthLevelProperty_ByUsingSpecificThirdLevelProperty_ShouldReturnSameEntitiesAsLinqToObjects > + Should select same as third and fourth query. > - Also returns no entities and I also don't know why. -- 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: cremor (JIRA) <nh...@gm...> - 2011-05-05 11:15:59
|
Queries with nested subqueries either fail or return wrong results ------------------------------------------------------------------ Key: NH-2693 URL: http://216.121.112.228/browse/NH-2693 Project: NHibernate Issue Type: Bug Components: Linq Provider Affects Versions: 3.2.0Alpha2 Reporter: cremor Priority: Major The attached test shows multiple failing queries which have in common that they are all using nested subqueries. I have no idea if the different queries fail because of different bugs or if it's all because of the same, but I hope they are clear enough that they can be fixed. Following is an explanation of the test: Domain model: FirstLevel has a set of components of type SecondLevelComponent. SecondLevelComponent has a many-to-one to ThirdLevel. ThirdLevel is the abstract base of SpecificThirdLevel (table-per-subclass mapping). SpecificThirdLevel has a set of entities of type FourthLevel. The queries and why they are failing: * _1_Querying_BasedOnFourthLevelExistence_WithIsAndCasting_ShouldReturnSameEntitiesAsLinqToObjects + Should select all FirstLevel entities that have at least one FourthLevel entity as child, implemented by using the "is" operator and then casting the ThirdLevel to a SpecificThirdLevel. - Returns wrong results, the generated SQL checks for existing ThirdLevel childs instead of FourthLevel childs. * _2_Querying_BasedOnFourthLevelExistence_WithSelectAndOfType_ShouldReturnSameEntitiesAsLinqToObjects + Should select same as first query, but this time implemented by using the Select() and OfType() methods. - Fails with exception "QueryException : could not resolve property: class of: component[ThirdLevel,SpecificThirdLevel,SomeBool]". I think it should check the class of ThirdLevel instead of SecondLevelComponent. * _3_Querying_BasedOnFourthLevelProperty_WithIsAndCasting_ShouldReturnSameEntitiesAsLinqToObjects + Should select all FirstLevel entities that have at least one FourthLevel entity _with a specific property_ as child. Implemented with "is" and casting like the first query. - Fails with exception "QueryException : could not resolve property: SomeString of: ThirdLevel". It should search the "SomeString" property on FourthLevel instead of ThirdLevel. * _4_Querying_BasedOnFourthLevelProperty_WithSelectAndOfType_ShouldReturnSameEntitiesAsLinqToObjects + Should select same as third query, but this time implemented with Select() and OfType() like the second query. - Fails with same exception as the second query. The last two queries are not using a polymorphistic association. Instead they are using the property SecondLevelComponent.SpecificThirdLevel so that no type checking or casting is needed. But they are still failing: * _5_Querying_BasedOnFourthLevelExistence_ByUsingSpecificThirdLevelProperty_ShouldReturnSameEntitiesAsLinqToObjects + Should select same as first and second query. - Returns no entities. But I'm not sure why it doesn't return anything. * _6_Querying_BasedOnFourthLevelProperty_ByUsingSpecificThirdLevelProperty_ShouldReturnSameEntitiesAsLinqToObjects + Should select same as third and fourth query. - Also returns no entities and I also don't know why. -- 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: cremor (JIRA) <nh...@gm...> - 2011-05-05 10:33:02
|
[ http://216.121.112.228/browse/NH-2527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20998#action_20998 ] cremor commented on NH-2527: ---------------------------- Is there anything else I can provide to help fixing this? > AbstractBatcher reuses disposed IDbCommands which causes an ArgumentOutOfRangeException with OracleDataClientDriver > ------------------------------------------------------------------------------------------------------------------- > > Key: NH-2527 > URL: http://216.121.112.228/browse/NH-2527 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.GA > Reporter: cremor > Priority: Critical > Attachments: NH2527 Additional Test.zip, NH2527 Test.zip > > > The attached test shows that the AbstractBatcher reuses already disposed IDbCommands in some cases (in my case, when an OneToMany entry is inserted and updated in the same commit). This seems to be no problem with some (most?) drivers (I tested SQLite20Driver and OracleClientDriver, both had no problems) but causes an ArgumentOutOfRangeException with the OracleDataClientDriver because the Parameters collection is empty. > The dispose is called from AbstractBatcher.CloseCommand() which is called from OneToManyPersister.DoUpdateRows(). > AbstractBatcher.CloseCommand() checks if 'lastQuery' is the just disposed command and if yes clears it, but doesn't check 'batchCommand'. (Possible fix by calling InvalidateBatchCommand() if batchCommand == cmd.) > Seems like a similar problem was already fixed for Firebird because the method AbstractBatcher.PrepareBatchCommand() checks for an empty CommandText and the comment says that it's unknown why it's empty sometimes. (Other possible fix by comparing batchCommand.Parameters.Count and parameterTypes.Length.) > I don't know which of the two fixes would be better (or if there is an even better fix), therefore I didn't create a patch. > Please note that even with one of the two fixes, the test still fails (with an StaleStateException) if you don't set adonet.batch_size to 0. I don't know why it doesn't work with batching, but this seems like a different bug. -- 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: cremor (JIRA) <nh...@gm...> - 2011-05-05 10:27:56
|
[ http://216.121.112.228/browse/NH-2692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] cremor updated NH-2692: ----------------------- Attachment: NH2692 Test.zip > Using Any() on a collection of components results in invalid SQL: Column of parent ID is used instead of key column > ------------------------------------------------------------------------------------------------------------------- > > Key: NH-2692 > URL: http://216.121.112.228/browse/NH-2692 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.2.0Alpha2 > Reporter: cremor > Priority: Major > Attachments: NH2692 Test.zip > > > The attached test shows that using a query like > var result = session.Query<Parent>() > .Where(x => x.ChildComponents.Any()) > .ToList(); > results in wrongly generated SQL. The subquery tries to select "ChildComponents.<column of parent ID>" instead of "ChildComponents.<key column of child>". -- 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: cremor (JIRA) <nh...@gm...> - 2011-05-05 10:24:58
|
Using Any() on a collection of components results in invalid SQL: Column of parent ID is used instead of key column ------------------------------------------------------------------------------------------------------------------- Key: NH-2692 URL: http://216.121.112.228/browse/NH-2692 Project: NHibernate Issue Type: Bug Components: Linq Provider Affects Versions: 3.2.0Alpha2 Reporter: cremor Priority: Major The attached test shows that using a query like var result = session.Query<Parent>() .Where(x => x.ChildComponents.Any()) .ToList(); results in wrongly generated SQL. The subquery tries to select "ChildComponents.<column of parent ID>" instead of "ChildComponents.<key column of child>". -- 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 |