From: <fab...@us...> - 2009-05-08 16:40:53
|
Revision: 4270 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4270&view=rev Author: fabiomaulo Date: 2009-05-08 16:40:47 +0000 (Fri, 08 May 2009) Log Message: ----------- Fixed the query syntax for the new parser Modified Paths: -------------- trunk/nhibernate/releasenotes.txt trunk/nhibernate/src/NHibernate.Test/Legacy/MasterDetailTest.cs Modified: trunk/nhibernate/releasenotes.txt =================================================================== --- trunk/nhibernate/releasenotes.txt 2009-05-08 16:07:27 UTC (rev 4269) +++ trunk/nhibernate/releasenotes.txt 2009-05-08 16:40:47 UTC (rev 4270) @@ -9,6 +9,7 @@ * In SchemaExport.Execute the parameter "format" was removed; (NH-1701) enabled configuration property format_sql (default true) * Antlr3.Runtime.dll is required * the syntax foo.bar.baz.elements or foo.bar.baz.indices is not longer supported. Use the alternative syntax of elements(foo.bar.baz) or indices(foo.bar.baz) instead + Note: in some case, where a sub-select is needed, the collection is enough example: FROM m IN CLASS Master WHERE NOT EXISTS( FROM m.Details d WHERE NOT d.I=5 ) ##### Possible Breaking Changes for external frameworks ##### * ISession interface has additional methods Modified: trunk/nhibernate/src/NHibernate.Test/Legacy/MasterDetailTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Legacy/MasterDetailTest.cs 2009-05-08 16:07:27 UTC (rev 4269) +++ trunk/nhibernate/src/NHibernate.Test/Legacy/MasterDetailTest.cs 2009-05-08 16:40:47 UTC (rev 4270) @@ -366,11 +366,11 @@ ISession s = OpenSession(); ITransaction t = s.BeginTransaction(); - string path = IsClassicParser ? "m.Details.elements" : "elements(m.Details)"; + string path = IsClassicParser ? "m.Details.elements" : "m.Details"; if (Dialect.SupportsSubSelects) { - s.CreateQuery("FROM m IN CLASS Master WHERE NOT EXISTS ( FROM d in " + path + " WHERE NOT d.I=5 )").Enumerable(); + s.CreateQuery("FROM m IN CLASS Master WHERE NOT EXISTS ( FROM " + path + " d WHERE NOT d.I=5 )").Enumerable(); s.CreateQuery("FROM m IN CLASS Master WHERE NOT 5 IN ( SELECT d.I FROM d IN " + path + " )").Enumerable(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |