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: Luka C. (JIRA) <nh...@gm...> - 2011-05-18 07:15:47
|
Doin Bitwise operation in QueryOver throw an exception ------------------------------------------------------ Key: NH-2709 URL: http://216.121.112.228/browse/NH-2709 Project: NHibernate Issue Type: Bug Components: QueryOver Affects Versions: 3.2.0Alpha2 Reporter: Luka Cetina Priority: Minor Attachments: Test.cs When doing Bitwise comparison in QueryOver.where, throws an Exception: System.Exception was unhandled by user code Message=Could not determine member from (Convert(a.AccessMask) & 2) Source=NHibernate StackTrace: at NHibernate.Impl.ExpressionProcessor.FindMemberExpression(Expression expression) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 189 at NHibernate.Impl.ExpressionProcessor.FindMemberExpression(Expression expression) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 170 at NHibernate.Impl.ExpressionProcessor.FindMemberExpression(Expression expression) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 170 at NHibernate.Impl.ExpressionProcessor.ProcessSimpleExpression(Expression left, Expression right, ExpressionType nodeType) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 323 at NHibernate.Impl.ExpressionProcessor.ProcessSimpleExpression(BinaryExpression be) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 318 at NHibernate.Impl.ExpressionProcessor.ProcessBinaryExpression(BinaryExpression expression) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 415 at NHibernate.Impl.ExpressionProcessor.ProcessExpression(Expression expression) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 486 at NHibernate.Impl.ExpressionProcessor.ProcessLambdaExpression(LambdaExpression expression) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 493 at NHibernate.Impl.ExpressionProcessor.ProcessExpression[T](Expression`1 expression) in c:\Libs\NHibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 504 at NHibernate.Criterion.QueryOver`2.Add(Expression`1 expression) in c:\Libs\NHibernate\src\NHibernate\Criterion\QueryOver.cs:line 749 at NHibernate.Criterion.QueryOver`2.Where(Expression`1 expression) in c:\Libs\NHibernate\src\NHibernate\Criterion\QueryOver.cs:line 357 at Test.Domain.NHMappingTest.Test() in C:\Projects\SDW\05A_Development\Softworks.Selfridges.Test\Domain\DummyTest.cs:line 45 InnerException: -- 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: Vahid N. (JIRA) <nh...@gm...> - 2011-05-18 05:43:54
|
[ http://216.121.112.228/browse/NH-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vahid Nasiri updated NH-2519: ----------------------------- Attachment: sql_ce_funcs.zip Hello, The reason is MsSqlCeDialect lacks "RegisterFunctions" part. So I've created a new patch(attached) to add these missing functions based on http://msdn.microsoft.com/en-us/library/aa274735(v=sql.80).aspx BR > SQL-CE & LINQ to NH 3.0 > ----------------------- > > Key: NH-2519 > URL: http://216.121.112.228/browse/NH-2519 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.GA > Reporter: Vahid Nasiri > Priority: Minor > Attachments: NHibernate.Test.01.27.2011.zip, sql_ce_funcs.zip > > > I've attached a test project to show some serious problems with LINQ to NH 3.0 & SQL-CE. -- 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-17 23:32:54
|
[ http://216.121.112.228/browse/NH-2415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21114#action_21114 ] Fabio Maulo commented on NH-2415: --------------------------------- Sorry Brian, I didn't see "BasicClassFixture". Ok, I'll check it. > HQL parameters not converted correctly to SQL > --------------------------------------------- > > Key: NH-2415 > URL: http://216.121.112.228/browse/NH-2415 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.1.2.GA, 3.0.0.Beta2 > Reporter: Brian Berns > Priority: Major > > Parameters added to an HQL query are jumbled in the resulting SQL. I have created a simple test case that demonstrates this problem using the BasicClassFixture: > [Test] > public void TestHQL() > { > var bc = InsertBasicClass(1); > using (var session = OpenSession()) > using (var trans = session.BeginTransaction()) > { > var hql = "from BasicClass bc where (bc.StringProperty = :prop) and (bc.StringMap[:key] = :value)"; > bc = session.CreateQuery(hql) > .SetParameter("prop", "string property") > .SetParameter("key", "keyZero") > .SetParameter("value", "string zero") > .UniqueResult<BasicClass>(); > Assert.NotNull(bc); > session.Delete(bc); > trans.Commit(); > } > } > The generated SQL is: > exec sp_executesql N'select basicclass0_.id as id16_, basicclass0_.char_p as char2_16_, basicclass0_.class_p as class3_16_, basicclass0_.cinfo_p as cinfo4_16_, basicclass0_.dtm_p as dtm5_16_, basicclass0_.shrt_p as shrt6_16_, basicclass0_.int_p as int7_16_, basicclass0_.lng_p as lng8_16_, basicclass0_.flt_p as flt9_16_, basicclass0_.str_p as str10_16_, basicclass0_.ticks_p as ticks11_16_, basicclass0_.tf_p as tf12_16_, basicclass0_.yn_p as yn13_16_, basicclass0_.priv_fld as priv14_16_ from bc basicclass0_, bc_stmap stringmap1_ where basicclass0_.id=stringmap1_.bc_id and stringmap1_.strm_idx = @p0 and basicclass0_.str_p=@p1 and stringmap1_.str_val=@p2',N'@p0 nvarchar(4000),@p1 nvarchar(10),@p2 nvarchar(4000)',@p0=N'string property',@p1=N'keyZero',@p2=N'string zero' > This query returns no rows when it should return exactly one. This is because @p0 and @p1 have been swapped. -- 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: Brian B. (JIRA) <nh...@gm...> - 2011-05-17 23:18:54
|
[ http://216.121.112.228/browse/NH-2415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21113#action_21113 ] Brian Berns commented on NH-2415: --------------------------------- Fabio, I don't understand what you mean by "I would have a failing test". In my bug report, I provided a simple, clear unit test that fails. What else can I do to demonstrate the bug? > HQL parameters not converted correctly to SQL > --------------------------------------------- > > Key: NH-2415 > URL: http://216.121.112.228/browse/NH-2415 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.1.2.GA, 3.0.0.Beta2 > Reporter: Brian Berns > Priority: Major > > Parameters added to an HQL query are jumbled in the resulting SQL. I have created a simple test case that demonstrates this problem using the BasicClassFixture: > [Test] > public void TestHQL() > { > var bc = InsertBasicClass(1); > using (var session = OpenSession()) > using (var trans = session.BeginTransaction()) > { > var hql = "from BasicClass bc where (bc.StringProperty = :prop) and (bc.StringMap[:key] = :value)"; > bc = session.CreateQuery(hql) > .SetParameter("prop", "string property") > .SetParameter("key", "keyZero") > .SetParameter("value", "string zero") > .UniqueResult<BasicClass>(); > Assert.NotNull(bc); > session.Delete(bc); > trans.Commit(); > } > } > The generated SQL is: > exec sp_executesql N'select basicclass0_.id as id16_, basicclass0_.char_p as char2_16_, basicclass0_.class_p as class3_16_, basicclass0_.cinfo_p as cinfo4_16_, basicclass0_.dtm_p as dtm5_16_, basicclass0_.shrt_p as shrt6_16_, basicclass0_.int_p as int7_16_, basicclass0_.lng_p as lng8_16_, basicclass0_.flt_p as flt9_16_, basicclass0_.str_p as str10_16_, basicclass0_.ticks_p as ticks11_16_, basicclass0_.tf_p as tf12_16_, basicclass0_.yn_p as yn13_16_, basicclass0_.priv_fld as priv14_16_ from bc basicclass0_, bc_stmap stringmap1_ where basicclass0_.id=stringmap1_.bc_id and stringmap1_.strm_idx = @p0 and basicclass0_.str_p=@p1 and stringmap1_.str_val=@p2',N'@p0 nvarchar(4000),@p1 nvarchar(10),@p2 nvarchar(4000)',@p0=N'string property',@p1=N'keyZero',@p2=N'string zero' > This query returns no rows when it should return exactly one. This is because @p0 and @p1 have been swapped. -- 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-17 23:13:47
|
[ http://216.121.112.228/browse/NH-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-1847. --------------------------- Resolution: Incomplete 2 years waiting to know the mapped cascade are enough. > EvictVisitor fix for non session associated collections > ------------------------------------------------------- > > Key: NH-1847 > URL: http://216.121.112.228/browse/NH-1847 > Project: NHibernate > Issue Type: Patch > Components: Core > Affects Versions: 2.0.0.GA, 2.0.1.GA, 2.1.0.Alpha3 > Reporter: Gediminas Guoba > > Hello, > Could you please apply a change to NHibernate.Event.Default.EvictVisitor class > method private void EvictCollection(IPersistentCollection collection) > and change line: > if (ce.LoadedPersister != null && ce.LoadedKey != null) > to > if (ce != null && ce.LoadedPersister != null && ce.LoadedKey != null) > Issue: > I have an object "A" whitch was reassociated with session. This object has a collection. When I trying to Evict object "A" from session I'm getting exception "Object is not set..." because collection is not reassociated with the session (I'm not sure if it is possible, because Lock method only allows proxy entities). > Thanks in advance, > Geddis -- 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-17 23:11:50
|
[ http://216.121.112.228/browse/NH-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo reopened NH-1847: ----------------------------- > EvictVisitor fix for non session associated collections > ------------------------------------------------------- > > Key: NH-1847 > URL: http://216.121.112.228/browse/NH-1847 > Project: NHibernate > Issue Type: Patch > Components: Core > Affects Versions: 2.0.0.GA, 2.0.1.GA, 2.1.0.Alpha3 > Reporter: Gediminas Guoba > > Hello, > Could you please apply a change to NHibernate.Event.Default.EvictVisitor class > method private void EvictCollection(IPersistentCollection collection) > and change line: > if (ce.LoadedPersister != null && ce.LoadedKey != null) > to > if (ce != null && ce.LoadedPersister != null && ce.LoadedKey != null) > Issue: > I have an object "A" whitch was reassociated with session. This object has a collection. When I trying to Evict object "A" from session I'm getting exception "Object is not set..." because collection is not reassociated with the session (I'm not sure if it is possible, because Lock method only allows proxy entities). > Thanks in advance, > Geddis -- 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-17 23:11:47
|
[ http://216.121.112.228/browse/NH-1847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-1847. --------------------------- Resolution: Won't Fix > EvictVisitor fix for non session associated collections > ------------------------------------------------------- > > Key: NH-1847 > URL: http://216.121.112.228/browse/NH-1847 > Project: NHibernate > Issue Type: Patch > Components: Core > Affects Versions: 2.0.0.GA, 2.0.1.GA, 2.1.0.Alpha3 > Reporter: Gediminas Guoba > > Hello, > Could you please apply a change to NHibernate.Event.Default.EvictVisitor class > method private void EvictCollection(IPersistentCollection collection) > and change line: > if (ce.LoadedPersister != null && ce.LoadedKey != null) > to > if (ce != null && ce.LoadedPersister != null && ce.LoadedKey != null) > Issue: > I have an object "A" whitch was reassociated with session. This object has a collection. When I trying to Evict object "A" from session I'm getting exception "Object is not set..." because collection is not reassociated with the session (I'm not sure if it is possible, because Lock method only allows proxy entities). > Thanks in advance, > Geddis -- 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-17 23:08:48
|
[ http://216.121.112.228/browse/NH-1845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-1845. --------------------------- Resolution: Cannot Reproduce The test is on trunk and does not fails even without apply the patch. Thanks for the effort. > StatefulPersistenceContext.RemoveEntity KeyNotFoundException on Evict > --------------------------------------------------------------------- > > Key: NH-1845 > URL: http://216.121.112.228/browse/NH-1845 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.0.1.GA > Reporter: David Cowan > > In entities with parent/child relationships calling Evict can cause KeyNotFoundException's in StatefulPersistenceContext.RemoveEntity > Stack trace is below. Also see this forum post > https://forum.hibernate.org/viewtopic.php?f=25&t=993443&view=previous > System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. > at System.ThrowHelper.ThrowKeyNotFoundException() > at System.Collections.Generic.Dictionary`2.get_Item(TKey key) > at NHibernate.Engine.StatefulPersistenceContext.RemoveEntity(EntityKey key) > at NHibernate.Event.Default.DefaultEvictEventListener.OnEvict(EvictEvent event) > at NHibernate.Impl.SessionImpl.FireEvict(EvictEvent evictEvent) > at NHibernate.Impl.SessionImpl.Evict(Object obj) > at NHibernate.Engine.CascadingAction.EvictCascadingAction.Cascade(IEventSource session, Object child, String entityName, Object anything, Boolean isCascadeDeleteEnabled) > at NHibernate.Engine.Cascade.CascadeToOne(Object child, IType type, CascadeStyle style, Object anything, Boolean isCascadeDeleteEnabled) > at NHibernate.Engine.Cascade.CascadeAssociation(Object child, IType type, CascadeStyle style, Object anything, Boolean isCascadeDeleteEnabled) > at NHibernate.Engine.Cascade.CascadeProperty(Object child, IType type, CascadeStyle style, Object anything, Boolean isCascadeDeleteEnabled) > at NHibernate.Engine.Cascade.CascadeOn(IEntityPersister persister, Object parent, Object anything) > at NHibernate.Event.Default.DefaultEvictEventListener.DoEvict(Object obj, EntityKey key, IEntityPersister persister, IEventSource session) > at NHibernate.Event.Default.DefaultEvictEventListener.OnEvict(EvictEvent event) > at NHibernate.Impl.SessionImpl.FireEvict(EvictEvent evictEvent) > at NHibernate.Impl.SessionImpl.Evict(Object obj) > at NHibernate.Engine.CascadingAction.EvictCascadingAction.Cascade(IEventSource session, Object child, String entityName, Object anything, Boolean isCascadeDeleteEnabled) > at NHibernate.Engine.Cascade.CascadeToOne(Object child, IType type, CascadeStyle style, Object anything, Boolean isCascadeDeleteEnabled) > at NHibernate.Engine.Cascade.CascadeAssociation(Object child, IType type, CascadeStyle style, Object anything, Boolean isCascadeDeleteEnabled) > at NHibernate.Engine.Cascade.CascadeProperty(Object child, IType type, CascadeStyle style, Object anything, Boolean isCascadeDeleteEnabled) > at NHibernate.Engine.Cascade.CascadeOn(IEntityPersister persister, Object parent, Object anything) > at NHibernate.Event.Default.DefaultEvictEventListener.DoEvict(Object obj, EntityKey key, IEntityPersister persister, IEventSource session) > at NHibernate.Event.Default.DefaultEvictEventListener.OnEvict(EvictEvent event) > at NHibernate.Impl.SessionImpl.FireEvict(EvictEvent evictEvent) > at NHibernate.Impl.SessionImpl.Evict(Object obj) -- 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-17 22:42:47
|
[ http://216.121.112.228/browse/NH-2039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2039. --------------------------- Resolution: Obsolete > Explicit error message is lost when a mapping file is missing > ------------------------------------------------------------- > > Key: NH-2039 > URL: http://216.121.112.228/browse/NH-2039 > Project: NHibernate > Issue Type: Patch > Components: Core > Affects Versions: 2.1.2.GA > Reporter: Stéphane Farges > Priority: Minor > > Hi, > I was missing a mapping file but the error was not explicit enough to understand the problem, by debugging, I found the following method in src\NHibernate\Cfg\Configuration.cs, an exception was throw on configuration.classes[className] so the throw new MappingException > was never reached. > private PersistentClass GetPersistentClass(string className) > { > PersistentClass pc = configuration.classes[className]; > if (pc == null) > { > throw new MappingException("persistent class not known: " + className); > } > return pc; > } > If we replace the method with the following code, I think we should get the intended behaviour : > private PersistentClass GetPersistentClass(string className) > { > PersistentClass pc; > if (!configuration.classes.TryGetValue(className, out pc)) > { > throw new MappingException("persistent class not known: " + className); > } > return pc; > } -- 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-17 22:39:54
|
[ http://216.121.112.228/browse/NH-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21110#action_21110 ] Fabio Maulo commented on NH-2088: --------------------------------- If you have a patch you can send it freely. > IO APM Implement in NHibernate > ------------------------------ > > Key: NH-2088 > URL: http://216.121.112.228/browse/NH-2088 > Project: NHibernate > Issue Type: New Feature > Components: Core > Affects Versions: 3.0.0.Alpha1 > Reporter: li yongjing > Priority: Major > > many people hope a IO APM(http://msdn.microsoft.com/en-us/magazine/cc163467.aspx) Implement in NHibernate. We use SQL Server 2005 and we are building a client software. Now we have to execute SQL in UI Thread because of Session is not thread safe. It will display "No Respongding" in our application when a great amount of data to Submit to DB. > We know .net framework support IO-APM from version 2.0. The class SQLCommand has a method called "BeginExecuteNonQuery" and "EndExecuteNonQuery", It implements standard APM pattern. So We can use it to send async request to SQL Server. It return immediatly. When Database finished, It will callback and send the data We need. IO APM do not need another thread, just use hardware IOCP. So it will save computer resource and cost less CPU time. Some .net FCL implement APM, such as Stream.BeginRead, Delegate.BeginInvoke, SQLCommand.BeginExecuteNonQuery. As you know, .NET 4.0 enhance parallel task to use multicore support. We think if NHibernate implement APM will take full advantage of hardware support. > We have a glance at NHibernate source, We find it use the interface "IDBCommand.ExecuteNonQuery". The APM support only occurs in SQLCommand. So can you add a callback method like "IAsyncResult BeginExecuteNonQuery(AsyncCallback callback, object stateObject)? Although it only support SQL Server, it can decrease UI responding time and less cost of CPU resource. > In our opinion, If this function occurs in the next version, everyone who use NHibernate will reap the benefits of APM async pattern. > So could you help us to let NHibernate support APM? If you have any idea, please contact with us freely. -- 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-17 22:31:46
|
[ http://216.121.112.228/browse/NH-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2404. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta1 It was fixed few days ago, perhaps some weeks, fixing another issue... but I can't remember which one. > Future queries crash (MultiQuery) when using projection queries using hql + result transformer or the linq provider (which compiles into hql) > ---------------------------------------------------------------------------------------------------------------------------------------------- > > Key: NH-2404 > URL: http://216.121.112.228/browse/NH-2404 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 3.0.0.Beta2, 3.0.0.CR1 > Reporter: Olli Ryhänen > Priority: Major > Fix For: 3.2.0Beta1 > > Attachments: NH2404_Test.patch > > > Using HQL query to create a projection and then choosing a result transformer to it crashes when using .Future<DTO> method to turn it into a multi-query query with exception: > System.ArgumentException: The value "System.Object[]" is not of type "DTO" and cannot be used in this generic collection. > The same is true when using the new .ToFuture<DTO>() support added for the linq provider and it crashes in the same location of the multi-query implementation. > Example code that works: > var query = session.CreateQuery("select e.Id as EntityId, e.Name as EntityName from TestEntity e") > .SetResultTransformer(Transformers.AliasToBean(typeof (TestEntityDto))) > .List<TestEntityDto>(); > Same query using future support causes the crash: > var query = session.CreateQuery("select e.Id as EntityId, e.Name as EntityName from TestEntity e") > .SetResultTransformer(Transformers.AliasToBean(typeof (TestEntityDto))) > .Future<TestEntityDto>(); -- 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-17 22:25:51
|
[ http://216.121.112.228/browse/NH-2415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21108#action_21108 ] Fabio Maulo commented on NH-2415: --------------------------------- I would have a failing test. The direction is this: http://nhforge.org/blogs/nhibernate/archive/2008/10/04/the-best-way-to-solve-nhibernate-bugs-submit-good-unit-test.aspx > HQL parameters not converted correctly to SQL > --------------------------------------------- > > Key: NH-2415 > URL: http://216.121.112.228/browse/NH-2415 > Project: NHibernate > Issue Type: Bug > Components: Core > Affects Versions: 2.1.2.GA, 3.0.0.Beta2 > Reporter: Brian Berns > Priority: Major > > Parameters added to an HQL query are jumbled in the resulting SQL. I have created a simple test case that demonstrates this problem using the BasicClassFixture: > [Test] > public void TestHQL() > { > var bc = InsertBasicClass(1); > using (var session = OpenSession()) > using (var trans = session.BeginTransaction()) > { > var hql = "from BasicClass bc where (bc.StringProperty = :prop) and (bc.StringMap[:key] = :value)"; > bc = session.CreateQuery(hql) > .SetParameter("prop", "string property") > .SetParameter("key", "keyZero") > .SetParameter("value", "string zero") > .UniqueResult<BasicClass>(); > Assert.NotNull(bc); > session.Delete(bc); > trans.Commit(); > } > } > The generated SQL is: > exec sp_executesql N'select basicclass0_.id as id16_, basicclass0_.char_p as char2_16_, basicclass0_.class_p as class3_16_, basicclass0_.cinfo_p as cinfo4_16_, basicclass0_.dtm_p as dtm5_16_, basicclass0_.shrt_p as shrt6_16_, basicclass0_.int_p as int7_16_, basicclass0_.lng_p as lng8_16_, basicclass0_.flt_p as flt9_16_, basicclass0_.str_p as str10_16_, basicclass0_.ticks_p as ticks11_16_, basicclass0_.tf_p as tf12_16_, basicclass0_.yn_p as yn13_16_, basicclass0_.priv_fld as priv14_16_ from bc basicclass0_, bc_stmap stringmap1_ where basicclass0_.id=stringmap1_.bc_id and stringmap1_.strm_idx = @p0 and basicclass0_.str_p=@p1 and stringmap1_.str_val=@p2',N'@p0 nvarchar(4000),@p1 nvarchar(10),@p2 nvarchar(4000)',@p0=N'string property',@p1=N'keyZero',@p2=N'string zero' > This query returns no rows when it should return exactly one. This is because @p0 and @p1 have been swapped. -- 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-17 22:23:30
|
[ http://216.121.112.228/browse/NH-2559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21106#action_21106 ] Fabio Maulo commented on NH-2559: --------------------------------- The test does not fail. Test committed in the trunk. > NH 3.0 Linq Provider : Issue using multiple filters on the same entity > ---------------------------------------------------------------------- > > Key: NH-2559 > URL: http://216.121.112.228/browse/NH-2559 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.GA > Reporter: Justin Greene > Priority: Critical > Attachments: DotNodeFix.patch, ManyToManyAny.patch > > > Exception: > NHibernate.Test.Linq.ByMethod.AnyTests.ManyToManyAny: > NHibernate.QueryException : could not resolve property: Description of: NHibernate.DomainModel.Northwind.Entities.Employee [.Where[NHibernate.DomainModel.Northwind.Entities.Order](.Where[NHibernate.DomainModel.Northwind.Entities.Order](NHibernate.Linq.NhQueryable`1[NHibernate.DomainModel.Northwind.Entities.Order], Quote((o, ) => (String.op_Equality(o.Employee.Address.Region, p1))), ), Quote((o, ) => (.Any[NHibernate.DomainModel.Northwind.Entities.Territory](o.Employee.Territories, (t, ) => (String.op_Equality(t.Description, p2)), ))), )] > Details: > If you remove the first where clause the query will work properly. Adding it back in results in the above exception. I've also run into a separate version of what I believe is the same problem; except that it fails silently and just produces an incorrect subquery. I am unable to reproduce this second issue in nhibernates test harness. -- 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-17 22:17:45
|
[ http://216.121.112.228/browse/NH-2559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2559. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta1 Probably it was fixed before 3.2.0Beta1 > NH 3.0 Linq Provider : Issue using multiple filters on the same entity > ---------------------------------------------------------------------- > > Key: NH-2559 > URL: http://216.121.112.228/browse/NH-2559 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.GA > Reporter: Justin Greene > Priority: Critical > Fix For: 3.2.0Beta1 > > Attachments: DotNodeFix.patch, ManyToManyAny.patch > > > Exception: > NHibernate.Test.Linq.ByMethod.AnyTests.ManyToManyAny: > NHibernate.QueryException : could not resolve property: Description of: NHibernate.DomainModel.Northwind.Entities.Employee [.Where[NHibernate.DomainModel.Northwind.Entities.Order](.Where[NHibernate.DomainModel.Northwind.Entities.Order](NHibernate.Linq.NhQueryable`1[NHibernate.DomainModel.Northwind.Entities.Order], Quote((o, ) => (String.op_Equality(o.Employee.Address.Region, p1))), ), Quote((o, ) => (.Any[NHibernate.DomainModel.Northwind.Entities.Territory](o.Employee.Territories, (t, ) => (String.op_Equality(t.Description, p2)), ))), )] > Details: > If you remove the first where clause the query will work properly. Adding it back in results in the above exception. I've also run into a separate version of what I believe is the same problem; except that it fails silently and just produces an incorrect subquery. I am unable to reproduce this second issue in nhibernates test harness. -- 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-17 22:13:48
|
[ http://216.121.112.228/browse/NH-2559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2559: ---------------------------- Summary: NH 3.0 Linq Provider : Issue using multiple filters on the same entity (was: NH 3.0 Linq Provider : Issue using multiple filters on the same entity - test case attached) > NH 3.0 Linq Provider : Issue using multiple filters on the same entity > ---------------------------------------------------------------------- > > Key: NH-2559 > URL: http://216.121.112.228/browse/NH-2559 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.GA > Reporter: Justin Greene > Priority: Critical > Attachments: DotNodeFix.patch, ManyToManyAny.patch > > > Exception: > NHibernate.Test.Linq.ByMethod.AnyTests.ManyToManyAny: > NHibernate.QueryException : could not resolve property: Description of: NHibernate.DomainModel.Northwind.Entities.Employee [.Where[NHibernate.DomainModel.Northwind.Entities.Order](.Where[NHibernate.DomainModel.Northwind.Entities.Order](NHibernate.Linq.NhQueryable`1[NHibernate.DomainModel.Northwind.Entities.Order], Quote((o, ) => (String.op_Equality(o.Employee.Address.Region, p1))), ), Quote((o, ) => (.Any[NHibernate.DomainModel.Northwind.Entities.Territory](o.Employee.Territories, (t, ) => (String.op_Equality(t.Description, p2)), ))), )] > Details: > If you remove the first where clause the query will work properly. Adding it back in results in the above exception. I've also run into a separate version of what I believe is the same problem; except that it fails silently and just produces an incorrect subquery. I am unable to reproduce this second issue in nhibernates test harness. -- 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-17 21:22:47
|
[ http://216.121.112.228/browse/NH-2568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2568. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta1 Thanks Jeff to put all this effort in this issue which was so important (blocker) for your own commercial project. We really appreciate the attitude and overall the clear test you provides. P.S. Today I took a chamomile. > Create Custom Persister for Collection Type inherited from OneToManyPersister > ----------------------------------------------------------------------------- > > Key: NH-2568 > URL: http://216.121.112.228/browse/NH-2568 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.0.0.GA > Reporter: Jeff Greenland > Priority: Minor > Fix For: 3.2.0Beta1 > > > Encountered issue where setting a Persister Type on a collection property (specifically a type of List) would throw a NullPointerException when NHibernate initialized. Our persister, called MyPersister as a test, extended OneToManyPersister and only had a constructor defined which matched the constructor in the base class (OneToManyPersister). Here's our analysis as to why it looks like a bug: > Tracing through the code revealed that a constructor was not found on MyPersister matching the expected arguments. Those arguments are defined on line 34 of PersisterFactory.cs for CollectionPersister types and are Mapping.Collection, ICacheConcurrencyStrategy, and ISessionFactoryImplementor. > In the CreateCollectionPersister() method (line 68), if there is no persister class defined, it calls the OneToManyPersister implementation of ICollectionPersister with Mapping.Collection, ICacheConcurrencyStrategy, Configuration, and ISessionFactoryImplementor parameters. However, if a custom persister class is defined, it calls the Create() method (line 124) with the Configuration parameter missing, and consequently the Create() method does not invoke a matching constructor with that parameter. > It seems to us that since the default persister class of OneToManyPersister accepts the 4 argument constructor, and if you specified a custom persister that extends OneToManyPersister, the custom persister should accept the same 4 arguments. In other words, if I specify a custom persister on my class as OneToManyPersister (the same as the default), NHibernate would fail to initialize because it couldn't construct OneToManyPersister. > Looks related to NH-1957, which appears to have been immediately closed. I've included our diff below that seems to have fixed the issue. > Diff: > Index: PersisterFactory.cs > =================================================================== > --- PersisterFactory.cs (revision 31412) > +++ PersisterFactory.cs (revision 31413) > @@ -31,14 +31,15 @@ > > // TODO: is it really necessary to provide Configuration to CollectionPersisters ? Should it not be enough with associated class ? > // or why does ClassPersister's not get access to configuration ? > - private static readonly System.Type[] CollectionPersisterConstructorArgs = new System.Type[] > + private static readonly System.Type[] CollectionPersisterConstructorArgs = new System.Type[] > { > typeof(Mapping.Collection), > typeof(ICacheConcurrencyStrategy), > + typeof(Configuration), > typeof(ISessionFactoryImplementor) > }; > > - /// <summary> > + /// <summary> > /// Creates a built in Entity Persister or a custom Persister. > /// </summary> > public static IEntityPersister CreateClassPersister(PersistentClass model, ICacheConcurrencyStrategy cache, > @@ -78,10 +79,11 @@ > } > else > { > - return Create(persisterClass, model, cache, factory); > + return (ICollectionPersister) Create(persisterClass, model, cache, cfg, factory); > } > } > > + > /// <summary> > /// Creates a specific Persister - could be a built in or custom persister. > /// </summary> > @@ -122,7 +124,7 @@ > } > > public static ICollectionPersister Create(System.Type persisterClass, Mapping.Collection model, > - ICacheConcurrencyStrategy cache, ISessionFactoryImplementor factory) > + ICacheConcurrencyStrategy cache, Configuration cfg, ISessionFactoryImplementor factory) > { > ConstructorInfo pc; > try > @@ -136,8 +138,8 @@ > > try > { > - return (ICollectionPersister) pc.Invoke(new object[] {model, cache, factory}); > - } > + return (ICollectionPersister)pc.Invoke(new object[] { model, cache, cfg, factory }); > + } > catch (TargetInvocationException tie) > { > Exception e = tie.InnerException; > @@ -155,5 +157,6 @@ > throw new MappingException("Could not instantiate collection persister " + persisterClass.Name, e); > } > } > + > } > } -- 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-17 18:59:45
|
[ http://216.121.112.228/browse/NH-2568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo updated NH-2568: ---------------------------- Priority: Minor (was: Major) Issue Type: Improvement (was: Bug) Summary: Create Custom Persister for Collection Type inherited from OneToManyPersister (was: Cannot Create Custom Persister for Collection Type) > Create Custom Persister for Collection Type inherited from OneToManyPersister > ----------------------------------------------------------------------------- > > Key: NH-2568 > URL: http://216.121.112.228/browse/NH-2568 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.0.0.GA > Reporter: Jeff Greenland > Priority: Minor > > Encountered issue where setting a Persister Type on a collection property (specifically a type of List) would throw a NullPointerException when NHibernate initialized. Our persister, called MyPersister as a test, extended OneToManyPersister and only had a constructor defined which matched the constructor in the base class (OneToManyPersister). Here's our analysis as to why it looks like a bug: > Tracing through the code revealed that a constructor was not found on MyPersister matching the expected arguments. Those arguments are defined on line 34 of PersisterFactory.cs for CollectionPersister types and are Mapping.Collection, ICacheConcurrencyStrategy, and ISessionFactoryImplementor. > In the CreateCollectionPersister() method (line 68), if there is no persister class defined, it calls the OneToManyPersister implementation of ICollectionPersister with Mapping.Collection, ICacheConcurrencyStrategy, Configuration, and ISessionFactoryImplementor parameters. However, if a custom persister class is defined, it calls the Create() method (line 124) with the Configuration parameter missing, and consequently the Create() method does not invoke a matching constructor with that parameter. > It seems to us that since the default persister class of OneToManyPersister accepts the 4 argument constructor, and if you specified a custom persister that extends OneToManyPersister, the custom persister should accept the same 4 arguments. In other words, if I specify a custom persister on my class as OneToManyPersister (the same as the default), NHibernate would fail to initialize because it couldn't construct OneToManyPersister. > Looks related to NH-1957, which appears to have been immediately closed. I've included our diff below that seems to have fixed the issue. > Diff: > Index: PersisterFactory.cs > =================================================================== > --- PersisterFactory.cs (revision 31412) > +++ PersisterFactory.cs (revision 31413) > @@ -31,14 +31,15 @@ > > // TODO: is it really necessary to provide Configuration to CollectionPersisters ? Should it not be enough with associated class ? > // or why does ClassPersister's not get access to configuration ? > - private static readonly System.Type[] CollectionPersisterConstructorArgs = new System.Type[] > + private static readonly System.Type[] CollectionPersisterConstructorArgs = new System.Type[] > { > typeof(Mapping.Collection), > typeof(ICacheConcurrencyStrategy), > + typeof(Configuration), > typeof(ISessionFactoryImplementor) > }; > > - /// <summary> > + /// <summary> > /// Creates a built in Entity Persister or a custom Persister. > /// </summary> > public static IEntityPersister CreateClassPersister(PersistentClass model, ICacheConcurrencyStrategy cache, > @@ -78,10 +79,11 @@ > } > else > { > - return Create(persisterClass, model, cache, factory); > + return (ICollectionPersister) Create(persisterClass, model, cache, cfg, factory); > } > } > > + > /// <summary> > /// Creates a specific Persister - could be a built in or custom persister. > /// </summary> > @@ -122,7 +124,7 @@ > } > > public static ICollectionPersister Create(System.Type persisterClass, Mapping.Collection model, > - ICacheConcurrencyStrategy cache, ISessionFactoryImplementor factory) > + ICacheConcurrencyStrategy cache, Configuration cfg, ISessionFactoryImplementor factory) > { > ConstructorInfo pc; > try > @@ -136,8 +138,8 @@ > > try > { > - return (ICollectionPersister) pc.Invoke(new object[] {model, cache, factory}); > - } > + return (ICollectionPersister)pc.Invoke(new object[] { model, cache, cfg, factory }); > + } > catch (TargetInvocationException tie) > { > Exception e = tie.InnerException; > @@ -155,5 +157,6 @@ > throw new MappingException("Could not instantiate collection persister " + persisterClass.Name, e); > } > } > + > } > } -- 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-17 18:04:46
|
[ http://216.121.112.228/browse/NH-2695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2695. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta1 > 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 > Fix For: 3.2.0Beta1 > > > 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-17 17:45:53
|
[ http://216.121.112.228/browse/NH-2615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2615. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta1 > Linq Fetch cannot traverse through components > --------------------------------------------- > > Key: NH-2615 > URL: http://216.121.112.228/browse/NH-2615 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.GA > Reporter: Jerome Haltom > Assignee: Fabio Maulo > Fix For: 3.2.0Beta1 > > > Subject seems to say it all. Gets an exception inside NH saying that the join is incorrect. -- 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-17 17:45:48
|
[ http://216.121.112.228/browse/NH-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo resolved NH-2705. ----------------------------- Resolution: Fixed Fix Version/s: 3.2.0Beta1 > Linq/Hql/Criteria Fetch on class hierarchy generates invalid SQL when derivees mix component and many-to-one mappings > --------------------------------------------------------------------------------------------------------------------- > > Key: NH-2705 > URL: http://216.121.112.228/browse/NH-2705 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.1.0 > Reporter: Andrei Alecu > Assignee: Fabio Maulo > Priority: Minor > Fix For: 3.2.0Beta1 > > Attachments: nh2705 test.patch > > > Consider the following scenario: > public class ItemBase > { > public virtual int Id { get; set; } > public virtual SubItemBase SubItem { get; set; } > } > public class ItemWithComponentSubItem:ItemBase { } > > public class ItemWithManyToOneSubItem:ItemBase { } > ItemWithComponentSubItem defines in its mapping that SubItem is a component of SubItemComponent type (which derives from SubItemBase) > ItemWithManyToOneSubItem defines in its mapping that SubItem is a many-to-one of SubItemEntity type (again, derives from SubItemBase) > Running the following query with fetch results in invalid SQL being executed: > from ItemBase i left join fetch i.SubItem > Removing the fetch makes it work properly. > from ItemBase i > Also, this works: > from ItemWithManyToOneSubItem i left join fetch i.SubItem > But this doesn't: > from ItemWithComponentSubItem i left join fetch i.SubItem (one would argue there's nothing to fetch here, but instead of throwing an exception, the fetch instruction should just be ignored and maybe a warning logged, it would allow for much better reuse of code) > I will attach a unit test that demonstrates this bug, and also a related one at NH-2615. > I believe the correct behavior here is to allow fetch on components, and simply ignore it rather than throwing an exception. -- 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-17 17:43:52
|
[ http://216.121.112.228/browse/NH-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21104#action_21104 ] Fabio Maulo commented on NH-2705: --------------------------------- Ok, but take care with polymorphic queries (asking for the base type shared by component and entity). > Linq/Hql/Criteria Fetch on class hierarchy generates invalid SQL when derivees mix component and many-to-one mappings > --------------------------------------------------------------------------------------------------------------------- > > Key: NH-2705 > URL: http://216.121.112.228/browse/NH-2705 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.1.0 > Reporter: Andrei Alecu > Assignee: Fabio Maulo > Priority: Minor > Attachments: nh2705 test.patch > > > Consider the following scenario: > public class ItemBase > { > public virtual int Id { get; set; } > public virtual SubItemBase SubItem { get; set; } > } > public class ItemWithComponentSubItem:ItemBase { } > > public class ItemWithManyToOneSubItem:ItemBase { } > ItemWithComponentSubItem defines in its mapping that SubItem is a component of SubItemComponent type (which derives from SubItemBase) > ItemWithManyToOneSubItem defines in its mapping that SubItem is a many-to-one of SubItemEntity type (again, derives from SubItemBase) > Running the following query with fetch results in invalid SQL being executed: > from ItemBase i left join fetch i.SubItem > Removing the fetch makes it work properly. > from ItemBase i > Also, this works: > from ItemWithManyToOneSubItem i left join fetch i.SubItem > But this doesn't: > from ItemWithComponentSubItem i left join fetch i.SubItem (one would argue there's nothing to fetch here, but instead of throwing an exception, the fetch instruction should just be ignored and maybe a warning logged, it would allow for much better reuse of code) > I will attach a unit test that demonstrates this bug, and also a related one at NH-2615. > I believe the correct behavior here is to allow fetch on components, and simply ignore it rather than throwing an exception. -- 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-17 17:35:54
|
[ http://216.121.112.228/browse/NH-2615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21103#action_21103 ] Fabio Maulo commented on NH-2615: --------------------------------- The syntax 1 is locked by Remotion.Linq > Linq Fetch cannot traverse through components > --------------------------------------------- > > Key: NH-2615 > URL: http://216.121.112.228/browse/NH-2615 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.GA > Reporter: Jerome Haltom > Assignee: Fabio Maulo > > Subject seems to say it all. Gets an exception inside NH saying that the join is incorrect. -- 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-17 17:30:58
|
[ http://216.121.112.228/browse/NH-2615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo reassigned NH-2615: ------------------------------- Assignee: Fabio Maulo > Linq Fetch cannot traverse through components > --------------------------------------------- > > Key: NH-2615 > URL: http://216.121.112.228/browse/NH-2615 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.GA > Reporter: Jerome Haltom > Assignee: Fabio Maulo > > Subject seems to say it all. Gets an exception inside NH saying that the join is incorrect. -- 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-17 17:30:53
|
[ http://216.121.112.228/browse/NH-2615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo reassigned NH-2615: ------------------------------- Assignee: Fabio Maulo > Linq Fetch cannot traverse through components > --------------------------------------------- > > Key: NH-2615 > URL: http://216.121.112.228/browse/NH-2615 > Project: NHibernate > Issue Type: Bug > Components: Linq Provider > Affects Versions: 3.0.0.GA > Reporter: Jerome Haltom > Assignee: Fabio Maulo > > Subject seems to say it all. Gets an exception inside NH saying that the join is incorrect. -- 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-17 17:30:46
|
[ http://216.121.112.228/browse/NH-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo reassigned NH-2705: ------------------------------- Assignee: Fabio Maulo > Linq/Hql/Criteria Fetch on class hierarchy generates invalid SQL when derivees mix component and many-to-one mappings > --------------------------------------------------------------------------------------------------------------------- > > Key: NH-2705 > URL: http://216.121.112.228/browse/NH-2705 > Project: NHibernate > Issue Type: Improvement > Components: Core > Affects Versions: 3.1.0 > Reporter: Andrei Alecu > Assignee: Fabio Maulo > Priority: Minor > Attachments: nh2705 test.patch > > > Consider the following scenario: > public class ItemBase > { > public virtual int Id { get; set; } > public virtual SubItemBase SubItem { get; set; } > } > public class ItemWithComponentSubItem:ItemBase { } > > public class ItemWithManyToOneSubItem:ItemBase { } > ItemWithComponentSubItem defines in its mapping that SubItem is a component of SubItemComponent type (which derives from SubItemBase) > ItemWithManyToOneSubItem defines in its mapping that SubItem is a many-to-one of SubItemEntity type (again, derives from SubItemBase) > Running the following query with fetch results in invalid SQL being executed: > from ItemBase i left join fetch i.SubItem > Removing the fetch makes it work properly. > from ItemBase i > Also, this works: > from ItemWithManyToOneSubItem i left join fetch i.SubItem > But this doesn't: > from ItemWithComponentSubItem i left join fetch i.SubItem (one would argue there's nothing to fetch here, but instead of throwing an exception, the fetch instruction should just be ignored and maybe a warning logged, it would allow for much better reuse of code) > I will attach a unit test that demonstrates this bug, and also a related one at NH-2615. > I believe the correct behavior here is to allow fetch on components, and simply ignore it rather than throwing an exception. -- 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 |