You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(248) |
May
(82) |
Jun
(90) |
Jul
(177) |
Aug
(253) |
Sep
(157) |
Oct
(151) |
Nov
(143) |
Dec
(278) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(152) |
Feb
(107) |
Mar
(177) |
Apr
(133) |
May
(259) |
Jun
(81) |
Jul
(119) |
Aug
(306) |
Sep
(416) |
Oct
(240) |
Nov
(329) |
Dec
(206) |
2006 |
Jan
(466) |
Feb
(382) |
Mar
(153) |
Apr
(162) |
May
(133) |
Jun
(21) |
Jul
(18) |
Aug
(37) |
Sep
(97) |
Oct
(114) |
Nov
(110) |
Dec
(28) |
2007 |
Jan
(74) |
Feb
(65) |
Mar
(49) |
Apr
(76) |
May
(43) |
Jun
(15) |
Jul
(68) |
Aug
(55) |
Sep
(63) |
Oct
(59) |
Nov
(70) |
Dec
(66) |
2008 |
Jan
(71) |
Feb
(60) |
Mar
(120) |
Apr
(31) |
May
(48) |
Jun
(81) |
Jul
(107) |
Aug
(51) |
Sep
(80) |
Oct
(83) |
Nov
(83) |
Dec
(79) |
2009 |
Jan
(83) |
Feb
(110) |
Mar
(97) |
Apr
(91) |
May
(291) |
Jun
(250) |
Jul
(197) |
Aug
(58) |
Sep
(54) |
Oct
(122) |
Nov
(68) |
Dec
(34) |
2010 |
Jan
(50) |
Feb
(17) |
Mar
(63) |
Apr
(61) |
May
(84) |
Jun
(81) |
Jul
(138) |
Aug
(144) |
Sep
(78) |
Oct
(26) |
Nov
(30) |
Dec
(61) |
2011 |
Jan
(33) |
Feb
(35) |
Mar
(166) |
Apr
(221) |
May
(109) |
Jun
(76) |
Jul
(27) |
Aug
(37) |
Sep
(1) |
Oct
(4) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(1) |
2014 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <pa...@us...> - 2011-03-27 17:34:32
|
Revision: 5553 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5553&view=rev Author: patearl Date: 2011-03-27 17:34:26 +0000 (Sun, 27 Mar 2011) Log Message: ----------- PostgreSQL: Added support for database GUID generation. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/PostgreSQLDialect.cs trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/PostgreSQLDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/PostgreSQLDialect.cs 2011-03-27 16:59:07 UTC (rev 5552) +++ trunk/nhibernate/src/NHibernate/Dialect/PostgreSQLDialect.cs 2011-03-27 17:34:26 UTC (rev 5553) @@ -211,5 +211,10 @@ { return value ? "TRUE" : "FALSE"; } + + public override string SelectGUIDString + { + get { return "select uuid_generate_v4()"; } + } } } Modified: trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs =================================================================== --- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs 2011-03-27 16:59:07 UTC (rev 5552) +++ trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs 2011-03-27 17:34:26 UTC (rev 5553) @@ -103,6 +103,23 @@ cmd.ExecuteNonQuery(); } } + + // Install the GUID generator function that uses the most common "random" algorithm. + using (var conn = new NpgsqlConnection(connStr)) + { + conn.Open(); + + using (var cmd = conn.CreateCommand()) + { + cmd.CommandText = + @"CREATE OR REPLACE FUNCTION uuid_generate_v4() + RETURNS uuid + AS '$libdir/uuid-ossp', 'uuid_generate_v4' + VOLATILE STRICT LANGUAGE C;"; + + cmd.ExecuteNonQuery(); + } + } } private static void SetupSQLite(Cfg.Configuration cfg) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-27 16:59:13
|
Revision: 5552 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5552&view=rev Author: patearl Date: 2011-03-27 16:59:07 +0000 (Sun, 27 Mar 2011) Log Message: ----------- Dialect: Removed meaningless HasAlterTable property. Improved the names and functionality of some other recently added properties. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs 2011-03-27 05:31:22 UTC (rev 5551) +++ trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs 2011-03-27 16:59:07 UTC (rev 5552) @@ -813,8 +813,8 @@ var script = new List<string>(); - if (!string.IsNullOrEmpty(dialect.BeforeDropSchemaCommand)) - script.Add(dialect.BeforeDropSchemaCommand); + if (!dialect.SupportsForeignKeyConstraintInAlterTable && !string.IsNullOrEmpty(dialect.DisableForeignKeyConstraintsString)) + script.Add(dialect.DisableForeignKeyConstraintsString); // drop them in reverse order in case db needs it done that way...);); for (int i = auxiliaryDatabaseObjects.Count - 1; i >= 0; i--) @@ -864,8 +864,8 @@ } } - if (!string.IsNullOrEmpty(dialect.AfterDropSchemaCommand)) - script.Add(dialect.AfterDropSchemaCommand); + if (!dialect.SupportsForeignKeyConstraintInAlterTable && !string.IsNullOrEmpty(dialect.EnableForeignKeyConstraintsString)) + script.Add(dialect.EnableForeignKeyConstraintsString); return script.ToArray(); } Modified: trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs 2011-03-27 05:31:22 UTC (rev 5551) +++ trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs 2011-03-27 16:59:07 UTC (rev 5552) @@ -584,14 +584,6 @@ #region DDL support /// <summary> - /// Does this dialect support the <c>ALTER TABLE</c> syntax? - /// </summary> - public virtual bool HasAlterTable - { - get { return true; } - } - - /// <summary> /// Do we need to drop constraints before dropping tables in the dialect? /// </summary> public virtual bool DropConstraints @@ -626,11 +618,11 @@ /// </summary> public virtual bool SupportsForeignKeyConstraintInAlterTable { - get { return HasAlterTable; } + get { return true; } } /// <summary> - /// The syntax used to add a foreign key constraint to a table. + /// The syntax used to add a foreign key constraint to a table. If SupportsForeignKeyConstraintInAlterTable is false, the returned string will be added to the create table statement instead. In this case, extra strings, like "add", that apply when using alter table should be omitted. /// </summary> /// <param name="constraintName">The FK constraint name. </param> /// <param name="foreignKey">The names of the columns comprising the FK </param> @@ -2427,12 +2419,18 @@ return false; } - public virtual string BeforeDropSchemaCommand + /// <summary> + /// Only needed if the Dialect does not have SupportsForeignKeyConstraintInAlterTable. + /// </summary> + public virtual string DisableForeignKeyConstraintsString { get { return null; } } - public virtual string AfterDropSchemaCommand + /// <summary> + /// Only needed if the Dialect does not have SupportsForeignKeyConstraintInAlterTable. + /// </summary> + public virtual string EnableForeignKeyConstraintsString { get { return null; } } Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-27 05:31:22 UTC (rev 5551) +++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-27 16:59:07 UTC (rev 5552) @@ -124,11 +124,6 @@ get { return true; } } - public override bool HasAlterTable - { - get { return false; } - } - public override bool DropConstraints { get { return false; } @@ -293,17 +288,23 @@ /// If there are cycles between tables, it would even be excessively difficult to delete /// the data in the right order first. Because of this, we just turn off the foreign /// constraints before we drop the schema and hope that we're not going to break anything. :( + /// We could theoretically check for data consistency afterwards, but we don't currently. /// </summary> - public override string BeforeDropSchemaCommand + public override string DisableForeignKeyConstraintsString { get { return "PRAGMA foreign_keys = OFF"; } } - public override string AfterDropSchemaCommand + public override string EnableForeignKeyConstraintsString { get { return "PRAGMA foreign_keys = ON"; } } + public override bool SupportsForeignKeyConstraintInAlterTable + { + get { return false; } + } + [Serializable] protected class SQLiteCastFunction : CastFunction { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-27 05:31:30
|
Revision: 5551 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5551&view=rev Author: patearl Date: 2011-03-27 05:31:22 +0000 (Sun, 27 Mar 2011) Log Message: ----------- SQLite: Fixed default property registration and organized registration functions. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-27 05:23:58 UTC (rev 5550) +++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-27 05:31:22 UTC (rev 5551) @@ -23,59 +23,72 @@ /// </summary> public SQLiteDialect() { - RegisterColumnType(DbType.Binary, "BLOB"); + RegisterColumnTypes(); + RegisterFunctions(); + RegisterKeywords(); + RegisterDefaultProperties(); + } + + protected virtual void RegisterColumnTypes() + { + RegisterColumnType(DbType.Binary, "BLOB"); RegisterColumnType(DbType.Byte, "TINYINT"); RegisterColumnType(DbType.Int16, "SMALLINT"); - RegisterColumnType(DbType.Int32, "INT"); - RegisterColumnType(DbType.Int64, "BIGINT"); - RegisterColumnType(DbType.SByte, "INTEGER"); - RegisterColumnType(DbType.UInt16, "INTEGER"); - RegisterColumnType(DbType.UInt32, "INTEGER"); - RegisterColumnType(DbType.UInt64, "INTEGER"); - RegisterColumnType(DbType.Currency, "NUMERIC"); - RegisterColumnType(DbType.Decimal, "NUMERIC"); - RegisterColumnType(DbType.Double, "DOUBLE"); - RegisterColumnType(DbType.Single, "DOUBLE"); - RegisterColumnType(DbType.VarNumeric, "NUMERIC"); - RegisterColumnType(DbType.AnsiString, "TEXT"); - RegisterColumnType(DbType.String, "TEXT"); - RegisterColumnType(DbType.AnsiStringFixedLength, "TEXT"); - RegisterColumnType(DbType.StringFixedLength, "TEXT"); + RegisterColumnType(DbType.Int32, "INT"); + RegisterColumnType(DbType.Int64, "BIGINT"); + RegisterColumnType(DbType.SByte, "INTEGER"); + RegisterColumnType(DbType.UInt16, "INTEGER"); + RegisterColumnType(DbType.UInt32, "INTEGER"); + RegisterColumnType(DbType.UInt64, "INTEGER"); + RegisterColumnType(DbType.Currency, "NUMERIC"); + RegisterColumnType(DbType.Decimal, "NUMERIC"); + RegisterColumnType(DbType.Double, "DOUBLE"); + RegisterColumnType(DbType.Single, "DOUBLE"); + RegisterColumnType(DbType.VarNumeric, "NUMERIC"); + RegisterColumnType(DbType.AnsiString, "TEXT"); + RegisterColumnType(DbType.String, "TEXT"); + RegisterColumnType(DbType.AnsiStringFixedLength, "TEXT"); + RegisterColumnType(DbType.StringFixedLength, "TEXT"); - RegisterColumnType(DbType.Date, "DATE"); - RegisterColumnType(DbType.DateTime, "DATETIME"); - RegisterColumnType(DbType.Time, "TIME"); - RegisterColumnType(DbType.Boolean, "BOOL"); - RegisterColumnType(DbType.Guid, "UNIQUEIDENTIFIER"); + RegisterColumnType(DbType.Date, "DATE"); + RegisterColumnType(DbType.DateTime, "DATETIME"); + RegisterColumnType(DbType.Time, "TIME"); + RegisterColumnType(DbType.Boolean, "BOOL"); + RegisterColumnType(DbType.Guid, "UNIQUEIDENTIFIER"); + } + protected virtual void RegisterFunctions() + { // Using strftime returns 0-padded strings. '07' <> 7, so it is better to convert to an integer. - RegisterFunction("second", new SQLFunctionTemplate(NHibernateUtil.Int32, "cast(strftime('%S', ?1) as int)")); + RegisterFunction("second", new SQLFunctionTemplate(NHibernateUtil.Int32, "cast(strftime('%S', ?1) as int)")); RegisterFunction("minute", new SQLFunctionTemplate(NHibernateUtil.Int32, "cast(strftime('%M', ?1) as int)")); RegisterFunction("hour", new SQLFunctionTemplate(NHibernateUtil.Int32, "cast(strftime('%H', ?1) as int)")); RegisterFunction("day", new SQLFunctionTemplate(NHibernateUtil.Int32, "cast(strftime('%d', ?1) as int)")); RegisterFunction("month", new SQLFunctionTemplate(NHibernateUtil.Int32, "cast(strftime('%m', ?1) as int)")); RegisterFunction("year", new SQLFunctionTemplate(NHibernateUtil.Int32, "cast(strftime('%Y', ?1) as int)")); - // Uses local time like MSSQL and PostgreSQL. - RegisterFunction("current_timestamp", new SQLFunctionTemplate(NHibernateUtil.DateTime, "datetime(current_timestamp, 'localtime')")); - // The System.Data.SQLite driver stores both Date and DateTime as 'YYYY-MM-DD HH:MM:SS' - // The SQLite date() function returns YYYY-MM-DD, which unfortunately SQLite does not consider - // as equal to 'YYYY-MM-DD 00:00:00'. Because of this, it is best to return the - // 'YYYY-MM-DD 00:00:00' format for the date function. - RegisterFunction("date", new SQLFunctionTemplate(NHibernateUtil.Date, "datetime(date(?1))")); + // Uses local time like MSSQL and PostgreSQL. + RegisterFunction("current_timestamp", new SQLFunctionTemplate(NHibernateUtil.DateTime, "datetime(current_timestamp, 'localtime')")); + // The System.Data.SQLite driver stores both Date and DateTime as 'YYYY-MM-DD HH:MM:SS' + // The SQLite date() function returns YYYY-MM-DD, which unfortunately SQLite does not consider + // as equal to 'YYYY-MM-DD 00:00:00'. Because of this, it is best to return the + // 'YYYY-MM-DD 00:00:00' format for the date function. + RegisterFunction("date", new SQLFunctionTemplate(NHibernateUtil.Date, "datetime(date(?1))")); - RegisterFunction("substring", new StandardSQLFunction("substr", NHibernateUtil.String)); - RegisterFunction("left", new SQLFunctionTemplate(NHibernateUtil.String, "substr(?1,1,?2)")); - RegisterFunction("trim", new AnsiTrimEmulationFunction()); + RegisterFunction("substring", new StandardSQLFunction("substr", NHibernateUtil.String)); + RegisterFunction("left", new SQLFunctionTemplate(NHibernateUtil.String, "substr(?1,1,?2)")); + RegisterFunction("trim", new AnsiTrimEmulationFunction()); - RegisterFunction("mod", new SQLFunctionTemplate(NHibernateUtil.Int32, "((?1) % (?2))")); + RegisterFunction("mod", new SQLFunctionTemplate(NHibernateUtil.Int32, "((?1) % (?2))")); - RegisterFunction("iif", new SQLFunctionTemplate(null, "case when ?1 then ?2 else ?3 end")); + RegisterFunction("iif", new SQLFunctionTemplate(null, "case when ?1 then ?2 else ?3 end")); - RegisterFunction("cast", new SQLiteCastFunction()); + RegisterFunction("cast", new SQLiteCastFunction()); + } - + protected virtual void RegisterKeywords() + { RegisterKeyword("int"); // Used in our function templates. - } + } protected virtual void RegisterDefaultProperties() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-27 05:24:07
|
Revision: 5550 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5550&view=rev Author: patearl Date: 2011-03-27 05:23:58 +0000 (Sun, 27 Mar 2011) Log Message: ----------- Tests: All SQLite tests are now passing or ignored. Removed special logic so now any test failure will cause the build to fail. Modified Paths: -------------- trunk/nhibernate/teamcity.build Removed Paths: ------------- trunk/nhibernate/lib/teamcity/sqlite/NHibernate.Test.last-results.xml Deleted: trunk/nhibernate/lib/teamcity/sqlite/NHibernate.Test.last-results.xml =================================================================== --- trunk/nhibernate/lib/teamcity/sqlite/NHibernate.Test.last-results.xml 2011-03-27 05:21:58 UTC (rev 5549) +++ trunk/nhibernate/lib/teamcity/sqlite/NHibernate.Test.last-results.xml 2011-03-27 05:23:58 UTC (rev 5550) @@ -1,11168 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="no"?> -<!--This file represents the results of running a test suite--> -<test-results name="../../build/NHibernate-3.0.1.GA-debug/bin/net-3.5/NHibernate.Test.dll" errors="52" failures="28" not-run="271" inconclusive="0" ignored="270" skipped="0" invalid="1"> - <environment nunit-version="2.5.5.10112" clr-version="2.0.50727.4952" os-version="Microsoft Windows NT 6.1.7600.0" platform="Win32NT" /> - <culture-info current-culture="en-GB" current-uiculture="en-US" /> - <test-suite type="Assembly" name="../../build/NHibernate-3.0.1.GA-debug/bin/net-3.5/NHibernate.Test.dll" executed="True" result="Failure" success="False" asserts="0"> - <results> - <test-suite type="Namespace" name="NHibernate" executed="True" result="Failure" success="False" asserts="0"> - <results> - <test-suite type="Namespace" name="Test" executed="True" result="Failure" success="False" asserts="0"> - <results> - <test-suite type="Namespace" name="Ado" executed="True" result="Failure" success="False" asserts="0"> - <results> - <test-suite type="TestFixture" name="BatcherFixture" executed="True" result="Failure" success="False" asserts="0"> - <results> - <test-case name="NHibernate.Test.Ado.BatcherFixture.AbstractBatcherLog" description="Activating the AbstractBatcher's log the log stream:
-should not contains batch info 
-should contain SQL log info only regarding batcher (SQL log should not be duplicated)
-the batcher should work." executed="False" result="Ignored"> - <reason> - <message><![CDATA[NHibernate.Test.Ado.BatcherFixture does not apply with the current session-factory configuration]]></message> - </reason> - </test-case> - <test-case name="NHibernate.Test.Ado.BatcherFixture.AbstractBatcherLogFormattedSql" description="Activating the AbstractBatcher's log the log stream:
-should contain well formatted SQL log info" executed="False" result="Ignored"> - <reason> - <message><![CDATA[NHibernate.Test.Ado.BatcherFixture does not apply with the current session-factory configuration]]></message> - </reason> - </test-case> - <test-case name="NHibernate.Test.Ado.BatcherFixture.BatchedoutputShouldBeFormatted" description="SqlClient: The batcher log output should be formatted" executed="False" result="Ignored"> - <reason> - <message><![CDATA[NHibernate.Test.Ado.BatcherFixture does not apply with the current session-factory configuration]]></message> - </reason> - </test-case> - <test-case name="NHibernate.Test.Ado.BatcherFixture.OneRoundTripDelete" description="The batcher should run all DELETE queries in only one roundtrip." executed="False" result="Ignored"> - <reason> - <message><![CDATA[NHibernate.Test.Ado.BatcherFixture does not apply with the current session-factory configuration]]></message> - </reason> - </test-case> - <test-case name="NHibernate.Test.Ado.BatcherFixture.OneRoundTripInserts" description="The batcher should run all INSERT queries in only one roundtrip." executed="False" result="Ignored"> - <reason> - <message><![CDATA[NHibernate.Test.Ado.BatcherFixture does not apply with the current session-factory configuration]]></message> - </reason> - </test-case> - <test-case name="NHibernate.Test.Ado.BatcherFixture.OneRoundTripUpdate" description="The batcher should run all UPDATE queries in only one roundtrip." executed="False" result="Ignored"> - <reason> - <message><![CDATA[NHibernate.Test.Ado.BatcherFixture does not apply with the current session-factory configuration]]></message> - </reason> - </test-case> - <test-case name="NHibernate.Test.Ado.BatcherFixture.SqlClientOneRoundTripForUpdateAndInsert" description="SqlClient: The batcher should run all different INSERT queries in only one roundtrip." executed="False" result="Ignored"> - <reason> - <message><![CDATA[Not fixed yet.]]></message> - </reason> - </test-case> - <test-case name="NHibernate.Test.Ado.BatcherFixture.SqlLog" description="Activating the SQL and turning off the batcher's log the log stream:
-should not contains adding to batch
-should contain batch command
-the batcher should work." executed="False" result="Ignored"> - <reason> - <message><![CDATA[NHibernate.Test.Ado.BatcherFixture does not apply with the current session-factory configuration]]></message> - </reason> - </test-case> - <test-case name="NHibernate.Test.Ado.BatcherFixture.SqlLogShouldGetBatchCommandNotification" executed="False" result="Ignored"> - <reason> - <message><![CDATA[NHibernate.Test.Ado.BatcherFixture does not apply with the current session-factory configuration]]></message> - </reason> - </test-case> - </results> - </test-suite> - </results> - </test-suite> - <test-suite type="Namespace" name="Any" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-suite type="TestFixture" name="AnyTypeTest" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.Any.AnyTypeTest.FlushProcessing" executed="True" result="Success" success="True" asserts="0" /> - </results> - </test-suite> - </results> - </test-suite> - <test-suite type="Namespace" name="BulkManipulation" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-suite type="TestFixture" name="HqlBulkOperations" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.BulkManipulation.HqlBulkOperations.SimpleDelete" executed="True" result="Success" success="True" asserts="2" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="NativeSQLBulkOperations" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.BulkManipulation.NativeSQLBulkOperations.SimpleNativeSQLInsert" executed="True" result="Success" success="True" asserts="8" /> - </results> - </test-suite> - </results> - </test-suite> - <test-suite type="Namespace" name="Bytecode" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-suite type="TestFixture" name="ActivatorObjectFactoryFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.Bytecode.ActivatorObjectFactoryFixture.CreateInstanceDefCtor" executed="True" result="Success" success="True" asserts="4" /> - <test-case name="NHibernate.Test.Bytecode.ActivatorObjectFactoryFixture.CreateInstanceOfValueType" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.Bytecode.ActivatorObjectFactoryFixture.CreateInstanceWithArguments" executed="True" result="Success" success="True" asserts="4" /> - <test-case name="NHibernate.Test.Bytecode.ActivatorObjectFactoryFixture.CreateInstanceWithNoPublicCtor" executed="True" result="Success" success="True" asserts="3" /> - </results> - </test-suite> - <test-suite type="Namespace" name="Lightweight" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-suite type="TestFixture" name="BytecodeProviderFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.Bytecode.Lightweight.BytecodeProviderFixture.CantCreateProxyFactoryFactory" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.Bytecode.Lightweight.BytecodeProviderFixture.CollectionTypeFactoryCantChangeAfterUsage" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.Bytecode.Lightweight.BytecodeProviderFixture.DoesNotImplementProxyFactoryFactory" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.Bytecode.Lightweight.BytecodeProviderFixture.InvalidCollectionTypeFactoryCtor" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.Bytecode.Lightweight.BytecodeProviderFixture.NotConfiguredCollectionTypeFactory" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.Bytecode.Lightweight.BytecodeProviderFixture.NotConfiguredProxyFactoryFactory" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.Bytecode.Lightweight.BytecodeProviderFixture.SetCollectionTypeFactoryClassByName" executed="True" result="Success" success="True" asserts="3" /> - <test-case name="NHibernate.Test.Bytecode.Lightweight.BytecodeProviderFixture.SetCollectionTypeFactoryClassByType" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.Bytecode.Lightweight.BytecodeProviderFixture.UnableToLoadProxyFactoryFactory" executed="True" result="Success" success="True" asserts="3" /> - </results> - </test-suite> - </results> - </test-suite> - </results> - </test-suite> - <test-suite type="Namespace" name="CacheTest" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-suite type="TestFixture" name="CacheFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CacheTest.CacheFixture.MinValueTimestamp" executed="True" result="Success" success="True" asserts="6" /> - <test-case name="NHibernate.Test.CacheTest.CacheFixture.TestSimpleCache" executed="True" result="Success" success="True" asserts="24" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="FilterKeyFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CacheTest.FilterKeyFixture.Equality" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.CacheTest.FilterKeyFixture.HashCode" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.CacheTest.FilterKeyFixture.NotEqualHashCode" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.CacheTest.FilterKeyFixture.NotEquality" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.CacheTest.FilterKeyFixture.ToStringIncludeAll" executed="True" result="Success" success="True" asserts="2" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="QueryCacheFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CacheTest.QueryCacheFixture.QueryCacheWithNullParameters" executed="True" result="Success" success="True" asserts="2" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="QueryKeyFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CacheTest.QueryKeyFixture.EqualityWithFilters" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.CacheTest.QueryKeyFixture.HashCodeWithFilters" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.CacheTest.QueryKeyFixture.NotEqualHashCodeWithFilters" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.CacheTest.QueryKeyFixture.NotEqualityWithFilters" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.CacheTest.QueryKeyFixture.ToStringWithFilters" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.CacheTest.QueryKeyFixture.ToStringWithMoreFilters" executed="True" result="Success" success="True" asserts="1" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="TimestamperFixture" executed="True" result="Inconclusive" success="False" asserts="0" /> - </results> - </test-suite> - <test-suite type="Namespace" name="Cascade" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-suite type="Namespace" name="Circle" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-suite type="TestFixture" name="CascadeMergeToChildBeforeParentTest" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.Cascade.Circle.CascadeMergeToChildBeforeParentTest.Merge" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.Cascade.Circle.CascadeMergeToChildBeforeParentTest.MergeData3Nodes" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.Cascade.Circle.CascadeMergeToChildBeforeParentTest.MergeTransientChildBeforeTransientParent" executed="True" result="Success" success="True" asserts="0" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="MultiPathCircleCascadeTest" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.Cascade.Circle.MultiPathCircleCascadeTest.MergeDeliveryNode" executed="True" result="Success" success="True" asserts="26" /> - <test-case name="NHibernate.Test.Cascade.Circle.MultiPathCircleCascadeTest.MergeEntityWithNonNullableEntityNull" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.Cascade.Circle.MultiPathCircleCascadeTest.MergeEntityWithNonNullableTransientEntity" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.Cascade.Circle.MultiPathCircleCascadeTest.MergePickupNode" executed="True" result="Success" success="True" asserts="26" /> - <test-case name="NHibernate.Test.Cascade.Circle.MultiPathCircleCascadeTest.MergeRoute" executed="True" result="Success" success="True" asserts="27" /> - <test-case name="NHibernate.Test.Cascade.Circle.MultiPathCircleCascadeTest.MergeTour" executed="True" result="Success" success="True" asserts="26" /> - <test-case name="NHibernate.Test.Cascade.Circle.MultiPathCircleCascadeTest.MergeTransport" executed="True" result="Success" success="True" asserts="26" /> - </results> - </test-suite> - </results> - </test-suite> - <test-suite type="TestFixture" name="MultiPathCascadeTest" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.Cascade.MultiPathCascadeTest.MultiPathGetAndModify" executed="True" result="Success" success="True" asserts="15" /> - <test-case name="NHibernate.Test.Cascade.MultiPathCascadeTest.MultiPathMergeModifiedDetached" executed="True" result="Success" success="True" asserts="15" /> - <test-case name="NHibernate.Test.Cascade.MultiPathCascadeTest.MultiPathMergeModifiedDetachedIntoProxy" executed="True" result="Success" success="True" asserts="17" /> - <test-case name="NHibernate.Test.Cascade.MultiPathCascadeTest.MultiPathMergeNonCascadedTransientEntityInCollection" executed="True" result="Success" success="True" asserts="16" /> - <test-case name="NHibernate.Test.Cascade.MultiPathCascadeTest.MultiPathMergeNonCascadedTransientEntityInManyToOne" executed="True" result="Success" success="True" asserts="16" /> - <test-case name="NHibernate.Test.Cascade.MultiPathCascadeTest.MultiPathMergeNonCascadedTransientEntityInOneToOne" executed="True" result="Success" success="True" asserts="15" /> - <test-case name="NHibernate.Test.Cascade.MultiPathCascadeTest.MultiPathUpdateModifiedDetached" executed="True" result="Success" success="True" asserts="15" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="RefreshFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.Cascade.RefreshFixture.RefreshCascade" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.Cascade.RefreshFixture.RefreshIgnoringTransient" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.Cascade.RefreshFixture.RefreshIgnoringTransientInCollection" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.Cascade.RefreshFixture.RefreshNotIgnoringTransientByUnsavedValue" executed="True" result="Success" success="True" asserts="0" /> - </results> - </test-suite> - </results> - </test-suite> - <test-suite type="Namespace" name="CfgTest" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-suite type="TestFixture" name="AccessorsSerializableTest" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-suite type="ParameterizedTest" name="AllAccessorsAreMarkedAsSerializable" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllAccessorsAreMarkedAsSerializable(NHibernate.Properties.BackrefPropertyAccessor)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllAccessorsAreMarkedAsSerializable(NHibernate.Properties.BasicPropertyAccessor)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllAccessorsAreMarkedAsSerializable(NHibernate.Properties.ChainedPropertyAccessor)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllAccessorsAreMarkedAsSerializable(NHibernate.Properties.EmbeddedPropertyAccessor)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllAccessorsAreMarkedAsSerializable(NHibernate.Properties.FieldAccessor)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllAccessorsAreMarkedAsSerializable(NHibernate.Properties.IndexPropertyAccessor)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllAccessorsAreMarkedAsSerializable(NHibernate.Properties.MapAccessor)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllAccessorsAreMarkedAsSerializable(NHibernate.Properties.NoopAccessor)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllAccessorsAreMarkedAsSerializable(NHibernate.Properties.NoSetterAccessor)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllAccessorsAreMarkedAsSerializable(NHibernate.Properties.ReadOnlyAccessor)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllAccessorsAreMarkedAsSerializable(NHibernate.Properties.XmlAccessor)" executed="True" result="Success" success="True" asserts="0" /> - </results> - </test-suite> - <test-suite type="ParameterizedTest" name="AllGettersAreMarkedAsSerializable" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllGettersAreMarkedAsSerializable(NHibernate.Properties.BackrefPropertyAccessor+BackrefGetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllGettersAreMarkedAsSerializable(NHibernate.Properties.BasicPropertyAccessor+BasicGetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllGettersAreMarkedAsSerializable(NHibernate.Properties.EmbeddedPropertyAccessor+EmbeddedGetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllGettersAreMarkedAsSerializable(NHibernate.Properties.FieldAccessor+FieldGetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllGettersAreMarkedAsSerializable(NHibernate.Properties.IndexPropertyAccessor+IndexGetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllGettersAreMarkedAsSerializable(NHibernate.Properties.MapAccessor+MapGetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllGettersAreMarkedAsSerializable(NHibernate.Properties.NoopAccessor+NoopGetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllGettersAreMarkedAsSerializable(NHibernate.Properties.XmlAccessor+XmlGetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllGettersAreMarkedAsSerializable(NHibernate.Properties.XmlAccessor+AttributeGetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllGettersAreMarkedAsSerializable(NHibernate.Properties.XmlAccessor+ElementAttributeGetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllGettersAreMarkedAsSerializable(NHibernate.Properties.XmlAccessor+ElementGetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllGettersAreMarkedAsSerializable(NHibernate.Properties.XmlAccessor+TextGetter)" executed="True" result="Success" success="True" asserts="0" /> - </results> - </test-suite> - <test-suite type="ParameterizedTest" name="AllSettersAreMarkedAsSerializable" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllSettersAreMarkedAsSerializable(NHibernate.Properties.BackrefPropertyAccessor+BackrefSetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllSettersAreMarkedAsSerializable(NHibernate.Properties.BasicPropertyAccessor+BasicSetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllSettersAreMarkedAsSerializable(NHibernate.Properties.EmbeddedPropertyAccessor+EmbeddedSetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllSettersAreMarkedAsSerializable(NHibernate.Properties.FieldAccessor+FieldSetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllSettersAreMarkedAsSerializable(NHibernate.Properties.IndexPropertyAccessor+IndexSetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllSettersAreMarkedAsSerializable(NHibernate.Properties.MapAccessor+MapSetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllSettersAreMarkedAsSerializable(NHibernate.Properties.NoopAccessor+NoopSetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllSettersAreMarkedAsSerializable(NHibernate.Properties.ReadOnlyAccessor+NoopSetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllSettersAreMarkedAsSerializable(NHibernate.Properties.XmlAccessor+XmlSetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllSettersAreMarkedAsSerializable(NHibernate.Properties.XmlAccessor+AttributeSetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllSettersAreMarkedAsSerializable(NHibernate.Properties.XmlAccessor+ElementAttributeSetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllSettersAreMarkedAsSerializable(NHibernate.Properties.XmlAccessor+ElementSetter)" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.AccessorsSerializableTest.AllSettersAreMarkedAsSerializable(NHibernate.Properties.XmlAccessor+TextSetter)" executed="True" result="Success" success="True" asserts="0" /> - </results> - </test-suite> - </results> - </test-suite> - <test-suite type="TestFixture" name="ConfigurationAddMappingEvents" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.ConfigurationAddMappingEvents.WhenSubscribedToAfterBindThenRaiseEventForEachMapping" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationAddMappingEvents.WhenSubscribedToBeforeBindThenRaiseEventForEachMapping" executed="True" result="Success" success="True" asserts="0" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="ConfigurationFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.AddDocument" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.CacheConfiguration" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.CacheConfigurationForUnmappedClass" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.CacheConfigurationForUnmappedCollection" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.DisabledProxyValidator" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.EmptyPropertyTag" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.InvalidXmlInCfgFile" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.InvalidXmlInHbmFile" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.NH1334" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.NH1348" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.NoSessionFactoriesInConfiguration" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.PersisterWithDefaultNamespaceAndAssembly" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.ProxyValidator" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.ProxyWithDefaultNamespaceAndAssembly" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.ReadCfgXmlFromAssembly" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.ReadCfgXmlFromDefaultFile" executed="True" result="Success" success="True" asserts="6" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationFixture.SetDefaultAssemblyAndNamespace" executed="True" result="Success" success="True" asserts="0" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="ConfigurationSchemaFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSchemaFixture.ClassesCache" executed="True" result="Success" success="True" asserts="5" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSchemaFixture.CollectionsCache" executed="True" result="Success" success="True" asserts="4" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSchemaFixture.EmptyFactoryNotAllowed" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSchemaFixture.Events" executed="True" result="Success" success="True" asserts="4" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSchemaFixture.FactoryName" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSchemaFixture.FromAppConfigTest" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSchemaFixture.IgnoreSystemOutOfAppConfig" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSchemaFixture.InvalidConfig" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSchemaFixture.Listeners" executed="True" result="Success" success="True" asserts="3" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSchemaFixture.MappingEquatable" executed="True" result="Success" success="True" asserts="7" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSchemaFixture.Mappings" executed="True" result="Success" success="True" asserts="5" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSchemaFixture.NotAllowedMappings" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSchemaFixture.Properties" executed="True" result="Success" success="True" asserts="5" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="ConfigurationSerializationTests" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSerializationTests.Basic_CRUD_should_work" executed="True" result="Success" success="True" asserts="8" /> - <test-case name="NHibernate.Test.CfgTest.ConfigurationSerializationTests.Configuration_should_be_serializable" executed="True" result="Success" success="True" asserts="1" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="CustomBytecodeProviderTest" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.CustomBytecodeProviderTest.WhenInvalidThenThrow" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.CustomBytecodeProviderTest.WhenNoDefaultCtorThenThrow" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.CustomBytecodeProviderTest.WhenNoShortCutUsedThenCanBuildBytecodeProvider" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.CustomBytecodeProviderTest.WhenNoShortCutUsedThenCanBuildInstanceOfConfiguredBytecodeProvider" executed="True" result="Success" success="True" asserts="0" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="DefaultNsAssmFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.DefaultNsAssmFixture.BottomUpJoined" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.DefaultNsAssmFixture.MixedJoined" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.DefaultNsAssmFixture.MixedSubclass" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.DefaultNsAssmFixture.TopDownJoined" executed="True" result="Success" success="True" asserts="0" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="EntityCacheUsageParserFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.EntityCacheUsageParserFixture.CovertToString" executed="True" result="Success" success="True" asserts="4" /> - <test-case name="NHibernate.Test.CfgTest.EntityCacheUsageParserFixture.Parse" executed="True" result="Success" success="True" asserts="4" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="HbmOrderingFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.HbmOrderingFixture.BottomUpJoined" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.HbmOrderingFixture.MixedJoined" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.HbmOrderingFixture.MixedSubclass" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.CfgTest.HbmOrderingFixture.TopDownJoined" executed="True" result="Success" success="True" asserts="0" /> - </results> - </test-suite> - <test-suite type="Namespace" name="Loquacious" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-suite type="TestFixture" name="ConfigurationFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.Loquacious.ConfigurationFixture.CompleteConfiguration" executed="True" result="Success" success="True" asserts="28" /> - <test-case name="NHibernate.Test.CfgTest.Loquacious.ConfigurationFixture.UseConnectionStringName" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.CfgTest.Loquacious.ConfigurationFixture.UseDbConfigurationStringBuilder" executed="True" result="Success" success="True" asserts="3" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="EntityCacheConfigurationFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.Loquacious.EntityCacheConfigurationFixture.ConfigureCacheOfClass" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.CfgTest.Loquacious.EntityCacheConfigurationFixture.ConfigureCacheOfCollection" executed="True" result="Success" success="True" asserts="2" /> - <test-case name="NHibernate.Test.CfgTest.Loquacious.EntityCacheConfigurationFixture.ConfigureCacheOfCollectionWithOutEntity" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.CfgTest.Loquacious.EntityCacheConfigurationFixture.NotAllowRelatedCollections" executed="True" result="Success" success="True" asserts="2" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="LambdaConfigurationFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.Loquacious.LambdaConfigurationFixture.FullConfiguration" executed="True" result="Success" success="True" asserts="28" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="TypeDefinitionFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.Loquacious.TypeDefinitionFixture.AddTypeDef" executed="True" result="Success" success="True" asserts="2" /> - </results> - </test-suite> - </results> - </test-suite> - <test-suite type="TestFixture" name="MappingDocumentAggregatorTests" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.MappingDocumentAggregatorTests.CanAddDomainModelAssembly" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.CfgTest.MappingDocumentAggregatorTests.CanSerializeAndDeserializeDomainModelAssembly" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.CfgTest.MappingDocumentAggregatorTests.CompareDeserializationTimes" executed="True" result="Success" success="True" asserts="0" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="MappingDocumentParserTests" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.MappingDocumentParserTests.CanDeserializeHBM" executed="True" result="Success" success="True" asserts="2" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="SchemaAutoActionFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.SchemaAutoActionFixture.Equality" executed="True" result="Success" success="True" asserts="8" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="SettingsFactoryFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CfgTest.SettingsFactoryFixture.DefaultValueForKeyWords" executed="True" result="Success" success="True" asserts="2" /> - </results> - </test-suite> - </results> - </test-suite> - <test-suite type="Namespace" name="Classic" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-suite type="TestFixture" name="LifecycleFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.Classic.LifecycleFixture.Delete" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.Classic.LifecycleFixture.Save" executed="True" result="Success" success="True" asserts="1" /> - <test-case name="NHibernate.Test.Classic.LifecycleFixture.SaveOrUpdateCopy" executed="True" result="Success" success="True" asserts="3" /> - <test-case name="NHibernate.Test.Classic.LifecycleFixture.Update" executed="True" result="Success" success="True" asserts="1" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="ValidatableFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.Classic.ValidatableFixture.Delete" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.Classic.ValidatableFixture.Save" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.Classic.ValidatableFixture.SaveOrUpdateCopy" executed="True" result="Success" success="True" asserts="0" /> - <test-case name="NHibernate.Test.Classic.ValidatableFixture.Update" executed="True" result="Success" success="True" asserts="0" /> - </results> - </test-suite> - </results> - </test-suite> - <test-suite type="Namespace" name="CollectionTest" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-suite type="TestFixture" name="IdBagFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CollectionTest.IdBagFixture.Simple" executed="True" result="Success" success="True" asserts="5" /> - </results> - </test-suite> - <test-suite type="TestFixture" name="NullableValueTypeElementMapFixture" executed="True" result="Success" success="True" asserts="0"> - <results> - <test-case name="NHibernate.Test.CollectionTest.NullableValueTypeElementMapFixture.AddRemoveUntypedElements" executed="True" result="Success" success="True" asserts="11" /> - <test-case name="NHibernate.Test.CollectionTest.NullableValueTypeElementMapFixture.ShouldAddAndRemoveNullElements" executed="True" result="Success" success="True" asserts="6" /> - <test-case name="NHibernate.Test.CollectionTest.NullableValueTypeElementMapFixture.ShouldOverwriteElementValueWithNull" executed="True" result="Success" success="True" asserts="5" /> - <test-case name="NHibernate.Test.CollectionTest.NullableValueTypeElementMapFixture.ShouldOverwriteNullElementWithValue" executed="True" result="Success" success="True" asserts="5" /> - </results> - </test-suite> - </results> - </test-suite> - <test-suite type="Namespace" name="Component" executed="True" result="Failure" success="False" asserts="0"> - <results> - <test-suite type="Namespace" name="Basic" executed="True" result="Failure" success="False" asserts="0"> - <results> - <test-suite type="TestFixture" name="ComponentTest" executed="True" result="Failure" success="False" asserts="0"> - <results> - <test-case name="NHibernate.Test.Component.Basic.ComponentTest.TestComponent" executed="True" result="Error" success="False" asserts="0"> - <failure> - <message><![CDATA[NHibernate.Exceptions.GenericADOException : could not load an entity: [NHibernate.Test.Component.Basic.User#gavin][SQL: SELECT user0_.UserName as UserName123_0_, user0_.LastModified as LastModi2_123_0_, user0_.Password as Password123_0_, user0_.Name as Name123_0_, user0_.Dob as Dob123_0_, user0_.Address as Address123_0_, user0_.PreviousAddress as Previous7_123_0_, user0_.address as address123_0_, year(user0_.dob) as formula0_0_ FROM T_USER user0_ WHERE user0_.UserName=?] - ----> System.Data.SQLite.SQLiteException : SQLite error -no such function: year -TearDown : NHibernate.Exceptions.GenericADOException : could not execute query -[ select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_ ] -[SQL: select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_] - ----> System.Data.SQLite.SQLiteException : SQLite error -no such function: year]]></message> - </failure> - </test-case> - <test-case name="NHibernate.Test.Component.Basic.ComponentTest.TestComponentFormulaQuery" executed="True" result="Error" success="False" asserts="0"> - <failure> - <message><![CDATA[NHibernate.Exceptions.GenericADOException : could not execute query -[ select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_ where year(user0_.dob)=1999 ] -[SQL: select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_ where year(user0_.dob)=1999] - ----> System.Data.SQLite.SQLiteException : SQLite error -no such function: year -TearDown : NHibernate.Exceptions.GenericADOException : could not execute query -[ select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_ ] -[SQL: select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_] - ----> System.Data.SQLite.SQLiteException : SQLite error -no such function: year]]></message> - </failure> - </test-case> - <test-case name="NHibernate.Test.Component.Basic.ComponentTest.TestComponentQueries" executed="False" result="Ignored"> - <reason> - <message><![CDATA[Ported from Hibernate - failing in NH]]></message> - </reason> - </test-case> - <test-case name="NHibernate.Test.Component.Basic.ComponentTest.TestComponentStateChangeAndDirtiness" executed="True" result="Error" success="False" asserts="2"> - <failure> - <message><![CDATA[TearDown : NHibernate.Exceptions.GenericADOException : could not execute query -[ select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_ ] -[SQL: select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_] - ----> System.Data.SQLite.SQLiteException : SQLite error -no such function: year]]></message> - </failure> - </test-case> - <test-case name="NHibernate.Test.Component.Basic.ComponentTest.TestCustomColumnReadAndWrite" executed="False" result="Ignored"> - <reason> - <message><![CDATA[Ported from Hibernate. Read properties not supported in NH yet.]]></message> - </reason> - </test-case> - <test-case name="NHibernate.Test.Component.Basic.ComponentTest.TestMergeComponent" executed="True" result="Error" success="False" asserts="11"> - <failure> - <message><![CDATA[TearDown : NHibernate.Exceptions.GenericADOException : could not execute query -[ select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_ ] -[SQL: select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_] - ----> System.Data.SQLite.SQLiteException : SQLite error -no such function: year]]></message> - </failure> - </test-case> - <test-case name="NHibernate.Test.Component.Basic.ComponentTest.TestNamedQuery" executed="True" result="Error" success="False" asserts="0"> - <failure> - <message><![CDATA[NHibernate.Exceptions.GenericADOException : could not execute query -[ select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_ where user0_.Name in (@p0 , @p1 , @p2) or user0_.UserName in (@p0 , @p1 , @p2) ] - Name:nameList_0_ - Value:1ovthafew Name:nameList_1_ - Value:turin Name:nameList_2_ - Value:xam -[SQL: select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_ where user0_.Name in (@p0 , @p1 , @p2) or user0_.UserName in (@p0 , @p1 , @p2)] - ----> System.Data.SQLite.SQLiteException : SQLite error -no such function: year -TearDown : NHibernate.Exceptions.GenericADOException : could not execute query -[ select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_ ] -[SQL: select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_] - ----> System.Data.SQLite.SQLiteException : SQLite error -no such function: year]]></message> - </failure> - </test-case> - <test-case name="NHibernate.Test.Component.Basic.ComponentTest.TestUpdateFalse" executed="True" result="Error" success="False" asserts="0"> - <failure> - <message><![CDATA[NHibernate.Exceptions.GenericADOException : could not insert: [NHibernate.Test.Component.Basic.User#gavin][SQL: INSERT INTO T_USER (LastModified, Password, Name, Dob, Address, UserName) VALUES (?, ?, ?, ?, ?, ?)] - ----> System.Data.SQLite.SQLiteException : Abort due to constraint violation -column UserName is not unique -TearDown : NHibernate.Exceptions.GenericADOException : could not execute query -[ select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_ ] -[SQL: select user0_.UserName as UserName123_, user0_.LastModified as LastModi2_123_, user0_.Password as Password123_, user0_.Name as Name123_, user0_.Dob as Dob123_, user0_.Address as Address123_, user0_.PreviousAddress as Previous7_123_, user0_.address as address123_, year(user0_.dob) as formula0_ from T_USER user0_] - ----> System.Data.SQLite.SQLiteException : SQLite error -no such function: year]]></message> - </failure> - </test-case> - </results> - </test-suite> - </results> - </test-suite> - </res... [truncated message content] |
From: <pa...@us...> - 2011-03-27 05:22:04
|
Revision: 5549 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5549&view=rev Author: patearl Date: 2011-03-27 05:21:58 +0000 (Sun, 27 Mar 2011) Log Message: ----------- SQLite: Added default properties for query substitutions and driver. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-27 05:10:59 UTC (rev 5548) +++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-27 05:21:58 UTC (rev 5549) @@ -77,6 +77,12 @@ RegisterKeyword("int"); // Used in our function templates. } + protected virtual void RegisterDefaultProperties() + { + DefaultProperties[Cfg.Environment.ConnectionDriver] = "NHibernate.Driver.SQLite20Driver"; + DefaultProperties[Cfg.Environment.QuerySubstitutions] = "true 1, false 0, yes 'Y', no 'N'"; + } + public override Schema.IDataBaseSchema GetDataBaseSchema(DbConnection connection) { return new Schema.SQLiteDataBaseMetaData(connection); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-27 05:11:06
|
Revision: 5548 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5548&view=rev Author: patearl Date: 2011-03-27 05:10:59 +0000 (Sun, 27 Mar 2011) Log Message: ----------- SQLite: Support non-repeating identity sequences. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs trunk/nhibernate/src/NHibernate/Mapping/Table.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs 2011-03-27 02:18:06 UTC (rev 5547) +++ trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs 2011-03-27 05:10:59 UTC (rev 5548) @@ -1187,6 +1187,16 @@ { get { throw new MappingException("Dialect does not support identity key generation"); } } + + /// <summary> + /// Set this to false if no table-level primary key constraint should be generated when an identity column has been specified for the table. + /// This is used as a work-around for SQLite so it doesn't tell us we have "more than one primary key". + /// </summary> + public virtual bool GenerateTablePrimaryKeyConstraintForIdentityColumn + { + get { return true; } + } + #endregion #region SEQUENCE support Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-27 02:18:06 UTC (rev 5547) +++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-27 05:10:59 UTC (rev 5548) @@ -154,13 +154,20 @@ { get { - // identity columns in sqlite are marked as being integer primary key - // the primary key part will be put in at the end of the create table, - // so just the integer part is needed here - return "integer"; + // Adding the "autoincrement" keyword ensures that the same id will + // not be generated twice. When just utilizing "integer primary key", + // SQLite just takes the max value currently in the table and adds one. + // This causes problems with caches that use primary keys of deleted + // entities. + return "integer primary key autoincrement"; } } + public override bool GenerateTablePrimaryKeyConstraintForIdentityColumn + { + get { return false; } + } + public override string Qualify(string catalog, string schema, string table) { StringBuilder qualifiedName = new StringBuilder(); Modified: trunk/nhibernate/src/NHibernate/Mapping/Table.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Mapping/Table.cs 2011-03-27 02:18:06 UTC (rev 5547) +++ trunk/nhibernate/src/NHibernate/Mapping/Table.cs 2011-03-27 05:10:59 UTC (rev 5548) @@ -409,7 +409,7 @@ buf.Append(dialect.GetColumnComment(col.Comment)); } } - if (HasPrimaryKey) + if (HasPrimaryKey && (dialect.GenerateTablePrimaryKeyConstraintForIdentityColumn || !identityColumn)) { buf.Append(StringHelper.CommaSpace).Append(PrimaryKey.SqlConstraintString(dialect, defaultSchema)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-27 02:18:12
|
Revision: 5547 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5547&view=rev Author: patearl Date: 2011-03-27 02:18:06 +0000 (Sun, 27 Mar 2011) Log Message: ----------- Ignore a broken decimal test on SQLite, adding an appropriate disappointing flag to TestDialect. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/TestDialect.cs trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs trunk/nhibernate/src/NHibernate.Test/Unionsubclass2/UnionSubclassFixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/TestDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TestDialect.cs 2011-03-27 00:18:24 UTC (rev 5546) +++ trunk/nhibernate/src/NHibernate.Test/TestDialect.cs 2011-03-27 02:18:06 UTC (rev 5547) @@ -45,6 +45,8 @@ public virtual bool SupportsFullJoin { get { return true; } } + public virtual bool HasBrokenDecimalType { get { return false; } } + public bool SupportsSqlType(SqlType sqlType) { try Modified: trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs 2011-03-27 00:18:24 UTC (rev 5546) +++ trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs 2011-03-27 02:18:06 UTC (rev 5547) @@ -41,5 +41,10 @@ { get { return false; } } + + public override bool HasBrokenDecimalType + { + get { return true; } + } } } Modified: trunk/nhibernate/src/NHibernate.Test/Unionsubclass2/UnionSubclassFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Unionsubclass2/UnionSubclassFixture.cs 2011-03-27 00:18:24 UTC (rev 5546) +++ trunk/nhibernate/src/NHibernate.Test/Unionsubclass2/UnionSubclassFixture.cs 2011-03-27 02:18:06 UTC (rev 5547) @@ -114,11 +114,14 @@ result = s.CreateQuery("from Person p where p.salary > 100 or p.name like 'E%'").List(); Assert.AreEqual(2, result.Count); - result = s.CreateCriteria(typeof(Person)).Add(Property.ForName("salary").Gt(100m)).List(); - Assert.AreEqual(1, result.Count); - Assert.AreSame(q, result[0]); + if (!TestDialect.HasBrokenDecimalType) + { + result = s.CreateCriteria(typeof (Person)).Add(Property.ForName("salary").Gt(100m)).List(); + Assert.AreEqual(1, result.Count); + Assert.AreSame(q, result[0]); + } - result = s.CreateQuery("select p.salary from Person p where p.salary > 100").List(); + result = s.CreateQuery("select p.salary from Person p where p.salary > 100").List(); Assert.AreEqual(1, result.Count); Assert.AreEqual(1000m, (decimal)result[0]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-27 00:18:31
|
Revision: 5546 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5546&view=rev Author: patearl Date: 2011-03-27 00:18:24 +0000 (Sun, 27 Mar 2011) Log Message: ----------- Improved compatibility of transaction handling across databases. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Transaction/AdoTransaction.cs Modified: trunk/nhibernate/src/NHibernate/Transaction/AdoTransaction.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Transaction/AdoTransaction.cs 2011-03-26 19:41:34 UTC (rev 5545) +++ trunk/nhibernate/src/NHibernate/Transaction/AdoTransaction.cs 2011-03-27 00:18:24 UTC (rev 5546) @@ -75,6 +75,9 @@ } log.Debug("Enlist Command"); + // If you try to assign a disposed transaction to a command with MSSQL, it will leave the command's + // transaction as null and not throw an error. With SQLite, for example, it will throw an exception + // here instead. Because of this, we set the trans field to null in when Dispose is called. command.Transaction = trans; } } @@ -363,6 +366,7 @@ if (trans != null) { trans.Dispose(); + trans = null; log.Debug("IDbTransaction disposed."); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-26 19:41:41
|
Revision: 5545 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5545&view=rev Author: patearl Date: 2011-03-26 19:41:34 +0000 (Sat, 26 Mar 2011) Log Message: ----------- Tests: SchemaMetadataUpdaterFixture doesn't check for "column" as a reserved word, since some databases don't reserve that word. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaMetadataUpdaterTest/SchemaMetadataUpdaterFixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaMetadataUpdaterTest/SchemaMetadataUpdaterFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaMetadataUpdaterTest/SchemaMetadataUpdaterFixture.cs 2011-03-26 18:51:53 UTC (rev 5544) +++ trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaMetadataUpdaterTest/SchemaMetadataUpdaterFixture.cs 2011-03-26 19:41:34 UTC (rev 5545) @@ -74,7 +74,6 @@ Assert.That(GetColumnByName(culs, "From").IsQuoted); Assert.That(GetColumnByName(culs, "And").IsQuoted); Assert.That(GetColumnByName(culs, "Select").IsQuoted); - Assert.That(GetColumnByName(culs, "Column").IsQuoted); Assert.That(!GetColumnByName(culs, "Name").IsQuoted); } @@ -92,7 +91,6 @@ Assert.That(GetColumnByName(culs, "From").IsQuoted); Assert.That(GetColumnByName(culs, "And").IsQuoted); Assert.That(GetColumnByName(culs, "Select").IsQuoted); - Assert.That(GetColumnByName(culs, "Column").IsQuoted); Assert.That(!GetColumnByName(culs, "Name").IsQuoted); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ric...@us...> - 2011-03-26 18:52:00
|
Revision: 5544 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5544&view=rev Author: ricbrown Date: 2011-03-26 18:51:53 +0000 (Sat, 26 Mar 2011) Log Message: ----------- NH-2592 (Add ICriteria functionality missing in QueryOver) - added overloads for on-clause in left joins Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Criterion/DetachedCriteria.cs trunk/nhibernate/src/NHibernate/Criterion/Lambda/QueryOverJoinBuilder.cs trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs trunk/nhibernate/src/NHibernate/IQueryOver.cs trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/QueryOverFixture.cs Modified: trunk/nhibernate/src/NHibernate/Criterion/DetachedCriteria.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Criterion/DetachedCriteria.cs 2011-03-26 18:27:30 UTC (rev 5543) +++ trunk/nhibernate/src/NHibernate/Criterion/DetachedCriteria.cs 2011-03-26 18:51:53 UTC (rev 5544) @@ -155,6 +155,11 @@ return new DetachedCriteria(impl, criteria.CreateCriteria(associationPath, alias, joinType)); } + public DetachedCriteria CreateCriteria(string associationPath, string alias, JoinType joinType, ICriterion withClause) + { + return new DetachedCriteria(impl, criteria.CreateCriteria(associationPath, alias, joinType, withClause)); + } + public string Alias { get { return criteria.Alias; } Modified: trunk/nhibernate/src/NHibernate/Criterion/Lambda/QueryOverJoinBuilder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Criterion/Lambda/QueryOverJoinBuilder.cs 2011-03-26 18:27:30 UTC (rev 5543) +++ trunk/nhibernate/src/NHibernate/Criterion/Lambda/QueryOverJoinBuilder.cs 2011-03-26 18:51:53 UTC (rev 5544) @@ -28,11 +28,41 @@ return root.JoinQueryOver<U>(path, alias, joinType); } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, Expression<Func<U,bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, Expression<Func<bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, ICriterion withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, withClause); + } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<U>> path, Expression<Func<U>> alias) { return root.JoinQueryOver<U>(path, alias, joinType); } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<U>> path, Expression<Func<U>> alias, Expression<Func<U,bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<U>> path, Expression<Func<U>> alias, Expression<Func<bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<U>> path, Expression<Func<U>> alias, ICriterion withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, withClause); + } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path) { return root.JoinQueryOver<U>(path, joinType); @@ -48,11 +78,41 @@ return root.JoinQueryOver<U>(path, alias, joinType); } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, Expression<Func<U,bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, Expression<Func<bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, ICriterion withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, withClause); + } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias) { return root.JoinQueryOver<U>(path, alias, joinType); } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, Expression<Func<U,bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, Expression<Func<bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, ICriterion withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, withClause); + } + } public class IQueryOverJoinBuilder<TRoot,TSubType> : QueryOverJoinBuilderBase<IQueryOver<TRoot,TSubType>, TRoot, TSubType> @@ -74,11 +134,41 @@ return root.JoinQueryOver<U>(path, alias, joinType); } + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, Expression<Func<U,bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, Expression<Func<bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, ICriterion withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, withClause); + } + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<U>> path, Expression<Func<U>> alias) { return root.JoinQueryOver<U>(path, alias, joinType); } + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<U>> path, Expression<Func<U>> alias, Expression<Func<U,bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<U>> path, Expression<Func<U>> alias, Expression<Func<bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<U>> path, Expression<Func<U>> alias, ICriterion withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, withClause); + } + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path) { return root.JoinQueryOver<U>(path, joinType); @@ -94,11 +184,41 @@ return root.JoinQueryOver<U>(path, alias, joinType); } + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, Expression<Func<U,bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, Expression<Func<bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, ICriterion withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, withClause); + } + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias) { return root.JoinQueryOver<U>(path, alias, joinType); } + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, Expression<Func<U,bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, Expression<Func<bool>> withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, ICriterion withClause) + { + return root.JoinQueryOver<U>(path, alias, joinType, withClause); + } + } public class QueryOverJoinBuilderBase<TReturn, TRoot, TSubType> where TReturn : IQueryOver<TRoot,TSubType> @@ -118,11 +238,71 @@ return (TReturn)root.JoinAlias(path, alias, joinType); } + public TReturn JoinAlias<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, Expression<Func<U,bool>> withClause) + { + return (TReturn)root.JoinAlias(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public TReturn JoinAlias<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, Expression<Func<bool>> withClause) + { + return (TReturn)root.JoinAlias(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public TReturn JoinAlias<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, ICriterion withClause) + { + return (TReturn)root.JoinAlias(path, alias, joinType, withClause); + } + + public TReturn JoinAlias<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, Expression<Func<U,bool>> withClause) + { + return (TReturn)root.JoinAlias(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public TReturn JoinAlias<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, Expression<Func<bool>> withClause) + { + return (TReturn)root.JoinAlias(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public TReturn JoinAlias<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, ICriterion withClause) + { + return (TReturn)root.JoinAlias(path, alias, joinType, withClause); + } + public TReturn JoinAlias(Expression<Func<object>> path, Expression<Func<object>> alias) { return (TReturn)root.JoinAlias(path, alias, joinType); } + public TReturn JoinAlias<U>(Expression<Func<U>> path, Expression<Func<U>> alias, Expression<Func<U,bool>> withClause) + { + return (TReturn)root.JoinAlias(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public TReturn JoinAlias<U>(Expression<Func<U>> path, Expression<Func<U>> alias, Expression<Func<bool>> withClause) + { + return (TReturn)root.JoinAlias(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public TReturn JoinAlias<U>(Expression<Func<U>> path, Expression<Func<U>> alias, ICriterion withClause) + { + return (TReturn)root.JoinAlias(path, alias, joinType, withClause); + } + + public TReturn JoinAlias<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, Expression<Func<U,bool>> withClause) + { + return (TReturn)root.JoinAlias(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public TReturn JoinAlias<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, Expression<Func<bool>> withClause) + { + return (TReturn)root.JoinAlias(path, alias, joinType, ExpressionProcessor.ProcessExpression(withClause)); + } + + public TReturn JoinAlias<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, ICriterion withClause) + { + return (TReturn)root.JoinAlias(path, alias, joinType, withClause); + } + } } Modified: trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs 2011-03-26 18:27:30 UTC (rev 5543) +++ trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs 2011-03-26 18:51:53 UTC (rev 5544) @@ -182,6 +182,12 @@ return this; } + private QueryOver<TRoot> ReadOnly() + { + criteria.SetReadOnly(true); + return this; + } + /// <summary> /// Method to allow comparison of detached query in Lambda expression /// e.g., p => p.Name == myQuery.As<string> @@ -251,6 +257,9 @@ IQueryOver<TRoot> IQueryOver<TRoot>.CacheRegion(string cacheRegion) { return CacheRegion(cacheRegion); } + IQueryOver<TRoot> IQueryOver<TRoot>.ReadOnly() + { return ReadOnly(); } + } /// <summary> @@ -499,6 +508,16 @@ joinType)); } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { + return new QueryOver<TRoot,U>(impl, + criteria.CreateCriteria( + ExpressionProcessor.FindMemberExpression(path.Body), + ExpressionProcessor.FindMemberExpression(alias.Body), + joinType, + withClause)); + } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<U>> path, Expression<Func<U>> alias, JoinType joinType) { return new QueryOver<TRoot,U>(impl, @@ -508,6 +527,16 @@ joinType)); } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<U>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { + return new QueryOver<TRoot,U>(impl, + criteria.CreateCriteria( + ExpressionProcessor.FindMemberExpression(path.Body), + ExpressionProcessor.FindMemberExpression(alias.Body), + joinType, + withClause)); + } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias) { return new QueryOver<TRoot,U>(impl, @@ -547,6 +576,16 @@ joinType)); } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { + return new QueryOver<TRoot,U>(impl, + criteria.CreateCriteria( + ExpressionProcessor.FindMemberExpression(path.Body), + ExpressionProcessor.FindMemberExpression(alias.Body), + joinType, + withClause)); + } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType) { return new QueryOver<TRoot,U>(impl, @@ -556,6 +595,16 @@ joinType)); } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { + return new QueryOver<TRoot,U>(impl, + criteria.CreateCriteria( + ExpressionProcessor.FindMemberExpression(path.Body), + ExpressionProcessor.FindMemberExpression(alias.Body), + joinType, + withClause)); + } + public QueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path, JoinType joinType) { return new QueryOver<TRoot,U>(impl, @@ -596,6 +645,24 @@ joinType); } + public QueryOver<TRoot,TSubType> JoinAlias<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { + return AddAlias( + ExpressionProcessor.FindMemberExpression(path.Body), + ExpressionProcessor.FindMemberExpression(alias.Body), + joinType, + withClause); + } + + public QueryOver<TRoot,TSubType> JoinAlias<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { + return AddAlias( + ExpressionProcessor.FindMemberExpression(path.Body), + ExpressionProcessor.FindMemberExpression(alias.Body), + joinType, + withClause); + } + public QueryOver<TRoot,TSubType> JoinAlias(Expression<Func<object>> path, Expression<Func<object>> alias, JoinType joinType) { return AddAlias( @@ -604,6 +671,24 @@ joinType); } + public QueryOver<TRoot,TSubType> JoinAlias<U>(Expression<Func<U>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { + return AddAlias( + ExpressionProcessor.FindMemberExpression(path.Body), + ExpressionProcessor.FindMemberExpression(alias.Body), + joinType, + withClause); + } + + public QueryOver<TRoot,TSubType> JoinAlias<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { + return AddAlias( + ExpressionProcessor.FindMemberExpression(path.Body), + ExpressionProcessor.FindMemberExpression(alias.Body), + joinType, + withClause); + } + public QueryOverJoinBuilder<TRoot,TSubType> Inner { get { return new QueryOverJoinBuilder<TRoot,TSubType>(this, JoinType.InnerJoin); } @@ -630,6 +715,12 @@ return this; } + private QueryOver<TRoot,TSubType> AddAlias(string path, string alias, JoinType joinType, ICriterion withClause) + { + criteria.CreateAlias(path, alias, joinType, withClause); + return this; + } + private QueryOver<TRoot,TSubType> Add(Expression<Func<TSubType, bool>> expression) { criteria.Add(ExpressionProcessor.ProcessExpression<TSubType>(expression)); @@ -772,9 +863,15 @@ IQueryOver<TRoot,U> IQueryOver<TRoot,TSubType>.JoinQueryOver<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, JoinType joinType) { return JoinQueryOver(path, alias, joinType); } + IQueryOver<TRoot,U> IQueryOver<TRoot,TSubType>.JoinQueryOver<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { return JoinQueryOver(path, alias, joinType, withClause); } + IQueryOver<TRoot,U> IQueryOver<TRoot,TSubType>.JoinQueryOver<U>(Expression<Func<U>> path, Expression<Func<U>> alias, JoinType joinType) { return JoinQueryOver(path, alias, joinType); } + IQueryOver<TRoot,U> IQueryOver<TRoot,TSubType>.JoinQueryOver<U>(Expression<Func<U>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { return JoinQueryOver(path, alias, joinType, withClause); } + IQueryOver<TRoot,U> IQueryOver<TRoot,TSubType>.JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path) { return JoinQueryOver(path); } @@ -796,9 +893,15 @@ IQueryOver<TRoot,U> IQueryOver<TRoot,TSubType>.JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType) { return JoinQueryOver(path, alias, joinType); } + IQueryOver<TRoot,U> IQueryOver<TRoot,TSubType>.JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { return JoinQueryOver(path, alias, joinType, withClause); } + IQueryOver<TRoot,U> IQueryOver<TRoot,TSubType>.JoinQueryOver<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType) { return JoinQueryOver(path, alias, joinType); } + IQueryOver<TRoot,U> IQueryOver<TRoot,TSubType>.JoinQueryOver<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { return JoinQueryOver(path, alias, joinType, withClause); } + IQueryOver<TRoot,TSubType> IQueryOver<TRoot,TSubType>.JoinAlias(Expression<Func<TSubType, object>> path, Expression<Func<object>> alias) { return JoinAlias(path, alias); } @@ -808,9 +911,21 @@ IQueryOver<TRoot,TSubType> IQueryOver<TRoot,TSubType>.JoinAlias(Expression<Func<TSubType, object>> path, Expression<Func<object>> alias, JoinType joinType) { return JoinAlias(path, alias, joinType); } + IQueryOver<TRoot,TSubType> IQueryOver<TRoot,TSubType>.JoinAlias<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { return JoinAlias(path, alias, joinType, withClause); } + + IQueryOver<TRoot,TSubType> IQueryOver<TRoot,TSubType>.JoinAlias<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { return JoinAlias(path, alias, joinType, withClause); } + IQueryOver<TRoot,TSubType> IQueryOver<TRoot,TSubType>.JoinAlias(Expression<Func<object>> path, Expression<Func<object>> alias, JoinType joinType) { return JoinAlias(path, alias, joinType); } + IQueryOver<TRoot,TSubType> IQueryOver<TRoot,TSubType>.JoinAlias<U>(Expression<Func<U>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { return JoinAlias(path, alias, joinType, withClause); } + + IQueryOver<TRoot,TSubType> IQueryOver<TRoot,TSubType>.JoinAlias<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause) + { return JoinAlias(path, alias, joinType, withClause); } + IQueryOverJoinBuilder<TRoot,TSubType> IQueryOver<TRoot,TSubType>.Inner { get { return new IQueryOverJoinBuilder<TRoot,TSubType>(this, JoinType.InnerJoin); } } Modified: trunk/nhibernate/src/NHibernate/IQueryOver.cs =================================================================== --- trunk/nhibernate/src/NHibernate/IQueryOver.cs 2011-03-26 18:27:30 UTC (rev 5543) +++ trunk/nhibernate/src/NHibernate/IQueryOver.cs 2011-03-26 18:51:53 UTC (rev 5544) @@ -154,6 +154,12 @@ /// for the default query cache</param> IQueryOver<TRoot> CacheRegion(string cacheRegion); + /// <summary> + /// Set the read-only mode for entities (and proxies) loaded by this QueryOver. + /// (see <see cref="ICriteria.SetReadOnly" />). + /// </summary> + IQueryOver<TRoot> ReadOnly(); + } /// <summary> @@ -431,11 +437,33 @@ /// <param name="path">Lambda expression returning association path</param> /// <param name="alias">Lambda expression returning alias reference</param> /// <param name="joinType">Type of join</param> + /// <param name="withClause">Additional criterion for the SQL on clause</param> /// <returns>The created "sub criteria"</returns> + IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause); + + /// <summary> + /// Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + /// </summary> + /// <typeparam name="U">Type of sub-criteria</typeparam> + /// <param name="path">Lambda expression returning association path</param> + /// <param name="alias">Lambda expression returning alias reference</param> + /// <param name="joinType">Type of join</param> + /// <returns>The created "sub criteria"</returns> IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<U>> path, Expression<Func<U>> alias, JoinType joinType); /// <summary> /// Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + /// </summary> + /// <typeparam name="U">Type of sub-criteria</typeparam> + /// <param name="path">Lambda expression returning association path</param> + /// <param name="alias">Lambda expression returning alias reference</param> + /// <param name="joinType">Type of join</param> + /// <param name="withClause">Additional criterion for the SQL on clause</param> + /// <returns>The created "sub criteria"</returns> + IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<U>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause); + + /// <summary> + /// Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity /// specifying a collection for the join. /// </summary> /// <typeparam name="U">Type of sub-criteria (type of the collection)</typeparam> @@ -511,10 +539,34 @@ /// <param name="path">Lambda expression returning association path</param> /// <param name="alias">Lambda expression returning alias reference</param> /// <param name="joinType">Type of join</param> + /// <param name="withClause">Additional criterion for the SQL on clause</param> /// <returns>The created "sub criteria"</returns> + IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause); + + /// <summary> + /// Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + /// specifying a collection for the join. + /// </summary> + /// <typeparam name="U">Type of sub-criteria (type of the collection)</typeparam> + /// <param name="path">Lambda expression returning association path</param> + /// <param name="alias">Lambda expression returning alias reference</param> + /// <param name="joinType">Type of join</param> + /// <returns>The created "sub criteria"</returns> IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType); /// <summary> + /// Creates a new NHibernate.IQueryOver<TRoot, U>, "rooted" at the associated entity + /// specifying a collection for the join. + /// </summary> + /// <typeparam name="U">Type of sub-criteria (type of the collection)</typeparam> + /// <param name="path">Lambda expression returning association path</param> + /// <param name="alias">Lambda expression returning alias reference</param> + /// <param name="joinType">Type of join</param> + /// <param name="withClause">Additional criterion for the SQL on clause</param> + /// <returns>The created "sub criteria"</returns> + IQueryOver<TRoot,U> JoinQueryOver<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause); + + /// <summary> /// Join an association, assigning an alias to the joined entity /// </summary> /// <param name="path">Lambda expression returning association path</param> @@ -545,9 +597,51 @@ /// <param name="path">Lambda expression returning association path</param> /// <param name="alias">Lambda expression returning alias reference</param> /// <param name="joinType">Type of join</param> + /// <param name="withClause">Additional criterion for the SQL on clause</param> /// <returns>criteria instance</returns> + IQueryOver<TRoot,TSubType> JoinAlias<U>(Expression<Func<TSubType, U>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause); + + /// <summary> + /// Join an association, assigning an alias to the joined entity + /// </summary> + /// <typeparam name="U">Type of sub-criteria (type of the collection)</typeparam> + /// <param name="path">Lambda expression returning association path</param> + /// <param name="alias">Lambda expression returning alias reference</param> + /// <param name="joinType">Type of join</param> + /// <param name="withClause">Additional criterion for the SQL on clause</param> + /// <returns>criteria instance</returns> + IQueryOver<TRoot,TSubType> JoinAlias<U>(Expression<Func<TSubType, IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause); + + /// <summary> + /// Join an association, assigning an alias to the joined entity + /// </summary> + /// <param name="path">Lambda expression returning association path</param> + /// <param name="alias">Lambda expression returning alias reference</param> + /// <param name="joinType">Type of join</param> + /// <returns>criteria instance</returns> IQueryOver<TRoot,TSubType> JoinAlias(Expression<Func<object>> path, Expression<Func<object>> alias, JoinType joinType); + /// <summary> + /// Join an association, assigning an alias to the joined entity + /// </summary> + /// <param name="path">Lambda expression returning association path</param> + /// <param name="alias">Lambda expression returning alias reference</param> + /// <param name="joinType">Type of join</param> + /// <param name="withClause">Additional criterion for the SQL on clause</param> + /// <returns>criteria instance</returns> + IQueryOver<TRoot,TSubType> JoinAlias<U>(Expression<Func<U>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause); + + /// <summary> + /// Join an association, assigning an alias to the joined entity + /// </summary> + /// <typeparam name="U">Type of sub-criteria (type of the collection)</typeparam> + /// <param name="path">Lambda expression returning association path</param> + /// <param name="alias">Lambda expression returning alias reference</param> + /// <param name="joinType">Type of join</param> + /// <param name="withClause">Additional criterion for the SQL on clause</param> + /// <returns>criteria instance</returns> + IQueryOver<TRoot,TSubType> JoinAlias<U>(Expression<Func<IEnumerable<U>>> path, Expression<Func<U>> alias, JoinType joinType, ICriterion withClause); + IQueryOverJoinBuilder<TRoot,TSubType> Inner { get; } IQueryOverJoinBuilder<TRoot,TSubType> Left { get; } IQueryOverJoinBuilder<TRoot,TSubType> Right { get; } Modified: trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs 2011-03-26 18:27:30 UTC (rev 5543) +++ trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs 2011-03-26 18:51:53 UTC (rev 5544) @@ -4,6 +4,7 @@ using System.Linq; using NUnit.Framework; +using SharpTestsEx; using NHibernate.Criterion; using NHibernate.Transform; @@ -181,6 +182,79 @@ } [Test] + public void OnClause() + { + using (ISession s = OpenSession()) + using (ITransaction t = s.BeginTransaction()) + { + s.Save(new Person() { Name = "John" } + .AddChild(new Child() { Nickname = "John"}) + .AddChild(new Child() { Nickname = "Judy"})); + + s.Save(new Person() { Name = "Jean" }); + s.Save(new Child() { Nickname = "James" }); + + t.Commit(); + } + + using (ISession s = OpenSession()) + { + Child childAlias = null; + Person parentAlias = null; + var children = + s.QueryOver(() => childAlias) + .Left.JoinQueryOver(c => c.Parent, () => parentAlias, p => p.Name == childAlias.Nickname) + .WhereRestrictionOn(p => p.Name).IsNotNull + .List(); + + children.Should().Have.Count.EqualTo(1); + } + + using (ISession s = OpenSession()) + { + Child childAlias = null; + Person parentAlias = null; + var parentNames = + s.QueryOver<Child>(() => childAlias) + .Left.JoinAlias(c => c.Parent, () => parentAlias, p => p.Name == childAlias.Nickname) + .Select(c => parentAlias.Name) + .List<string>(); + + parentNames + .Where(n => !string.IsNullOrEmpty(n)) + .Should().Have.Count.EqualTo(1); + } + + using (ISession s = OpenSession()) + { + Person personAlias = null; + Child childAlias = null; + var people = + s.QueryOver<Person>(() => personAlias) + .Left.JoinQueryOver(p => p.Children, () => childAlias, c => c.Nickname == personAlias.Name) + .WhereRestrictionOn(c => c.Nickname).IsNotNull + .List(); + + people.Should().Have.Count.EqualTo(1); + } + + using (ISession s = OpenSession()) + { + Person personAlias = null; + Child childAlias = null; + var childNames = + s.QueryOver<Person>(() => personAlias) + .Left.JoinAlias(p => p.Children, () => childAlias, c => c.Nickname == personAlias.Name) + .Select(p => childAlias.Nickname) + .List<string>(); + + childNames + .Where(n => !string.IsNullOrEmpty(n)) + .Should().Have.Count.EqualTo(1); + } + } + + [Test] public void UniqueResult() { using (ISession s = OpenSession()) Modified: trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/QueryOverFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/QueryOverFixture.cs 2011-03-26 18:27:30 UTC (rev 5543) +++ trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/QueryOverFixture.cs 2011-03-26 18:51:53 UTC (rev 5544) @@ -412,6 +412,198 @@ } [Test] + public void OnClause_SubCriteria() + { + ICriteria expected = + CreateTestCriteria(typeof(Person)) + .CreateCriteria("PersonList", "alias1", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "many func t,bool")) + .CreateCriteria("PersonList", "alias2", JoinType.LeftOuterJoin, Restrictions.Eq("alias1.Name", "many func bool")) + .CreateCriteria("PersonList", "alias3", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "many private")) + .CreateCriteria("Father", "alias4", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "one func t,bool")) + .CreateCriteria("Father", "alias5", JoinType.LeftOuterJoin, Restrictions.Eq("alias4.Name", "one func bool")) + .CreateCriteria("Father", "alias6", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "one private")) + .CreateCriteria("alias1.PersonList", "alias7", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a many func t,bool")) + .CreateCriteria("alias2.PersonList", "alias8", JoinType.LeftOuterJoin, Restrictions.Eq("alias1.Name", "a many func bool")) + .CreateCriteria("alias3.PersonList", "alias9", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a many private")) + .CreateCriteria("alias4.Father", "alias10", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a one func t,bool")) + .CreateCriteria("alias5.Father", "alias11", JoinType.LeftOuterJoin, Restrictions.Eq("alias4.Name", "a one func bool")) + .CreateCriteria("alias6.Father", "alias12", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a one private")); + + Person alias1 = null; + Person alias2 = null; + Person alias3 = null; + Person alias4 = null; + Person alias5 = null; + Person alias6 = null; + Person alias7 = null; + Person alias8 = null; + Person alias9 = null; + Person alias10 = null; + Person alias11 = null; + Person alias12 = null; + IQueryOver<Person> actual = + CreateTestQueryOver<Person>() + .Left.JoinQueryOver(p => p.PersonList, () => alias1, p => p.Name == "many func t,bool") + .Left.JoinQueryOver(p => p.PersonList, () => alias2, () => alias1.Name == "many func bool") + .Left.JoinQueryOver(p => p.PersonList, () => alias3, Restrictions.Eq("Name", "many private")) + .Left.JoinQueryOver(p => p.Father, () => alias4, p => p.Name == "one func t,bool") + .Left.JoinQueryOver(p => p.Father, () => alias5, () => alias4.Name == "one func bool") + .Left.JoinQueryOver(p => p.Father, () => alias6, p => p.Name == "one private") + .Left.JoinQueryOver(() => alias1.PersonList, () => alias7, p => p.Name == "a many func t,bool") + .Left.JoinQueryOver(() => alias2.PersonList, () => alias8, () => alias1.Name == "a many func bool") + .Left.JoinQueryOver(() => alias3.PersonList, () => alias9, Restrictions.Eq("Name", "a many private")) + .Left.JoinQueryOver(() => alias4.Father, () => alias10, p => p.Name == "a one func t,bool") + .Left.JoinQueryOver(() => alias5.Father, () => alias11, () => alias4.Name == "a one func bool") + .Left.JoinQueryOver(() => alias6.Father, () => alias12, p => p.Name == "a one private"); + + AssertCriteriaAreEqual(expected, actual); + } + + [Test] + public void OnClauseDetached_SubCriteria() + { + DetachedCriteria expected = + DetachedCriteria.For<Person>() + .CreateCriteria("PersonList", "alias1", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "many func t,bool")) + .CreateCriteria("PersonList", "alias2", JoinType.LeftOuterJoin, Restrictions.Eq("alias1.Name", "many func bool")) + .CreateCriteria("PersonList", "alias3", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "many private")) + .CreateCriteria("Father", "alias4", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "one func t,bool")) + .CreateCriteria("Father", "alias5", JoinType.LeftOuterJoin, Restrictions.Eq("alias4.Name", "one func bool")) + .CreateCriteria("Father", "alias6", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "one private")) + .CreateCriteria("alias1.PersonList", "alias7", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a many func t,bool")) + .CreateCriteria("alias2.PersonList", "alias8", JoinType.LeftOuterJoin, Restrictions.Eq("alias1.Name", "a many func bool")) + .CreateCriteria("alias3.PersonList", "alias9", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a many private")) + .CreateCriteria("alias4.Father", "alias10", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a one func t,bool")) + .CreateCriteria("alias5.Father", "alias11", JoinType.LeftOuterJoin, Restrictions.Eq("alias4.Name", "a one func bool")) + .CreateCriteria("alias6.Father", "alias12", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a one private")); + + Person alias1 = null; + Person alias2 = null; + Person alias3 = null; + Person alias4 = null; + Person alias5 = null; + Person alias6 = null; + Person alias7 = null; + Person alias8 = null; + Person alias9 = null; + Person alias10 = null; + Person alias11 = null; + Person alias12 = null; + QueryOver<Person> actual = + QueryOver.Of<Person>() + .Left.JoinQueryOver(p => p.PersonList, () => alias1, p => p.Name == "many func t,bool") + .Left.JoinQueryOver(p => p.PersonList, () => alias2, () => alias1.Name == "many func bool") + .Left.JoinQueryOver(p => p.PersonList, () => alias3, Restrictions.Eq("Name", "many private")) + .Left.JoinQueryOver(p => p.Father, () => alias4, p => p.Name == "one func t,bool") + .Left.JoinQueryOver(p => p.Father, () => alias5, () => alias4.Name == "one func bool") + .Left.JoinQueryOver(p => p.Father, () => alias6, p => p.Name == "one private") + .Left.JoinQueryOver(() => alias1.PersonList, () => alias7, p => p.Name == "a many func t,bool") + .Left.JoinQueryOver(() => alias2.PersonList, () => alias8, () => alias1.Name == "a many func bool") + .Left.JoinQueryOver(() => alias3.PersonList, () => alias9, Restrictions.Eq("Name", "a many private")) + .Left.JoinQueryOver(() => alias4.Father, () => alias10, p => p.Name == "a one func t,bool") + .Left.JoinQueryOver(() => alias5.Father, () => alias11, () => alias4.Name == "a one func bool") + .Left.JoinQueryOver(() => alias6.Father, () => alias12, p => p.Name == "a one private"); + + AssertCriteriaAreEqual(expected, actual); + } + + [Test] + public void OnClause_Alias() + { + ICriteria expected = + CreateTestCriteria(typeof(Person)) + .CreateAlias("PersonList", "alias1", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "many func t,bool")) + .CreateAlias("PersonList", "alias2", JoinType.LeftOuterJoin, Restrictions.Eq("alias1.Name", "many func bool")) + .CreateAlias("PersonList", "alias3", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "many private")) + .CreateAlias("Father", "alias4", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "one func t,bool")) + .CreateAlias("Father", "alias5", JoinType.LeftOuterJoin, Restrictions.Eq("alias4.Name", "one func bool")) + .CreateAlias("Father", "alias6", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "one private")) + .CreateAlias("alias1.PersonList", "alias7", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a many func t,bool")) + .CreateAlias("alias2.PersonList", "alias8", JoinType.LeftOuterJoin, Restrictions.Eq("alias1.Name", "a many func bool")) + .CreateAlias("alias3.PersonList", "alias9", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a many private")) + .CreateAlias("alias4.Father", "alias10", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a one func t,bool")) + .CreateAlias("alias5.Father", "alias11", JoinType.LeftOuterJoin, Restrictions.Eq("alias4.Name", "a one func bool")) + .CreateAlias("alias6.Father", "alias12", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a one private")); + + Person alias1 = null; + Person alias2 = null; + Person alias3 = null; + Person alias4 = null; + Person alias5 = null; + Person alias6 = null; + Person alias7 = null; + Person alias8 = null; + Person alias9 = null; + Person alias10 = null; + Person alias11 = null; + Person alias12 = null; + IQueryOver<Person> actual = + CreateTestQueryOver<Person>() + .Left.JoinAlias(p => p.PersonList, () => alias1, p => p.Name == "many func t,bool") + .Left.JoinAlias(p => p.PersonList, () => alias2, () => alias1.Name == "many func bool") + .Left.JoinAlias(p => p.PersonList, () => alias3, Restrictions.Eq("Name", "many private")) + .Left.JoinAlias(p => p.Father, () => alias4, p => p.Name == "one func t,bool") + .Left.JoinAlias(p => p.Father, () => alias5, () => alias4.Name == "one func bool") + .Left.JoinAlias(p => p.Father, () => alias6, p => p.Name == "one private") + .Left.JoinAlias(() => alias1.PersonList, () => alias7, p => p.Name == "a many func t,bool") + .Left.JoinAlias(() => alias2.PersonList, () => alias8, () => alias1.Name == "a many func bool") + .Left.JoinAlias(() => alias3.PersonList, () => alias9, Restrictions.Eq("Name", "a many private")) + .Left.JoinAlias(() => alias4.Father, () => alias10, p => p.Name == "a one func t,bool") + .Left.JoinAlias(() => alias5.Father, () => alias11, () => alias4.Name == "a one func bool") + .Left.JoinAlias(() => alias6.Father, () => alias12, p => p.Name == "a one private"); + + AssertCriteriaAreEqual(expected, actual); + } + + [Test] + public void OnClauseDetached_Alias() + { + DetachedCriteria expected = + DetachedCriteria.For<Person>() + .CreateAlias("PersonList", "alias1", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "many func t,bool")) + .CreateAlias("PersonList", "alias2", JoinType.LeftOuterJoin, Restrictions.Eq("alias1.Name", "many func bool")) + .CreateAlias("PersonList", "alias3", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "many private")) + .CreateAlias("Father", "alias4", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "one func t,bool")) + .CreateAlias("Father", "alias5", JoinType.LeftOuterJoin, Restrictions.Eq("alias4.Name", "one func bool")) + .CreateAlias("Father", "alias6", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "one private")) + .CreateAlias("alias1.PersonList", "alias7", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a many func t,bool")) + .CreateAlias("alias2.PersonList", "alias8", JoinType.LeftOuterJoin, Restrictions.Eq("alias1.Name", "a many func bool")) + .CreateAlias("alias3.PersonList", "alias9", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a many private")) + .CreateAlias("alias4.Father", "alias10", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a one func t,bool")) + .CreateAlias("alias5.Father", "alias11", JoinType.LeftOuterJoin, Restrictions.Eq("alias4.Name", "a one func bool")) + .CreateAlias("alias6.Father", "alias12", JoinType.LeftOuterJoin, Restrictions.Eq("Name", "a one private")); + + Person alias1 = null; + Person alias2 = null; + Person alias3 = null; + Person alias4 = null; + Person alias5 = null; + Person alias6 = null; + Person alias7 = null; + Person alias8 = null; + Person alias9 = null; + Person alias10 = null; + Person alias11 = null; + Person alias12 = null; + QueryOver<Person> actual = + QueryOver.Of<Person>() + .Left.JoinAlias(p => p.PersonList, () => alias1, p => p.Name == "many func t,bool") + .Left.JoinAlias(p => p.PersonList, () => alias2, () => alias1.Name == "many func bool") + .Left.JoinAlias(p => p.PersonList, () => alias3, Restrictions.Eq("Name", "many private")) + .Left.JoinAlias(p => p.Father, () => alias4, p => p.Name == "one func t,bool") + .Left.JoinAlias(p => p.Father, () => alias5, () => alias4.Name == "one func bool") + .Left.JoinAlias(p => p.Father, () => alias6, p => p.Name == "one private") + .Left.JoinAlias(() => alias1.PersonList, () => alias7, p => p.Name == "a many func t,bool") + .Left.JoinAlias(() => alias2.PersonList, () => alias8, () => alias1.Name == "a many func bool") + .Left.JoinAlias(() => alias3.PersonList, () => alias9, Restrictions.Eq("Name", "a many private")) + .Left.JoinAlias(() => alias4.Father, () => alias10, p => p.Name == "a one func t,bool") + .Left.JoinAlias(() => alias5.Father, () => alias11, () => alias4.Name == "a one func bool") + .Left.JoinAlias(() => alias6.Father, () => alias12, p => p.Name == "a one private"); + + AssertCriteriaAreEqual(expected, actual); + } + + [Test] public void OrderBy() { ICriteria expected = @@ -571,6 +763,20 @@ } [Test] + public void Readonly() + { + ICriteria expected = + CreateTestCriteria(typeof(Person)) + .SetReadOnly(true); + + IQueryOver<Person> actual = + CreateTestQueryOver<Person>() + .ReadOnly(); + + AssertCriteriaAreEqual(expected, actual); + } + + [Test] public void DetachedQueryOver() { DetachedCriteria expected = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-26 18:27:37
|
Revision: 5543 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5543&view=rev Author: patearl Date: 2011-03-26 18:27:30 +0000 (Sat, 26 Mar 2011) Log Message: ----------- Support foreign keys on SQLite. Breaking change for databases that don't support alter table and have DDL-time foreign key correctness checks. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs trunk/nhibernate/src/NHibernate/Dialect/Schema/SQLiteMetaData.cs trunk/nhibernate/src/NHibernate/Driver/SQLite20Driver.cs trunk/nhibernate/src/NHibernate/Mapping/Table.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs 2011-03-26 16:35:24 UTC (rev 5542) +++ trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs 2011-03-26 18:27:30 UTC (rev 5543) @@ -813,7 +813,10 @@ var script = new List<string>(); - // drop them in reverse order in case db needs it done that way... + if (!string.IsNullOrEmpty(dialect.BeforeDropSchemaCommand)) + script.Add(dialect.BeforeDropSchemaCommand); + + // drop them in reverse order in case db needs it done that way...);); for (int i = auxiliaryDatabaseObjects.Count - 1; i >= 0; i--) { IAuxiliaryDatabaseObject auxDbObj = auxiliaryDatabaseObjects[i]; @@ -861,6 +864,9 @@ } } + if (!string.IsNullOrEmpty(dialect.AfterDropSchemaCommand)) + script.Add(dialect.AfterDropSchemaCommand); + return script.ToArray(); } Modified: trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs 2011-03-26 16:35:24 UTC (rev 5542) +++ trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs 2011-03-26 18:27:30 UTC (rev 5543) @@ -645,7 +645,10 @@ { var res = new StringBuilder(200); - res.Append(" add constraint ") + if (SupportsForeignKeyConstraintInAlterTable) + res.Append(" add"); + + res.Append(" constraint ") .Append(constraintName) .Append(" foreign key (") .Append(StringHelper.Join(StringHelper.CommaSpace, foreignKey)) @@ -2413,5 +2416,15 @@ { return false; } - } + + public virtual string BeforeDropSchemaCommand + { + get { return null; } + } + + public virtual string AfterDropSchemaCommand + { + get { return null; } + } + } } Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-26 16:35:24 UTC (rev 5542) +++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-26 18:27:30 UTC (rev 5543) @@ -261,6 +261,23 @@ get { return "select randomblob(16)"; } } + /// <summary> + /// SQLite does not currently support dropping foreign key constraints by alter statements. + /// This means that tables cannot be dropped if there are any rows that depend on those. + /// If there are cycles between tables, it would even be excessively difficult to delete + /// the data in the right order first. Because of this, we just turn off the foreign + /// constraints before we drop the schema and hope that we're not going to break anything. :( + /// </summary> + public override string BeforeDropSchemaCommand + { + get { return "PRAGMA foreign_keys = OFF"; } + } + + public override string AfterDropSchemaCommand + { + get { return "PRAGMA foreign_keys = ON"; } + } + [Serializable] protected class SQLiteCastFunction : CastFunction { Modified: trunk/nhibernate/src/NHibernate/Dialect/Schema/SQLiteMetaData.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Schema/SQLiteMetaData.cs 2011-03-26 16:35:24 UTC (rev 5542) +++ trunk/nhibernate/src/NHibernate/Dialect/Schema/SQLiteMetaData.cs 2011-03-26 18:27:30 UTC (rev 5543) @@ -30,8 +30,8 @@ protected override string GetConstraintName(DataRow rs) { - throw new NotImplementedException(); - } + return Convert.ToString(rs["CONSTRAINT_NAME"]); + } protected override IForeignKeyMetadata GetForeignKeyMetadata(DataRow rs) { Modified: trunk/nhibernate/src/NHibernate/Driver/SQLite20Driver.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Driver/SQLite20Driver.cs 2011-03-26 16:35:24 UTC (rev 5542) +++ trunk/nhibernate/src/NHibernate/Driver/SQLite20Driver.cs 2011-03-26 18:27:30 UTC (rev 5543) @@ -1,4 +1,6 @@ using System; +using System.Data; +using System.Data.Common; namespace NHibernate.Driver { @@ -33,6 +35,28 @@ { } + public override IDbConnection CreateConnection() + { + DbConnection connection = (DbConnection)base.CreateConnection(); + connection.StateChange += Connection_StateChange; + return connection; + } + + private static void Connection_StateChange(object sender, StateChangeEventArgs e) + { + if ((e.OriginalState == ConnectionState.Broken || e.OriginalState == ConnectionState.Closed || e.OriginalState == ConnectionState.Connecting) && + e.CurrentState == ConnectionState.Open) + { + DbConnection connection = (DbConnection)sender; + using (DbCommand command = connection.CreateCommand()) + { + // Activated foreign keys if supported by SQLite. Unknown pragmas are ignored. + command.CommandText = "PRAGMA foreign_keys = ON"; + command.ExecuteNonQuery(); + } + } + } + public override bool UseNamedPrefixInSql { get { return true; } Modified: trunk/nhibernate/src/NHibernate/Mapping/Table.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Mapping/Table.cs 2011-03-26 16:35:24 UTC (rev 5542) +++ trunk/nhibernate/src/NHibernate/Mapping/Table.cs 2011-03-26 18:27:30 UTC (rev 5543) @@ -427,6 +427,17 @@ } } + if (!dialect.SupportsForeignKeyConstraintInAlterTable) + { + foreach (ForeignKey foreignKey in ForeignKeyIterator) + { + if (foreignKey.HasPhysicalConstraint) + { + buf.Append(",").Append(foreignKey.SqlConstraintString(dialect, foreignKey.Name, defaultCatalog, defaultSchema)); + } + } + } + buf.Append(StringHelper.ClosedParen); if (string.IsNullOrEmpty(comment) == false) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-26 16:35:30
|
Revision: 5542 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5542&view=rev Author: patearl Date: 2011-03-26 16:35:24 +0000 (Sat, 26 Mar 2011) Log Message: ----------- Tests: Eliminated useless concurrent transaction to make TypeParameterTests work with SQLite. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/TypeParameters/TypeParameterTest.cs Modified: trunk/nhibernate/src/NHibernate.Test/TypeParameters/TypeParameterTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TypeParameters/TypeParameterTest.cs 2011-03-26 16:27:40 UTC (rev 5541) +++ trunk/nhibernate/src/NHibernate.Test/TypeParameters/TypeParameterTest.cs 2011-03-26 16:35:24 UTC (rev 5542) @@ -76,11 +76,12 @@ "Default value should have been mapped to null"); reader.Close(); - DeleteData(); t.Commit(); s.Close(); - } + DeleteData(); + } + [Test] public void Loading() { @@ -103,11 +104,12 @@ Assert.AreEqual(obj.ValueThree, -1, "Default value incorrectly loaded"); Assert.AreEqual(obj.ValueFour, -5, "Default value incorrectly loaded"); - DeleteData(); t.Commit(); s.Close(); - } + DeleteData(); + } + private void InitData() { ISession s = OpenSession(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2011-03-26 16:27:46
|
Revision: 5541 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5541&view=rev Author: fabiomaulo Date: 2011-03-26 16:27:40 +0000 (Sat, 26 Mar 2011) Log Message: ----------- Test for NH-2602 (fixed) Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/Subselect/ trunk/nhibernate/src/NHibernate.Test/Subselect/Beings.hbm.xml trunk/nhibernate/src/NHibernate.Test/Subselect/ClassSubselectFixture.cs trunk/nhibernate/src/NHibernate.Test/Subselect/Domain.cs Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2011-03-26 16:01:36 UTC (rev 5540) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2011-03-26 16:27:40 UTC (rev 5541) @@ -695,6 +695,8 @@ <Compile Include="ReadOnly\StudentDto.cs" /> <Compile Include="ReadOnly\TextHolder.cs" /> <Compile Include="ReadOnly\VersionedNode.cs" /> + <Compile Include="Subselect\ClassSubselectFixture.cs" /> + <Compile Include="Subselect\Domain.cs" /> <Compile Include="TestDialect.cs" /> <Compile Include="TestDialects\SQLiteTestDialect.cs" /> <Compile Include="TypesTest\CharClass.cs" /> @@ -2494,6 +2496,7 @@ <EmbeddedResource Include="NHSpecificTest\NH1291AnonExample\Mappings.hbm.xml" /> </ItemGroup> <ItemGroup> + <EmbeddedResource Include="Subselect\Beings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2488\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2490\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1925\Mappings.hbm.xml" /> Added: trunk/nhibernate/src/NHibernate.Test/Subselect/Beings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Subselect/Beings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/Subselect/Beings.hbm.xml 2011-03-26 16:27:40 UTC (rev 5541) @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!-- + + This mapping demonstrates + + (1) use of a class-to-subselect mapping, that allows data + defined in other classes to be exposed as a read-only + entity (you would do this if you really wanted a view, + but didn't or couldn't define one for some reason) + This is a "derived entity" mapping. + + (2) use of <synchronize/> to ensure that auto-flush happens + correctly, and that queries against the derived entity + do not return stale data + +--> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + namespace="NHibernate.Test.Subselect" + assembly="NHibernate.Test"> + + <class name="Human" table="Humans"> + <id name="Id" column="bid"> + <generator class="hilo"/> + </id> + + <property name="Name" not-null="true"/> + <property name="Sex" not-null="true" update="false"/> + <property name="Address"/> + </class> + + <class name="Alien" table="Aliens"> + <id name="Id" column="bid"> + <generator class="hilo"/> + </id> + <property name="Identity" not-null="true" column="ident"/> + <property name="Planet"/> + <property name="Species" not-null="true" update="false"/> + + </class> + + <class name="Being" mutable="false"> + <subselect> + select bid, name as ident, address as loc, 'human' as species + from humans + union + select bid, ident, planet as loc, species + from aliens + </subselect> + + <synchronize table="Humans"/> + <synchronize table="Aliens"/> + + <id name="Id" column="bid"> + <generator class="native"/> + </id> + + <property name="Identity" column="ident"/> + <property name="Location" column="loc"/> + <property name="Species"/> + </class> + +</hibernate-mapping> \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/Subselect/ClassSubselectFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Subselect/ClassSubselectFixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/Subselect/ClassSubselectFixture.cs 2011-03-26 16:27:40 UTC (rev 5541) @@ -0,0 +1,62 @@ +using System.Collections; +using NUnit.Framework; +using SharpTestsEx; + +namespace NHibernate.Test.Subselect +{ + public class ClassSubselectFixture: TestCase + { + protected override IList Mappings + { + get { return new[] {"Subselect.Beings.hbm.xml"}; } + } + + protected override string MappingsAssembly + { + get { return "NHibernate.Test"; } + } + + [Test] + public void EntitySubselect() + { + var s = OpenSession(); + var t = s.BeginTransaction(); + Human gavin = new Human(); + gavin.Name = "gavin"; + gavin.Sex = 'M'; + gavin.Address = "Melbourne, Australia"; + Alien x23y4 = new Alien(); + x23y4.Identity = "x23y4$$hu%3"; + x23y4.Planet = "Mars"; + x23y4.Species = "martian"; + s.Save(gavin); + s.Save(x23y4); + s.Flush(); + var beings = s.CreateQuery("from Being").List<Being>(); + beings.Should().Have.Count.GreaterThan(0); + foreach (var being in beings) + { + being.Location.Should().Not.Be.NullOrEmpty(); + being.Identity.Should().Not.Be.NullOrEmpty(); + being.Species.Should().Not.Be.NullOrEmpty(); + } + s.Clear(); + Sfi.Evict(typeof (Being)); + Being gav = s.Get<Being>(gavin.Id); + gav.Location.Should().Not.Be.NullOrEmpty(); + gav.Identity.Should().Not.Be.NullOrEmpty(); + gav.Species.Should().Not.Be.NullOrEmpty(); + s.Clear(); + //test the <synchronized> tag: + gavin = s.Get<Human>(gavin.Id); + gavin.Address = "Atlanta, GA"; + gav = s.CreateQuery("from Being b where b.Location like '%GA%'").UniqueResult<Being>(); + gav.Location.Should().Be(gavin.Address); + s.Delete(gavin); + s.Delete(x23y4); + s.CreateQuery("from Being").List<Being>().Should().Be.Empty(); + t.Commit(); + s.Close(); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/Subselect/Domain.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Subselect/Domain.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/Subselect/Domain.cs 2011-03-26 16:27:40 UTC (rev 5541) @@ -0,0 +1,26 @@ +namespace NHibernate.Test.Subselect +{ + public class Human + { + public virtual int Id { get; set; } + public virtual char Sex { get; set; } + public virtual string Name { get; set; } + public virtual string Address { get; set; } + } + + public class Alien + { + public virtual int Id { get; set; } + public virtual string Identity { get; set; } + public virtual string Planet { get; set; } + public virtual string Species { get; set; } + } + + public class Being + { + public virtual int Id { get; set; } + public virtual string Identity { get; set; } + public virtual string Location { get; set; } + public virtual string Species { get; set; } + } +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2011-03-26 16:01:42
|
Revision: 5540 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5540&view=rev Author: fabiomaulo Date: 2011-03-26 16:01:36 +0000 (Sat, 26 Mar 2011) Log Message: ----------- step over NH-2602 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/CollectionBinder.cs trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/JoinedSubclassBinder.cs trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/RootClassBinder.cs trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/UnionSubclassBinder.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs 2011-03-26 15:45:48 UTC (rev 5539) +++ trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs 2011-03-26 16:01:36 UTC (rev 5540) @@ -189,7 +189,7 @@ string action = "all"; // joinMapping.schemaaction ?? "all"; string tableName = joinMapping.table; - Table table = mappings.AddTable(schema, catalog, GetClassTableName(persistentClass, tableName), null, false, action); + Table table = mappings.AddTable(schema, catalog, GetClassTableName(persistentClass, tableName), joinMapping.Subselect, false, action); join.Table = table; join.IsSequentialSelect = joinMapping.fetch == HbmJoinFetch.Select; Modified: trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/CollectionBinder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/CollectionBinder.cs 2011-03-26 15:45:48 UTC (rev 5539) +++ trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/CollectionBinder.cs 2011-03-26 16:01:36 UTC (rev 5540) @@ -199,7 +199,7 @@ string catalog = string.IsNullOrEmpty(collectionMapping.Catalog) ? mappings.CatalogName : collectionMapping.Catalog; // TODO NH : add schema-action to the xsd - model.CollectionTable = mappings.AddTable(schema, catalog, tableName, null, false, "all"); + model.CollectionTable = mappings.AddTable(schema, catalog, tableName, collectionMapping.Subselect, false, "all"); log.InfoFormat("Mapping collection: {0} -> {1}", model.Role, model.CollectionTable.Name); } Modified: trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/JoinedSubclassBinder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/JoinedSubclassBinder.cs 2011-03-26 15:45:48 UTC (rev 5539) +++ trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/JoinedSubclassBinder.cs 2011-03-26 16:01:36 UTC (rev 5540) @@ -43,7 +43,7 @@ //string action = actionNode == null ? "all" : actionNode.Value; string action = "all"; - Table mytable = mappings.AddTable(schema, catalog, GetClassTableName(subclass, joinedSubclassMapping.table), null, false, action); + Table mytable = mappings.AddTable(schema, catalog, GetClassTableName(subclass, joinedSubclassMapping.table), joinedSubclassMapping.Subselect, false, action); ((ITableOwner)subclass).Table = mytable; log.InfoFormat("Mapping joined-subclass: {0} -> {1}", subclass.EntityName, subclass.Table.Name); Modified: trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/RootClassBinder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/RootClassBinder.cs 2011-03-26 15:45:48 UTC (rev 5539) +++ trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/RootClassBinder.cs 2011-03-26 16:01:36 UTC (rev 5540) @@ -34,7 +34,7 @@ rootClass.EntityName)); } - Table table = mappings.AddTable(schema, catalog, tableName, null, rootClass.IsAbstract.GetValueOrDefault(), classSchema.schemaaction); + Table table = mappings.AddTable(schema, catalog, tableName, classSchema.Subselect, rootClass.IsAbstract.GetValueOrDefault(), classSchema.schemaaction); ((ITableOwner) rootClass).Table = table; log.InfoFormat("Mapping class: {0} -> {1}", rootClass.EntityName, rootClass.Table.Name); Modified: trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/UnionSubclassBinder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/UnionSubclassBinder.cs 2011-03-26 15:45:48 UTC (rev 5539) +++ trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/UnionSubclassBinder.cs 2011-03-26 16:01:36 UTC (rev 5540) @@ -41,7 +41,7 @@ Table denormalizedSuperTable = unionSubclass.Superclass.Table; Table mytable = mappings.AddDenormalizedTable(schema, catalog, GetClassTableName(unionSubclass, unionSubclassMapping.table), - unionSubclass.IsAbstract.GetValueOrDefault(), null, denormalizedSuperTable); + unionSubclass.IsAbstract.GetValueOrDefault(), unionSubclassMapping.Subselect, denormalizedSuperTable); ((ITableOwner)unionSubclass).Table = mytable; log.InfoFormat("Mapping union-subclass: {0} -> {1}", unionSubclass.EntityName, unionSubclass.Table.Name); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2011-03-26 15:45:55
|
Revision: 5539 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5539&view=rev Author: fabiomaulo Date: 2011-03-26 15:45:48 +0000 (Sat, 26 Mar 2011) Log Message: ----------- Starting NH-2602 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmArray.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmBag.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmBase.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmClass.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmExtensions.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIdbag.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoin.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoinedSubclass.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmList.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMap.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmPrimitiveArray.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSet.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSubclass.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmUnionSubclass.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/ICollectionSqlsMapping.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/IEntitySqlsMapping.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmArray.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmArray.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmArray.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Xml.Serialization; @@ -74,6 +75,14 @@ get { return sqldeleteall; } } + public string Subselect + { + get + { + return !string.IsNullOrEmpty(subselect1) ? subselect1 : (subselect != null ? subselect.Text.JoinString() : null); + } + } + #endregion #region Implementation of ICollectionPropertyMapping Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmBag.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmBag.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmBag.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -75,6 +75,14 @@ get { return sqldeleteall; } } + public string Subselect + { + get + { + return !string.IsNullOrEmpty(subselect1) ? subselect1 : (subselect != null ? subselect.Text.JoinString() : null); + } + } + #endregion #region Implementation of ICollectionPropertiesMapping Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmBase.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmBase.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmBase.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -24,13 +24,7 @@ protected static string JoinString(string[] text) { - if (text != null) - { - string result = string.Join(System.Environment.NewLine, text).Trim(); - return result.Length == 0 ? null : result; - } - else - return null; + return text.JoinString(); } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmClass.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmClass.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmClass.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -156,6 +156,14 @@ get { return sqldelete; } } + public string Subselect + { + get + { + return !string.IsNullOrEmpty(subselect1) ? subselect1 : (subselect != null ? subselect.Text.JoinString() : null); + } + } + #endregion #region Implementation of IPropertiesContainerMapping Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmExtensions.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmExtensions.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmExtensions.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -72,5 +72,15 @@ throw new ArgumentOutOfRangeException("cacheMode"); } } + + public static string JoinString(this string[] source) + { + if (source != null) + { + string result = string.Join(System.Environment.NewLine, source).Trim(); + return result.Length == 0 ? null : result; + } + return null; + } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIdbag.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIdbag.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIdbag.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Xml.Serialization; @@ -74,6 +75,14 @@ get { return sqldeleteall; } } + public string Subselect + { + get + { + return !string.IsNullOrEmpty(subselect1) ? subselect1 : (subselect != null ? subselect.Text.JoinString() : null); + } + } + #endregion #region Implementation of ICollectionPropertiesMapping Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoin.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoin.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoin.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -31,6 +31,14 @@ #endregion + public string Subselect + { + get + { + return !string.IsNullOrEmpty(subselect1) ? subselect1 : (subselect != null ? subselect.Text.JoinString() : null); + } + } + #region Implementation of IPropertiesContainerMapping [XmlIgnore] Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoinedSubclass.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoinedSubclass.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoinedSubclass.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Xml.Serialization; @@ -111,6 +112,14 @@ get { return sqldelete; } } + public string Subselect + { + get + { + return !string.IsNullOrEmpty(subselect1) ? subselect1 : (subselect != null ? subselect.Text.JoinString() : null); + } + } + #endregion #region Implementation of IPropertiesContainerMapping Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmList.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmList.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmList.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Xml.Serialization; @@ -74,6 +75,14 @@ get { return sqldeleteall; } } + public string Subselect + { + get + { + return !string.IsNullOrEmpty(subselect1) ? subselect1 : (subselect != null ? subselect.Text.JoinString() : null); + } + } + #endregion #region Implementation of IIndexedCollection Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMap.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMap.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMap.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Xml.Serialization; @@ -74,6 +75,14 @@ get { return sqldeleteall; } } + public string Subselect + { + get + { + return !string.IsNullOrEmpty(subselect1) ? subselect1 : (subselect != null ? subselect.Text.JoinString() : null); + } + } + #endregion #region Implementation of ICollectionPropertiesMapping Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmPrimitiveArray.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmPrimitiveArray.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmPrimitiveArray.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Xml.Serialization; @@ -74,6 +75,14 @@ get { return sqldeleteall; } } + public string Subselect + { + get + { + return !string.IsNullOrEmpty(subselect1) ? subselect1 : (subselect != null ? subselect.Text.JoinString() : null); + } + } + #endregion #region Implementation of ICollectionPropertyMapping Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSet.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSet.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSet.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -75,6 +75,14 @@ get { return sqldeleteall; } } + public string Subselect + { + get + { + return !string.IsNullOrEmpty(subselect1) ? subselect1 : (subselect != null ? subselect.Text.JoinString() : null); + } + } + #endregion #region Implementation of ICollectionPropertiesMapping Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSubclass.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSubclass.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSubclass.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Xml.Serialization; @@ -127,6 +128,11 @@ get { return sqldelete; } } + public string Subselect + { + get { return null; } + } + #endregion #region Implementation of IPropertiesContainerMapping Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmUnionSubclass.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmUnionSubclass.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmUnionSubclass.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Xml.Serialization; @@ -112,6 +113,14 @@ get { return sqldelete; } } + public string Subselect + { + get + { + return !string.IsNullOrEmpty(subselect1) ? subselect1 : (subselect != null ? subselect.Text.JoinString() : null); + } + } + #endregion #region Implementation of IPropertiesContainerMapping Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/ICollectionSqlsMapping.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/ICollectionSqlsMapping.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/ICollectionSqlsMapping.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -7,5 +7,6 @@ HbmCustomSQL SqlUpdate { get; } HbmCustomSQL SqlDelete { get; } HbmCustomSQL SqlDeleteAll { get; } + string Subselect { get; } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/IEntitySqlsMapping.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/IEntitySqlsMapping.cs 2011-03-26 12:30:28 UTC (rev 5538) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/IEntitySqlsMapping.cs 2011-03-26 15:45:48 UTC (rev 5539) @@ -6,5 +6,6 @@ HbmCustomSQL SqlInsert { get; } HbmCustomSQL SqlUpdate { get; } HbmCustomSQL SqlDelete { get; } + string Subselect { get; } } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2011-03-26 12:30:34
|
Revision: 5538 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5538&view=rev Author: fabiomaulo Date: 2011-03-26 12:30:28 +0000 (Sat, 26 Mar 2011) Log Message: ----------- Apply NH-2600 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Collection/AbstractPersistentCollection.cs Modified: trunk/nhibernate/src/NHibernate/Collection/AbstractPersistentCollection.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Collection/AbstractPersistentCollection.cs 2011-03-26 12:12:43 UTC (rev 5537) +++ trunk/nhibernate/src/NHibernate/Collection/AbstractPersistentCollection.cs 2011-03-26 12:30:28 UTC (rev 5538) @@ -99,7 +99,7 @@ /// <summary> /// Not called by Hibernate, but used by non-NET serialization, eg. SOAP libraries. /// </summary> - public AbstractPersistentCollection() {} + protected AbstractPersistentCollection() {} protected AbstractPersistentCollection(ISessionImplementor session) { @@ -134,12 +134,13 @@ protected int CachedSize { get { return cachedSize; } + set { cachedSize = value; } } /// <summary> /// Is the collection currently connected to an open session? /// </summary> - private bool IsConnectedToSession + protected bool IsConnectedToSession { get { return session != null && session.IsOpen && session.PersistenceContext.ContainsCollection(this); } } @@ -171,7 +172,7 @@ } /// <summary> Is this the "inverse" end of a bidirectional association?</summary> - private bool IsInverseCollection + protected bool IsInverseCollection { get { @@ -184,7 +185,7 @@ /// Is this the "inverse" end of a bidirectional association with /// no orphan delete enabled? /// </summary> - private bool InverseCollectionNoOrphanDelete + protected bool InverseCollectionNoOrphanDelete { get { @@ -197,7 +198,7 @@ /// Is this the "inverse" end of a bidirectional one-to-many, or /// of a collection with no orphan delete? /// </summary> - private bool InverseOneToManyOrNoOrphanDelete + protected bool InverseOneToManyOrNoOrphanDelete { get { @@ -228,12 +229,12 @@ } /// <summary></summary> - protected ISessionImplementor Session + protected virtual ISessionImplementor Session { get { return session; } } - public object Owner + public virtual object Owner { get { return owner; } set { owner = value; } @@ -257,13 +258,13 @@ /// <summary> /// Called by any read-only method of the collection interface /// </summary> - public void Read() + public virtual void Read() { Initialize(false); } /// <summary> Called by the <tt>Count</tt> property</summary> - protected bool ReadSize() + protected virtual bool ReadSize() { if (!initialized) { @@ -291,7 +292,7 @@ return false; } - protected bool? ReadIndexExistence(object index) + protected virtual bool? ReadIndexExistence(object index) { if (!initialized) { @@ -311,7 +312,7 @@ return null; } - protected bool? ReadElementExistence(object element) + protected virtual bool? ReadElementExistence(object element) { if (!initialized) { @@ -331,7 +332,7 @@ return null; } - protected object ReadElementByIndex(object index) + protected virtual object ReadElementByIndex(object index) { if (!initialized) { @@ -354,7 +355,7 @@ /// <summary> /// Called by any writer method of the collection interface /// </summary> - protected void Write() + protected virtual void Write() { Initialize(true); Dirty(); @@ -363,7 +364,7 @@ /// <summary> /// Queue an addition, delete etc. if the persistent collection supports it /// </summary> - protected void QueueOperation(IDelayedOperation element) + protected virtual void QueueOperation(IDelayedOperation element) { if (operationQueue == null) { @@ -377,7 +378,7 @@ /// After reading all existing elements from the database, /// add the queued elements to the underlying collection. /// </summary> - protected void PerformQueuedOperations() + protected virtual void PerformQueuedOperations() { for (int i = 0; i < operationQueue.Count; i++) { @@ -451,7 +452,7 @@ /// </summary> /// <param name="writing">currently obsolete</param> /// <exception cref="LazyInitializationException">if we cannot initialize</exception> - protected void Initialize(bool writing) + protected virtual void Initialize(bool writing) { if (!initialized) { @@ -464,7 +465,7 @@ } } - private void ThrowLazyInitializationExceptionIfNotConnected() + protected void ThrowLazyInitializationExceptionIfNotConnected() { if (!IsConnectedToSession) { @@ -476,7 +477,7 @@ } } - private void ThrowLazyInitializationException(string message) + protected void ThrowLazyInitializationException(string message) { var ownerEntityName = role == null ? "Unavailable" : StringHelper.Qualifier(role); throw new LazyInitializationException(ownerEntityName, key, "failed to lazily initialize a collection" @@ -486,7 +487,7 @@ /// <summary> /// Mark the collection as initialized. /// </summary> - protected void SetInitialized() + protected virtual void SetInitialized() { initializing = false; initialized = true; @@ -535,7 +536,7 @@ /// </summary> /// <param name="session"></param> /// <returns>false if the collection was already associated with the session</returns> - public bool SetCurrentSession(ISessionImplementor session) + public virtual bool SetCurrentSession(ISessionImplementor session) { if (session == this.session // NH: added to fix NH-704 && session.PersistenceContext.ContainsCollection(this)) @@ -587,7 +588,7 @@ /// <remarks> /// This method is similar to <see cref="Initialize" />, except that different exceptions are thrown. /// </remarks> - public void ForceInitialization() + public virtual void ForceInitialization() { if (!initialized) { @@ -610,7 +611,7 @@ /// <summary> /// Gets the Snapshot from the current session the collection is in. /// </summary> - protected object GetSnapshot() + protected virtual object GetSnapshot() { return session.PersistenceContext.GetSnapshot(this); } @@ -688,7 +689,7 @@ /// belong to the collection, and a collection of instances /// that currently belong, return a collection of orphans /// </summary> - protected static ICollection GetOrphans(ICollection oldElements, ICollection currentElements, string entityName, + protected virtual ICollection GetOrphans(ICollection oldElements, ICollection currentElements, string entityName, ISessionImplementor session) { // short-circuit(s) @@ -732,7 +733,7 @@ return res; } - public static void IdentityRemove(IList list, object obj, string entityName, ISessionImplementor session) + public void IdentityRemove(IList list, object obj, string entityName, ISessionImplementor session) { if (obj != null && ForeignKeys.IsNotTransient(entityName, obj, null, session)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2011-03-26 12:12:50
|
Revision: 5537 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5537&view=rev Author: fabiomaulo Date: 2011-03-26 12:12:43 +0000 (Sat, 26 Mar 2011) Log Message: ----------- Fix NH-2382 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/IMultiQuery.cs trunk/nhibernate/src/NHibernate/IQuery.cs trunk/nhibernate/src/NHibernate/Impl/AbstractQueryImpl.cs trunk/nhibernate/src/NHibernate/Impl/MultiQueryImpl.cs Modified: trunk/nhibernate/src/NHibernate/IMultiQuery.cs =================================================================== --- trunk/nhibernate/src/NHibernate/IMultiQuery.cs 2011-03-26 00:43:34 UTC (rev 5536) +++ trunk/nhibernate/src/NHibernate/IMultiQuery.cs 2011-03-26 12:12:43 UTC (rev 5537) @@ -243,6 +243,11 @@ /// <returns>The instance for method chain.</returns> IMultiQuery SetDateTime(string name, DateTime val); + IMultiQuery SetDateTime2(string name, DateTime val); + IMultiQuery SetTimeSpan(string name, TimeSpan val); + IMultiQuery SetTimeAsTimeSpan(string name, TimeSpan val); + IMultiQuery SetDateTimeOffset(string name, DateTimeOffset val); + /// <summary> /// Bind an instance of a <see cref="Decimal" /> to a named parameter /// using an NHibernate <see cref="DecimalType"/>. Modified: trunk/nhibernate/src/NHibernate/IQuery.cs =================================================================== --- trunk/nhibernate/src/NHibernate/IQuery.cs 2011-03-26 00:43:34 UTC (rev 5536) +++ trunk/nhibernate/src/NHibernate/IQuery.cs 2011-03-26 12:12:43 UTC (rev 5537) @@ -412,6 +412,15 @@ /// <param name="name">The name of the parameter</param> IQuery SetDateTime(string name, DateTime val); + IQuery SetDateTime2(int position, DateTime val); + IQuery SetDateTime2(string name, DateTime val); + IQuery SetTimeSpan(int position, TimeSpan val); + IQuery SetTimeSpan(string name, TimeSpan val); + IQuery SetTimeAsTimeSpan(int position, TimeSpan val); + IQuery SetTimeAsTimeSpan(string name, TimeSpan val); + IQuery SetDateTimeOffset(int position, DateTimeOffset val); + IQuery SetDateTimeOffset(string name, DateTimeOffset val); + /// <summary> /// Bind an instance of a <see cref="Decimal" /> to an indexed parameter /// using an NHibernate <see cref="DecimalType"/>. Modified: trunk/nhibernate/src/NHibernate/Impl/AbstractQueryImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/AbstractQueryImpl.cs 2011-03-26 00:43:34 UTC (rev 5536) +++ trunk/nhibernate/src/NHibernate/Impl/AbstractQueryImpl.cs 2011-03-26 12:12:43 UTC (rev 5537) @@ -437,6 +437,12 @@ return this; } + public IQuery SetDateTimeOffset(string name, DateTimeOffset val) + { + SetParameter(name, val, NHibernateUtil.DateTimeOffset); + return this; + } + public IQuery SetDecimal(int position, decimal val) { SetParameter(position, val, NHibernateUtil.Decimal); @@ -551,6 +557,48 @@ return this; } + public IQuery SetDateTime2(int position, DateTime val) + { + SetParameter(position, val, NHibernateUtil.DateTime2); + return this; + } + + public IQuery SetDateTime2(string name, DateTime val) + { + SetParameter(name, val, NHibernateUtil.DateTime2); + return this; + } + + public IQuery SetTimeSpan(int position, TimeSpan val) + { + SetParameter(position, val, NHibernateUtil.TimeSpan); + return this; + } + + public IQuery SetTimeSpan(string name, TimeSpan val) + { + SetParameter(name, val, NHibernateUtil.TimeSpan); + return this; + } + + public IQuery SetTimeAsTimeSpan(int position, TimeSpan val) + { + SetParameter(position, val, NHibernateUtil.TimeAsTimeSpan); + return this; + } + + public IQuery SetTimeAsTimeSpan(string name, TimeSpan val) + { + SetParameter(name, val, NHibernateUtil.TimeAsTimeSpan); + return this; + } + + public IQuery SetDateTimeOffset(int position, DateTimeOffset val) + { + SetParameter(position, val, NHibernateUtil.DateTimeOffset); + return this; + } + public IQuery SetTime(string name, DateTime val) { SetParameter(name, val, NHibernateUtil.Time); Modified: trunk/nhibernate/src/NHibernate/Impl/MultiQueryImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/MultiQueryImpl.cs 2011-03-26 00:43:34 UTC (rev 5536) +++ trunk/nhibernate/src/NHibernate/Impl/MultiQueryImpl.cs 2011-03-26 12:12:43 UTC (rev 5537) @@ -164,6 +164,42 @@ return this; } + public IMultiQuery SetDateTime2(string name, DateTime val) + { + foreach (IQuery query in queries) + { + query.SetParameter(name, val, NHibernateUtil.DateTime2); + } + return this; + } + + public IMultiQuery SetTimeSpan(string name, TimeSpan val) + { + foreach (IQuery query in queries) + { + query.SetParameter(name, val, NHibernateUtil.TimeSpan); + } + return this; + } + + public IMultiQuery SetTimeAsTimeSpan(string name, TimeSpan val) + { + foreach (IQuery query in queries) + { + query.SetParameter(name, val, NHibernateUtil.TimeAsTimeSpan); + } + return this; + } + + public IMultiQuery SetDateTimeOffset(string name, DateTimeOffset val) + { + foreach (IQuery query in queries) + { + query.SetParameter(name, val, NHibernateUtil.DateTimeOffset); + } + return this; + } + public IMultiQuery SetDecimal(string name, decimal val) { foreach (IQuery query in queries) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-26 00:43:40
|
Revision: 5536 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5536&view=rev Author: patearl Date: 2011-03-26 00:43:34 +0000 (Sat, 26 Mar 2011) Log Message: ----------- Added and partially utilized Dialect.SupportsForeignKeyConstraintInAlterTable property. Need to fill in the "CREATE TABLE" part of the implementation still. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs 2011-03-25 21:44:28 UTC (rev 5535) +++ trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs 2011-03-26 00:43:34 UTC (rev 5536) @@ -912,7 +912,7 @@ script.Add(index.SqlCreateString(dialect, mapping, defaultCatalog, defaultSchema)); } - if (dialect.HasAlterTable) + if (dialect.SupportsForeignKeyConstraintInAlterTable) { foreach (var fk in table.ForeignKeyIterator) { @@ -2320,7 +2320,7 @@ ITableMetadata tableInfo = databaseMetadata.GetTableMetadata(table.Name, table.Schema, table.Catalog, table.IsQuoted); - if (dialect.HasAlterTable) + if (dialect.SupportsForeignKeyConstraintInAlterTable) { foreach (var fk in table.ForeignKeyIterator) { Modified: trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs 2011-03-25 21:44:28 UTC (rev 5535) +++ trunk/nhibernate/src/NHibernate/Dialect/Dialect.cs 2011-03-26 00:43:34 UTC (rev 5536) @@ -621,6 +621,14 @@ get { return true; } } + /// <summary> + /// Does this dialect support adding foreign key constraints via alter table? If not, it's assumed they can only be added through create table. + /// </summary> + public virtual bool SupportsForeignKeyConstraintInAlterTable + { + get { return HasAlterTable; } + } + /// <summary> /// The syntax used to add a foreign key constraint to a table. /// </summary> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2011-03-25 21:44:34
|
Revision: 5535 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5535&view=rev Author: fabiomaulo Date: 2011-03-25 21:44:28 +0000 (Fri, 25 Mar 2011) Log Message: ----------- Reverted previous partial fix and fixed NH-2488 completely (added joined-subclass case) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Persister/Entity/SingleTableEntityPersister.cs trunk/nhibernate/src/NHibernate/Tuple/Entity/PocoEntityTuplizer.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Model.cs Modified: trunk/nhibernate/src/NHibernate/Persister/Entity/SingleTableEntityPersister.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Persister/Entity/SingleTableEntityPersister.cs 2011-03-25 20:29:34 UTC (rev 5534) +++ trunk/nhibernate/src/NHibernate/Persister/Entity/SingleTableEntityPersister.cs 2011-03-25 21:44:28 UTC (rev 5535) @@ -138,13 +138,8 @@ ?? ExecuteUpdateResultCheckStyle.DetermineDefault(customSQLDelete[j], deleteCallable[j]); - IEnumerable<Column> enumerableKeyCol = new SafetyEnumerable<Column>(join.Key.ColumnIterator); - List<string> kcName = new List<string>(join.Key.ColumnSpan); - foreach (Column col in enumerableKeyCol) - kcName.Add(col.GetQuotedName(factory.Dialect)); + keyColumnNames[j] = join.Key.ColumnIterator.OfType<Column>().Select(col => col.GetQuotedName(factory.Dialect)).ToArray(); - keyColumnNames[j] = kcName.ToArray(); - j++; } @@ -156,7 +151,7 @@ constraintOrderedKeyColumnNames[position] = keyColumnNames[i]; } - spaces = ArrayHelper.Join(qualifiedTableNames, ArrayHelper.ToStringArray(persistentClass.SynchronizedTables)); + spaces = qualifiedTableNames.Concat(persistentClass.SynchronizedTables).ToArray(); bool lazyAvailable = IsInstrumented(EntityMode.Poco); @@ -185,12 +180,9 @@ if (join.IsSequentialSelect && !persistentClass.IsClassOrSuperclassJoin(join)) hasDeferred = true; subclassTables.Add(join.Table.GetQualifiedName(factory.Dialect, factory.Settings.DefaultCatalogName, factory.Settings.DefaultSchemaName)); - IEnumerable<Column> enumerableKeyCol = new SafetyEnumerable<Column>(join.Key.ColumnIterator); - List<string> keyCols = new List<string>(join.Key.ColumnSpan); - foreach (Column col in enumerableKeyCol) - keyCols.Add(col.GetQuotedName(factory.Dialect)); - joinKeyColumns.Add(keyCols.ToArray()); + var keyCols = join.Key.ColumnIterator.OfType<Column>().Select(col => col.GetQuotedName(factory.Dialect)).ToArray(); + joinKeyColumns.Add(keyCols); } subclassTableSequentialSelect = isDeferreds.ToArray(); @@ -297,7 +289,6 @@ int join = persistentClass.GetJoinNumber(prop); propertyJoinNumbers.Add(join); - //propertyTableNumbersByName.put( prop.getName(), join ); propertyTableNumbersByNameAndSubclass[prop.PersistentClass.EntityName + '.' + prop.Name] = join; foreach (ISelectable thing in prop.ColumnIterator) { @@ -643,11 +634,10 @@ var tableNumbers = new HashSet<int>(); string[] props = subclassPersister.PropertyNames; string[] classes = subclassPersister.PropertySubclassNames; - bool[] propertyLazies = subclassPersister.PropertyLaziness; for (int i = 0; i < props.Length; i++) { int propTableNumber = GetSubclassPropertyTableNumber(props[i], classes[i]); - if (IsSubclassTableSequentialSelect(propTableNumber) && !IsSubclassTableLazy(propTableNumber) && propertyLazies[i] == false) + if (IsSubclassTableSequentialSelect(propTableNumber) && !IsSubclassTableLazy(propTableNumber)) { tableNumbers.Add(propTableNumber); } @@ -658,10 +648,9 @@ //figure out which columns are needed (excludes lazy-properties) List<int> columnNumbers = new List<int>(); int[] columnTableNumbers = SubclassColumnTableNumberClosure; - bool[] subclassColumnLaziness = SubclassColumnLaziness; for (int i = 0; i < SubclassColumnClosure.Length; i++) { - if (tableNumbers.Contains(columnTableNumbers[i]) && !subclassColumnLaziness[i]) + if (tableNumbers.Contains(columnTableNumbers[i])) { columnNumbers.Add(i); } @@ -670,10 +659,9 @@ //figure out which formulas are needed (excludes lazy-properties) List<int> formulaNumbers = new List<int>(); int[] formulaTableNumbers = SubclassColumnTableNumberClosure; - bool[] subclassFormulaLaziness = SubclassFormulaLaziness; for (int i = 0; i < SubclassFormulaTemplateClosure.Length; i++) { - if (tableNumbers.Contains(formulaTableNumbers[i]) && !subclassFormulaLaziness[i]) + if (tableNumbers.Contains(formulaTableNumbers[i])) { formulaNumbers.Add(i); } Modified: trunk/nhibernate/src/NHibernate/Tuple/Entity/PocoEntityTuplizer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Tuple/Entity/PocoEntityTuplizer.cs 2011-03-25 20:29:34 UTC (rev 5534) +++ trunk/nhibernate/src/NHibernate/Tuple/Entity/PocoEntityTuplizer.cs 2011-03-25 21:44:28 UTC (rev 5535) @@ -78,9 +78,11 @@ public override bool IsInstrumented { get - { - return (EntityMetamodel.HasLazyProperties || EntityMetamodel.HasUnwrapProxyForProperties) - && FieldInterceptionHelper.IsInstrumented(MappedClass); + { + // NH: we can't really check for EntityMetamodel.HasLazyProperties and/or EntityMetamodel.HasUnwrapProxyForProperties here + // because this property is used even where subclasses has lazy-properties. + // Checking it here, where the root-entity has no lazy properties we will eager-load/double-load those properties. + return FieldInterceptionHelper.IsInstrumented(MappedClass); } } @@ -224,7 +226,7 @@ public override void AfterInitialize(object entity, bool lazyPropertiesAreUnfetched, ISessionImplementor session) { - if (IsInstrumented) + if (IsInstrumented && (EntityMetamodel.HasLazyProperties || EntityMetamodel.HasUnwrapProxyForProperties)) { HashedSet<string> lazyProps = lazyPropertiesAreUnfetched && EntityMetamodel.HasLazyProperties ? lazyPropertyNames : null; //TODO: if we support multiple fetch groups, we would need Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs 2011-03-25 20:29:34 UTC (rev 5534) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs 2011-03-25 21:44:28 UTC (rev 5535) @@ -77,10 +77,44 @@ } } } + private class JoinedSubclassScenario : IDisposable + { + private readonly ISessionFactory factory; + public JoinedSubclassScenario(ISessionFactory factory) + { + this.factory = factory; + using (ISession s = factory.OpenSession()) + { + using (ITransaction t = s.BeginTransaction()) + { + var entity = new Derived3 + { + ShortContent = "Short", + LongContent = "LongLongLongLongLong", + }; + s.Save(entity); + t.Commit(); + } + } + } + + public void Dispose() + { + using (ISession s = factory.OpenSession()) + { + using (ITransaction t = s.BeginTransaction()) + { + s.Delete("from Derived3"); + t.Commit(); + } + } + } + } + #endregion - [Test, Ignore("Not fixed yet")] + [Test] public void ShouldNotQueryLazyProperties_FetchJoin() { using (new FetchJoinScenario(Sfi)) @@ -108,9 +142,6 @@ [Test] public void ShouldNotQueryLazyProperties_FetchSelect() { - // this is the real meat of the test - // for most edifying results, run this with show_sql enabled - using (new FetchSelectScenario(Sfi)) { using (ISession s = OpenSession()) @@ -132,5 +163,30 @@ } } } + + [Test] + public void ShouldNotQueryLazyProperties_Joinedsubclass() + { + using (new JoinedSubclassScenario(Sfi)) + { + using (ISession s = OpenSession()) + { + using (ITransaction t = s.BeginTransaction()) + { + IList<Base3> items; + using (var ls = new SqlLogSpy()) + { + items = s.CreateQuery("from Base3").List<Base3>(); + ls.GetWholeLog().Should().Not.Contain("LongContent"); + } + var item = (Derived3)items[0]; + NHibernateUtil.IsPropertyInitialized(item, "LongContent").Should().Be.False(); + string lc = item.LongContent; + lc.Should().Not.Be.NullOrEmpty(); + NHibernateUtil.IsPropertyInitialized(item, "LongContent").Should().Be.True(); + } + } + } + } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Mappings.hbm.xml 2011-03-25 20:29:34 UTC (rev 5534) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Mappings.hbm.xml 2011-03-25 21:44:28 UTC (rev 5535) @@ -29,4 +29,16 @@ <property name="LongContent" lazy="true" not-null="true" /> </join> </subclass> + + <class name="Base3" abstract="true"> + <id name="Id"> + <generator class="increment"/> + </id> + <property name="ShortContent"/> + </class> + <joined-subclass name="Derived3" extends="Base3"> + <key column="Id" /> + <property name="LongContent" lazy="true" not-null="true" /> + </joined-subclass> + </hibernate-mapping> \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Model.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Model.cs 2011-03-25 20:29:34 UTC (rev 5534) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Model.cs 2011-03-25 21:44:28 UTC (rev 5535) @@ -23,4 +23,15 @@ { public virtual string LongContent { get; set; } } + + public class Base3 + { + public virtual int Id { get; set; } + + public virtual string ShortContent { get; set; } + } + public class Derived3 : Base3 + { + public virtual string LongContent { get; set; } + } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2011-03-25 20:29:40
|
Revision: 5534 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5534&view=rev Author: fabiomaulo Date: 2011-03-25 20:29:34 +0000 (Fri, 25 Mar 2011) Log Message: ----------- Partial fix NH-2488 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Persister/Entity/SingleTableEntityPersister.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Model.cs Modified: trunk/nhibernate/src/NHibernate/Persister/Entity/SingleTableEntityPersister.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Persister/Entity/SingleTableEntityPersister.cs 2011-03-25 20:28:08 UTC (rev 5533) +++ trunk/nhibernate/src/NHibernate/Persister/Entity/SingleTableEntityPersister.cs 2011-03-25 20:29:34 UTC (rev 5534) @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Text; -using Iesi.Collections.Generic; +using System.Linq; using NHibernate.Cache; using NHibernate.Engine; using NHibernate.Mapping; @@ -638,15 +638,16 @@ //note that this method could easily be moved up to BasicEntityPersister, //if we ever needed to reuse it from other subclasses - //figure out which tables need to be fetched + //figure out which tables need to be fetched (only those that contains at least a no-lazy-property) AbstractEntityPersister subclassPersister = (AbstractEntityPersister)persister; - HashedSet<int> tableNumbers = new HashedSet<int>(); + var tableNumbers = new HashSet<int>(); string[] props = subclassPersister.PropertyNames; string[] classes = subclassPersister.PropertySubclassNames; + bool[] propertyLazies = subclassPersister.PropertyLaziness; for (int i = 0; i < props.Length; i++) { int propTableNumber = GetSubclassPropertyTableNumber(props[i], classes[i]); - if (IsSubclassTableSequentialSelect(propTableNumber) && !IsSubclassTableLazy(propTableNumber)) + if (IsSubclassTableSequentialSelect(propTableNumber) && !IsSubclassTableLazy(propTableNumber) && propertyLazies[i] == false) { tableNumbers.Add(propTableNumber); } @@ -654,26 +655,32 @@ if ((tableNumbers.Count == 0)) return null; - //figure out which columns are needed + //figure out which columns are needed (excludes lazy-properties) List<int> columnNumbers = new List<int>(); int[] columnTableNumbers = SubclassColumnTableNumberClosure; + bool[] subclassColumnLaziness = SubclassColumnLaziness; for (int i = 0; i < SubclassColumnClosure.Length; i++) { - if (tableNumbers.Contains(columnTableNumbers[i])) + if (tableNumbers.Contains(columnTableNumbers[i]) && !subclassColumnLaziness[i]) + { columnNumbers.Add(i); + } } - //figure out which formulas are needed + //figure out which formulas are needed (excludes lazy-properties) List<int> formulaNumbers = new List<int>(); int[] formulaTableNumbers = SubclassColumnTableNumberClosure; + bool[] subclassFormulaLaziness = SubclassFormulaLaziness; for (int i = 0; i < SubclassFormulaTemplateClosure.Length; i++) { - if (tableNumbers.Contains(formulaTableNumbers[i])) + if (tableNumbers.Contains(formulaTableNumbers[i]) && !subclassFormulaLaziness[i]) + { formulaNumbers.Add(i); + } } //render the SQL - return RenderSelect(ArrayHelper.ToIntArray(tableNumbers), columnNumbers.ToArray(), formulaNumbers.ToArray()); + return RenderSelect(tableNumbers.ToArray(), columnNumbers.ToArray(), formulaNumbers.ToArray()); } protected override string[] GetSubclassTableKeyColumns(int j) Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs 2011-03-25 20:29:34 UTC (rev 5534) @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using NUnit.Framework; +using SharpTestsEx; + +namespace NHibernate.Test.NHSpecificTest.NH2488 +{ + public class Fixture : BugTestCase + { + #region Scenarios + + private class FetchSelectScenario: IDisposable + { + private readonly ISessionFactory factory; + + public FetchSelectScenario(ISessionFactory factory) + { + this.factory = factory; + using (ISession s = factory.OpenSession()) + { + using (ITransaction t = s.BeginTransaction()) + { + var entity = new Derived1 + { + ShortContent = "Short", + LongContent = "LongLongLongLongLong", + }; + s.Save(entity); + t.Commit(); + } + } + } + + public void Dispose() + { + using (ISession s = factory.OpenSession()) + { + using (ITransaction t = s.BeginTransaction()) + { + s.Delete("from Derived1"); + t.Commit(); + } + } + } + } + private class FetchJoinScenario : IDisposable + { + private readonly ISessionFactory factory; + + public FetchJoinScenario(ISessionFactory factory) + { + this.factory = factory; + using (ISession s = factory.OpenSession()) + { + using (ITransaction t = s.BeginTransaction()) + { + var entity = new Derived2 + { + ShortContent = "Short", + LongContent = "LongLongLongLongLong", + }; + s.Save(entity); + t.Commit(); + } + } + } + + public void Dispose() + { + using (ISession s = factory.OpenSession()) + { + using (ITransaction t = s.BeginTransaction()) + { + s.Delete("from Derived2"); + t.Commit(); + } + } + } + } + + #endregion + + [Test, Ignore("Not fixed yet")] + public void ShouldNotQueryLazyProperties_FetchJoin() + { + using (new FetchJoinScenario(Sfi)) + { + using (ISession s = OpenSession()) + { + using (ITransaction t = s.BeginTransaction()) + { + IList<Base2> items; + using (var ls = new SqlLogSpy()) + { + items = s.CreateQuery("from Base2").List<Base2>(); + ls.GetWholeLog().Should().Not.Contain("LongContent"); + } + var item = (Derived2) items[0]; + NHibernateUtil.IsPropertyInitialized(item, "LongContent").Should().Be.False(); + string lc = item.LongContent; + lc.Should().Not.Be.NullOrEmpty(); + NHibernateUtil.IsPropertyInitialized(item, "LongContent").Should().Be.True(); + } + } + } + } + + [Test] + public void ShouldNotQueryLazyProperties_FetchSelect() + { + // this is the real meat of the test + // for most edifying results, run this with show_sql enabled + + using (new FetchSelectScenario(Sfi)) + { + using (ISession s = OpenSession()) + { + using (ITransaction t = s.BeginTransaction()) + { + IList<Base1> items; + using(var ls = new SqlLogSpy()) + { + items = s.CreateQuery("from Base1").List<Base1>(); + ls.GetWholeLog().Should().Not.Contain("LongContent"); + } + var item = (Derived1) items[0]; + NHibernateUtil.IsPropertyInitialized(item, "LongContent").Should().Be.False(); + string lc = item.LongContent; + lc.Should().Not.Be.NullOrEmpty(); + NHibernateUtil.IsPropertyInitialized(item, "LongContent").Should().Be.True(); + } + } + } + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Mappings.hbm.xml 2011-03-25 20:29:34 UTC (rev 5534) @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + namespace="NHibernate.Test.NHSpecificTest.NH2488" + assembly="NHibernate.Test" +> + <class name="Base1" abstract="true"> + <id name="Id"> + <generator class="increment"/> + </id> + <discriminator column="Discriminator" type="String" /> + <property name="ShortContent"/> + </class> + <subclass name="Derived1" extends="Base1" discriminator-value="Derived1"> + <join table="Derived1" fetch="select"> + <key column="Id" /> + <property name="LongContent" lazy="true" not-null="true" /> + </join> + </subclass> + <class name="Base2" abstract="true"> + <id name="Id"> + <generator class="increment"/> + </id> + <discriminator column="Discriminator" type="String" /> + <property name="ShortContent"/> + </class> + <subclass name="Derived2" extends="Base2" discriminator-value="Derived2"> + <join table="Derived2" fetch="join"> + <key column="Id" /> + <property name="LongContent" lazy="true" not-null="true" /> + </join> + </subclass> +</hibernate-mapping> \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Model.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Model.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2488/Model.cs 2011-03-25 20:29:34 UTC (rev 5534) @@ -0,0 +1,26 @@ +namespace NHibernate.Test.NHSpecificTest.NH2488 +{ + public class Base1 + { + public virtual int Id { get; set; } + + public virtual string ShortContent { get; set; } + } + + public class Base2 + { + public virtual int Id { get; set; } + + public virtual string ShortContent { get; set; } + } + + public class Derived1 : Base1 + { + public virtual string LongContent { get; set; } + } + + public class Derived2 : Base2 + { + public virtual string LongContent { get; set; } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2011-03-25 20:28:08 UTC (rev 5533) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2011-03-25 20:29:34 UTC (rev 5534) @@ -654,6 +654,8 @@ <Compile Include="NHSpecificTest\NH2470\DTO.cs" /> <Compile Include="NHSpecificTest\NH2484\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2484\Model.cs" /> + <Compile Include="NHSpecificTest\NH2488\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2488\Model.cs" /> <Compile Include="NHSpecificTest\NH2490\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2490\Model.cs" /> <Compile Include="NHSpecificTest\NH2491\Fixture.cs" /> @@ -2492,6 +2494,7 @@ <EmbeddedResource Include="NHSpecificTest\NH1291AnonExample\Mappings.hbm.xml" /> </ItemGroup> <ItemGroup> + <EmbeddedResource Include="NHSpecificTest\NH2488\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2490\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1925\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2527\Mappings.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-25 20:28:14
|
Revision: 5533 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5533&view=rev Author: patearl Date: 2011-03-25 20:28:08 +0000 (Fri, 25 Mar 2011) Log Message: ----------- Tests: Ignore MSSQL-specific test on other databases. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/ProjectionFixtures/Fixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/ProjectionFixtures/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/ProjectionFixtures/Fixture.cs 2011-03-25 20:03:21 UTC (rev 5532) +++ trunk/nhibernate/src/NHibernate.Test/ProjectionFixtures/Fixture.cs 2011-03-25 20:28:08 UTC (rev 5533) @@ -1,5 +1,6 @@ using System; using NHibernate.Criterion; +using NHibernate.Dialect; using NHibernate.Driver; using NUnit.Framework; @@ -66,6 +67,9 @@ [Test] public void ErrorFromDBWillGiveTheActualSQLExecuted() { + if (!(Dialect is MsSql2000Dialect)) + Assert.Ignore("Test checks for exact sql and expects an error to occur in a case which is not erroneous on all databases."); + string pName = ((ISqlParameterFormatter) sessions.ConnectionProvider.Driver).GetParameterName(0); string expectedMessage = string.Format( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-25 20:03:27
|
Revision: 5532 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5532&view=rev Author: patearl Date: 2011-03-25 20:03:21 +0000 (Fri, 25 Mar 2011) Log Message: ----------- NH2386: Ignore MS-specific test for other dialects. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2386/Test.cs Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2386/Test.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2386/Test.cs 2011-03-25 19:41:12 UTC (rev 5531) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2386/Test.cs 2011-03-25 20:03:21 UTC (rev 5532) @@ -2,6 +2,7 @@ using log4net; using log4net.Appender; using log4net.Repository.Hierarchy; +using NHibernate.Dialect; using NUnit.Framework; namespace NHibernate.Test.NHSpecificTest.NH2386 { @@ -9,6 +10,11 @@ public class Test : BugTestCase { private MemoryAppender memoryAppender; + protected override bool AppliesTo(Dialect.Dialect dialect) + { + // This test uses the automatically generated timestamp type, which is a MSSQL feature. + return dialect is MsSql2000Dialect; + } protected override void OnTearDown() { if (memoryAppender != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-25 19:41:18
|
Revision: 5531 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5531&view=rev Author: patearl Date: 2011-03-25 19:41:12 +0000 (Fri, 25 Mar 2011) Log Message: ----------- NH2228: Eliminated concurrent transactions to prevent SQLite deadlock. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2228/Fixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2228/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2228/Fixture.cs 2011-03-25 17:52:43 UTC (rev 5530) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2228/Fixture.cs 2011-03-25 19:41:12 UTC (rev 5531) @@ -51,20 +51,22 @@ { using (var scenario = new ParentWithTwoChildrenScenario(Sfi)) { - using (var client1 = OpenSession()) - using (var tx1 = client1.BeginTransaction()) - { - var parentFromClient1 = client1.Get<Parent>(scenario.ParentId); - NHibernateUtil.Initialize(parentFromClient1.Children); - var firstChildId = parentFromClient1.Children[0].Id; - - DeleteChildUsingAnotherSession(firstChildId); + using (var client1 = OpenSession()) + { + var parentFromClient1 = client1.Get<Parent>(scenario.ParentId); + NHibernateUtil.Initialize(parentFromClient1.Children); + var firstChildId = parentFromClient1.Children[0].Id; - parentFromClient1.Children[0].Description = "Modified info"; + DeleteChildUsingAnotherSession(firstChildId); + + using (var tx1 = client1.BeginTransaction()) + { + parentFromClient1.Children[0].Description = "Modified info"; var expectedException = tx1.Executing(x => x.Commit()).Throws<StaleObjectStateException>().Exception; - expectedException.EntityName.Should().Be(typeof(Child).FullName); - expectedException.Identifier.Should().Be(firstChildId); - } + expectedException.EntityName.Should().Be(typeof (Child).FullName); + expectedException.Identifier.Should().Be(firstChildId); + } + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2011-03-25 17:52:50
|
Revision: 5530 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5530&view=rev Author: fabiomaulo Date: 2011-03-25 17:52:43 +0000 (Fri, 25 Mar 2011) Log Message: ----------- TYPO fixed Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs trunk/nhibernate/src/NHibernate/Persister/Entity/UnionSubclassEntityPersister.cs Modified: trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs 2011-03-25 17:42:16 UTC (rev 5529) +++ trunk/nhibernate/src/NHibernate/Persister/Entity/AbstractEntityPersister.cs 2011-03-25 17:52:43 UTC (rev 5530) @@ -662,12 +662,12 @@ get { return GetTableName(0); } } - protected internal bool[] SubclassColumnLazyiness + protected internal bool[] SubclassColumnLaziness { get { return subclassColumnLazyClosure; } } - protected internal bool[] SubclassFormulaLazyiness + protected internal bool[] SubclassFormulaLaziness { get { return subclassFormulaLazyClosure; } } Modified: trunk/nhibernate/src/NHibernate/Persister/Entity/UnionSubclassEntityPersister.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Persister/Entity/UnionSubclassEntityPersister.cs 2011-03-25 17:42:16 UTC (rev 5529) +++ trunk/nhibernate/src/NHibernate/Persister/Entity/UnionSubclassEntityPersister.cs 2011-03-25 17:52:43 UTC (rev 5530) @@ -263,8 +263,8 @@ .SetLockMode(lockMode) .SetTableName(TableName) .AddColumns(IdentifierColumnNames) - .AddColumns(SubclassColumnClosure, SubclassColumnAliasClosure, SubclassColumnLazyiness) - .AddColumns(SubclassFormulaClosure, SubclassFormulaAliasClosure, SubclassFormulaLazyiness); + .AddColumns(SubclassColumnClosure, SubclassColumnAliasClosure, SubclassColumnLaziness) + .AddColumns(SubclassFormulaClosure, SubclassFormulaAliasClosure, SubclassFormulaLaziness); //TODO: include the rowids!!!! if (HasSubclasses) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2011-03-25 17:42:22
|
Revision: 5529 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5529&view=rev Author: fabiomaulo Date: 2011-03-25 17:42:16 +0000 (Fri, 25 Mar 2011) Log Message: ----------- Applied (modified) fix of NH-2490 (thanks to Matthew Gabeler-Lee) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Mapping/Join.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2490/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2490/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2490/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2490/Model.cs Modified: trunk/nhibernate/src/NHibernate/Mapping/Join.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Mapping/Join.cs 2011-03-25 12:01:05 UTC (rev 5528) +++ trunk/nhibernate/src/NHibernate/Mapping/Join.cs 2011-03-25 17:42:16 UTC (rev 5529) @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; +using System.Linq; using NHibernate.Engine; using NHibernate.SqlCommand; -using NHibernate.Util; namespace NHibernate.Mapping { @@ -90,7 +90,7 @@ pk.Name = PK_ALIAS.ToAliasString(table.Name, dialect); table.PrimaryKey = pk; - pk.AddColumns(new SafetyEnumerable<Column>(Key.ColumnIterator)); + pk.AddColumns(Key.ColumnIterator.OfType<Column>()); } public int PropertySpan @@ -149,13 +149,8 @@ { if (!isLazy.HasValue) { - IEnumerator<Property> iter = PropertyIterator.GetEnumerator(); - while (iter.MoveNext() && !isLazy.HasValue) - { - if (!iter.Current.IsLazy) - isLazy = false; - } - isLazy = true; + var hasAllLazyProperties = !PropertyIterator.Any(property=> property.IsLazy == false); + isLazy = hasAllLazyProperties; } return isLazy.Value; } Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2490/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2490/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2490/Fixture.cs 2011-03-25 17:42:16 UTC (rev 5529) @@ -0,0 +1,50 @@ +using NUnit.Framework; +using SharpTestsEx; + +namespace NHibernate.Test.NHSpecificTest.NH2490 +{ + [TestFixture] + public class Fixture : BugTestCase + { + [Test] + public void BadSqlFromJoinLogicError() + { + try + { + using (ISession s = OpenSession()) + using (ITransaction t = s.BeginTransaction()) + { + Derived item1 = new Derived() + { + ShortContent = "Short", + ShortContent2 = "Short2", + LongContent = "LongLongLongLongLong", + LongContent2 = "LongLongLongLongLong2", + }; + s.Save(item1); + t.Commit(); + } + + // this is the real meat of the test + // for most edifying results, run this with show_sql enabled + + using (ISession s = OpenSession()) + using (ITransaction t = s.BeginTransaction()) + { + var q = s.CreateQuery("from Base"); + q.Executing(query => query.List()).NotThrows(); + } + } + finally + { + using (ISession s = OpenSession()) + using (ITransaction t = s.BeginTransaction()) + { + s.Delete("from Derived"); + t.Commit(); + } + } + } + + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2490/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2490/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2490/Mappings.hbm.xml 2011-03-25 17:42:16 UTC (rev 5529) @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + namespace="NHibernate.Test.NHSpecificTest.NH2490" + assembly="NHibernate.Test" +> + <class name="Base" abstract="true"> + <id name="Id"> + <generator class="increment"/> + </id> + <discriminator column="Discriminator" type="String" /> + <property name="ShortContent" not-null="true"/> + <property name="LongContent" lazy="true" not-null="true"/> + </class> + <subclass name="Derived" extends="Base" discriminator-value="Derived"> + <join table="Derived" fetch="join"> + <key column="Id" /> + <property name="ShortContent2" not-null="true"/> + <property name="LongContent2" lazy="true" not-null="true" /> + </join> + </subclass> +</hibernate-mapping> Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2490/Model.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2490/Model.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2490/Model.cs 2011-03-25 17:42:16 UTC (rev 5529) @@ -0,0 +1,39 @@ + +namespace NHibernate.Test.NHSpecificTest.NH2490 +{ + public class Base + { + public virtual int Id + { + get; + set; + } + + public virtual string ShortContent + { + get; + set; + } + + public virtual string LongContent + { + get; + set; + } + } + + public class Derived : Base + { + public virtual string ShortContent2 + { + get; + set; + } + + public virtual string LongContent2 + { + get; + set; + } + } +} Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2011-03-25 12:01:05 UTC (rev 5528) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2011-03-25 17:42:16 UTC (rev 5529) @@ -654,6 +654,8 @@ <Compile Include="NHSpecificTest\NH2470\DTO.cs" /> <Compile Include="NHSpecificTest\NH2484\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2484\Model.cs" /> + <Compile Include="NHSpecificTest\NH2490\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2490\Model.cs" /> <Compile Include="NHSpecificTest\NH2491\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2507\Animal.cs" /> <Compile Include="NHSpecificTest\NH2507\Fixture.cs" /> @@ -2490,6 +2492,7 @@ <EmbeddedResource Include="NHSpecificTest\NH1291AnonExample\Mappings.hbm.xml" /> </ItemGroup> <ItemGroup> + <EmbeddedResource Include="NHSpecificTest\NH2490\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1925\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2527\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1323\Mappings.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |