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: <dav...@us...> - 2009-03-06 11:54:16
|
Revision: 4118 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4118&view=rev Author: davybrion Date: 2009-03-06 11:54:11 +0000 (Fri, 06 Mar 2009) Log Message: ----------- applying patch from Ivan Goryaev for NH-1695 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/MySQLDialect.cs trunk/nhibernate/src/NHibernate/Dialect/Schema/AbstractDataBaseSchema.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate/Dialect/Schema/MySQLMetaData.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/MySQLDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/MySQLDialect.cs 2009-03-05 13:06:45 UTC (rev 4117) +++ trunk/nhibernate/src/NHibernate/Dialect/MySQLDialect.cs 2009-03-06 11:54:11 UTC (rev 4118) @@ -1,6 +1,8 @@ using System; using System.Data; +using System.Data.Common; using System.Text; +using NHibernate.Dialect.Schema; using NHibernate.SqlCommand; using NHibernate.Util; using Environment=NHibernate.Cfg.Environment; @@ -158,6 +160,11 @@ get { return true; } } + public override IDataBaseSchema GetDataBaseSchema(DbConnection connection) + { + return new MySQLDataBaseSchema(connection); + } + public override bool SupportsSubSelects { get { return false; } Modified: trunk/nhibernate/src/NHibernate/Dialect/Schema/AbstractDataBaseSchema.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Schema/AbstractDataBaseSchema.cs 2009-03-05 13:06:45 UTC (rev 4117) +++ trunk/nhibernate/src/NHibernate/Dialect/Schema/AbstractDataBaseSchema.cs 2009-03-06 11:54:11 UTC (rev 4118) @@ -87,9 +87,14 @@ public virtual DataTable GetForeignKeys(string catalog, string schema, string table) { var restrictions = new[] {catalog, schema, table, null}; - return connection.GetSchema("ForeignKeys", restrictions); + return connection.GetSchema(ForeignKeysSchemaName, restrictions); } + protected virtual string ForeignKeysSchemaName + { + get { return "ForeignKeys"; } + } + #endregion } } \ No newline at end of file Added: trunk/nhibernate/src/NHibernate/Dialect/Schema/MySQLMetaData.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/Schema/MySQLMetaData.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Dialect/Schema/MySQLMetaData.cs 2009-03-06 11:54:11 UTC (rev 4118) @@ -0,0 +1,108 @@ +using System; +using System.Data; +using System.Data.Common; + +namespace NHibernate.Dialect.Schema +{ + public class MySQLDataBaseSchema : AbstractDataBaseSchema + { + public MySQLDataBaseSchema(DbConnection connection) : base(connection) + { + } + + public override ITableMetadata GetTableMetadata(DataRow rs, bool extras) + { + return new MySQLTableMetadata(rs, this, extras); + } + + protected override string ForeignKeysSchemaName + { + get { return "Foreign Keys"; } + } + } + + public class MySQLTableMetadata : AbstractTableMetadata + { + public MySQLTableMetadata(DataRow rs, IDataBaseSchema meta, bool extras) : base(rs, meta, extras) + { + } + + protected override void ParseTableInfo(DataRow rs) + { + Catalog = Convert.ToString(rs["TABLE_CATALOG"]); + Schema = Convert.ToString(rs["TABLE_SCHEMA"]); + if (string.IsNullOrEmpty(Catalog)) Catalog = null; + if (string.IsNullOrEmpty(Schema)) Schema = null; + Name = Convert.ToString(rs["TABLE_NAME"]); + } + + protected override string GetConstraintName(DataRow rs) + { + return Convert.ToString(rs["CONSTRAINT_NAME"]); + } + + protected override string GetColumnName(DataRow rs) + { + return Convert.ToString(rs["COLUMN_NAME"]); + } + + protected override string GetIndexName(DataRow rs) + { + return Convert.ToString(rs["INDEX_NAME"]); + } + + protected override IColumnMetadata GetColumnMetadata(DataRow rs) + { + return new MySQLColumnMetadata(rs); + } + + protected override IForeignKeyMetadata GetForeignKeyMetadata(DataRow rs) + { + return new MySQLForeignKeyMetadata(rs); + } + + protected override IIndexMetadata GetIndexMetadata(DataRow rs) + { + return new MySQLIndexMetadata(rs); + } + } + + public class MySQLColumnMetadata : AbstractColumnMetaData + { + public MySQLColumnMetadata(DataRow rs) + : base(rs) + { + Name = Convert.ToString(rs["COLUMN_NAME"]); + object aValue; + + aValue = rs["CHARACTER_MAXIMUM_LENGTH"]; + if (aValue != DBNull.Value) + ColumnSize = Convert.ToInt32(aValue); + + aValue = rs["NUMERIC_PRECISION"]; + if (aValue != DBNull.Value) + NumericalPrecision = Convert.ToInt32(aValue); + + Nullable = Convert.ToString(rs["IS_NULLABLE"]); + TypeName = Convert.ToString(rs["DATA_TYPE"]); + } + } + + public class MySQLIndexMetadata : AbstractIndexMetadata + { + public MySQLIndexMetadata(DataRow rs) + : base(rs) + { + Name = Convert.ToString(rs["INDEX_NAME"]); + } + } + + public class MySQLForeignKeyMetadata : AbstractForeignKeyMetadata + { + public MySQLForeignKeyMetadata(DataRow rs) + : base(rs) + { + Name = Convert.ToString(rs["CONSTRAINT_NAME"]); + } + } +} Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-03-05 13:06:45 UTC (rev 4117) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-03-06 11:54:11 UTC (rev 4118) @@ -454,6 +454,7 @@ <Compile Include="Dialect\Oracle8iDialect.cs" /> <Compile Include="Dialect\Oracle9iDialect.cs" /> <Compile Include="Dialect\OracleLiteDialect.cs" /> + <Compile Include="Dialect\Schema\MySQLMetaData.cs" /> <Compile Include="Dialect\Schema\SQLiteMetaData.cs" /> <Compile Include="Dialect\Schema\SybaseAnywhereMetaData.cs" /> <Compile Include="Dialect\SybaseASA10Dialect.cs" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-05 13:06:51
|
Revision: 4117 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4117&view=rev Author: fabiomaulo Date: 2009-03-05 13:06:45 +0000 (Thu, 05 Mar 2009) Log Message: ----------- Minor Modified Paths: -------------- trunk/nhibernate/releasenotes.txt Modified: trunk/nhibernate/releasenotes.txt =================================================================== --- trunk/nhibernate/releasenotes.txt 2009-03-05 13:00:03 UTC (rev 4116) +++ trunk/nhibernate/releasenotes.txt 2009-03-05 13:06:45 UTC (rev 4117) @@ -1,4 +1,4 @@ -Build 2.1.0.GA +Build 2.1.0 ======================== ** BREAKING CHANGES from NH2.0.xGA to NH2.1.0 ##### Run time ##### This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-05 13:00:04
|
Revision: 4116 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4116&view=rev Author: fabiomaulo Date: 2009-03-05 13:00:03 +0000 (Thu, 05 Mar 2009) Log Message: ----------- Removed Spring, from compilation process, until we don't have a final release of Spring stuff Modified Paths: -------------- trunk/nhibernate/default.build Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-03-05 12:54:29 UTC (rev 4115) +++ trunk/nhibernate/default.build 2009-03-05 13:00:03 UTC (rev 4116) @@ -30,8 +30,6 @@ <include name="NHibernate.ByteCode.LinFu.Tests/ByteCode.Test.build" /> <include name="NHibernate.ByteCode.Castle/ByteCode.build" /> <include name="NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build" /> - <include name="NHibernate.ByteCode.Spring/ByteCode.build" /> - <include name="NHibernate.ByteCode.Spring.Tests/ByteCode.Test.build" /> <include name="NHibernate.DomainModel/NHibernate.DomainModel.build" /> <include name="NHibernate.Test/NHibernate.Test.build" /> <include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build" /> @@ -43,7 +41,6 @@ <include name="Iesi.Collections.Test/Iesi.Collections.Test.build" /> <include name="NHibernate.ByteCode.LinFu.Tests/ByteCode.Test.build" /> <include name="NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build" /> - <include name="NHibernate.ByteCode.Spring.Tests/ByteCode.Test.build" /> <include name="NHibernate.Test/NHibernate.Test.build" /> <include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build" if="${run.performance.tests}" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-05 12:54:31
|
Revision: 4115 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4115&view=rev Author: fabiomaulo Date: 2009-03-05 12:54:29 +0000 (Thu, 05 Mar 2009) Log Message: ----------- Minor Modified Paths: -------------- trunk/nhibernate/src/NHibernate.ByteCode.Spring/AbstractProxyFactory.cs trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs Modified: trunk/nhibernate/src/NHibernate.ByteCode.Spring/AbstractProxyFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/AbstractProxyFactory.cs 2009-03-05 07:41:21 UTC (rev 4114) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/AbstractProxyFactory.cs 2009-03-05 12:54:29 UTC (rev 4115) @@ -1,5 +1,4 @@ using System.Reflection; -using Common.Logging; using Iesi.Collections.Generic; using NHibernate.Engine; using NHibernate.Proxy; @@ -14,8 +13,6 @@ /// <author>Erich Eichinger (Spring.NET Team)</author> public abstract class AbstractProxyFactory : IProxyFactory { - protected readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - protected string EntityName { get; private set; } protected System.Type PersistentClass { get; private set; } protected System.Type[] Interfaces { get; private set; } Modified: trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs 2009-03-05 07:41:21 UTC (rev 4114) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs 2009-03-05 12:54:29 UTC (rev 4115) @@ -1,4 +1,5 @@ using System; +using Common.Logging; using NHibernate.Engine; using NHibernate.Proxy; @@ -12,6 +13,8 @@ /// <author>Erich Eichinger (Spring.NET Team)</author> public class ProxyFactory : AbstractProxyFactory { + private static readonly ILog log = LogManager.GetLogger(typeof(ProxyFactory)); + [Serializable] private class SerializableProxyFactory : global::Spring.Aop.Framework.ProxyFactory { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-03-05 07:41:26
|
Revision: 4114 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4114&view=rev Author: tehlike Date: 2009-03-05 07:41:21 +0000 (Thu, 05 Mar 2009) Log Message: ----------- Marking some classes as serializable. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Type/ForeignKeyDirection.cs trunk/nhibernate/src/NHibernate/Type/PersistentEnumType.cs Modified: trunk/nhibernate/src/NHibernate/Type/ForeignKeyDirection.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Type/ForeignKeyDirection.cs 2009-03-05 03:42:17 UTC (rev 4113) +++ trunk/nhibernate/src/NHibernate/Type/ForeignKeyDirection.cs 2009-03-05 07:41:21 UTC (rev 4114) @@ -2,16 +2,19 @@ namespace NHibernate.Type { + using System; + /// <summary> /// Represents directionality of the foreign key constraint /// </summary> + [Serializable] public abstract class ForeignKeyDirection { /// <summary></summary> protected ForeignKeyDirection() { } - + [Serializable] private class ForeignKeyToParentClass : ForeignKeyDirection { public override bool CascadeNow(CascadePoint cascadePoint) @@ -19,7 +22,7 @@ return cascadePoint != CascadePoint.BeforeInsertAfterDelete; } } - + [Serializable] private class ForeignKeyFromParentClass : ForeignKeyDirection { public override bool CascadeNow(CascadePoint cascadePoint) Modified: trunk/nhibernate/src/NHibernate/Type/PersistentEnumType.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Type/PersistentEnumType.cs 2009-03-05 03:42:17 UTC (rev 4113) +++ trunk/nhibernate/src/NHibernate/Type/PersistentEnumType.cs 2009-03-05 07:41:21 UTC (rev 4114) @@ -6,6 +6,8 @@ namespace NHibernate.Type { + using System.Runtime.Serialization; + /// <summary> /// PersistentEnumType /// </summary> @@ -23,7 +25,7 @@ object ToEnumValue(object value); SqlType SqlType { get; } } - + [Serializable] private abstract class AbstractEnumConverter<T> : IEnumConverter { public object ToObject(System.Type enumClass, object code) @@ -39,7 +41,7 @@ public abstract T Convert(object input); public abstract SqlType SqlType { get; } } - + [Serializable] private class SystemByteEnumConverter : AbstractEnumConverter<Byte> { public override byte Convert(object input) @@ -52,7 +54,7 @@ get { return SqlTypeFactory.Byte; } } } - + [Serializable] private class SystemSByteEnumConverter : AbstractEnumConverter<SByte> { public override sbyte Convert(object input) @@ -65,7 +67,7 @@ get { return SqlTypeFactory.SByte; } } } - + [Serializable] private class SystemInt16EnumConverter : AbstractEnumConverter<Int16> { public override short Convert(object input) @@ -78,7 +80,7 @@ get { return SqlTypeFactory.Int16; } } } - + [Serializable] private class SystemInt32EnumConverter : AbstractEnumConverter<Int32> { public override int Convert(object input) @@ -91,7 +93,7 @@ get { return SqlTypeFactory.Int32; } } } - + [Serializable] private class SystemInt64EnumConverter : AbstractEnumConverter<Int64> { public override long Convert(object input) @@ -104,7 +106,7 @@ get { return SqlTypeFactory.Int64; } } } - + [Serializable] private class SystemUInt16EnumConverter : AbstractEnumConverter<UInt16> { public override ushort Convert(object input) @@ -117,7 +119,7 @@ get { return SqlTypeFactory.UInt16; } } } - + [Serializable] private class SystemUInt32EnumConverter : AbstractEnumConverter<UInt32> { public override uint Convert(object input) @@ -130,7 +132,7 @@ get { return SqlTypeFactory.UInt32; } } } - + [Serializable] private class SystemUInt64EnumConverter : AbstractEnumConverter<UInt64> { public override ulong Convert(object input) @@ -158,7 +160,6 @@ converters.Add(typeof (UInt32), new SystemUInt32EnumConverter()); converters.Add(typeof (UInt64), new SystemUInt64EnumConverter()); } - private static readonly Dictionary<System.Type, IEnumConverter> converters; private readonly IEnumConverter converter; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-05 03:42:26
|
Revision: 4113 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4113&view=rev Author: fabiomaulo Date: 2009-03-05 03:42:17 +0000 (Thu, 05 Mar 2009) Log Message: ----------- Minor Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Classic/ValidatableFixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/Classic/ValidatableFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Classic/ValidatableFixture.cs 2009-03-04 21:13:53 UTC (rev 4112) +++ trunk/nhibernate/src/NHibernate.Test/Classic/ValidatableFixture.cs 2009-03-05 03:42:17 UTC (rev 4113) @@ -95,6 +95,55 @@ } [Test] + public void SaveOrUpdateCopy() + { + Video v = new Video("Shinobi", 10, 10); + using (ISession s = OpenSession()) + { + s.Save(v); + s.Flush(); + } + v.Heigth = 0; + try + { + using (ISession s = OpenSession()) + { + s.SaveOrUpdateCopy(v); + s.Flush(); + } + Assert.Fail("Updated an invalid entity"); + } + catch (ValidationFailure) + { + // Ok + } + + Video v1 = new Video("Shinobi", 0, 10); + try + { + using (ISession s = OpenSession()) + { + s.SaveOrUpdateCopy(v1); + s.Flush(); + } + Assert.Fail("saved an invalid entity"); + } + catch (ValidationFailure) + { + // Ok + } + + + // cleanup + using (ISession s = OpenSession()) + using (ITransaction tx = s.BeginTransaction()) + { + s.Delete("from Video"); + tx.Commit(); + } + } + + [Test] public void Delete() { Video v = new Video("Shinobi", 10, 10); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-04 21:13:54
|
Revision: 4112 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4112&view=rev Author: fabiomaulo Date: 2009-03-04 21:13:53 +0000 (Wed, 04 Mar 2009) Log Message: ----------- Reverted target fw to .NET2.0 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/NHibernate.csproj Property Changed: ---------------- trunk/nhibernate/src/NHibernate/ Property changes on: trunk/nhibernate/src/NHibernate ___________________________________________________________________ Modified: svn:ignore - obj .#* *.user *.xsx AssemblyInfo.cs *.aps *.eto [Bb]in [Dd]ebug [Rr]elease + obj .#* *.user *.xsx AssemblyInfo.cs *.aps *.eto [Bb]in [Dd]ebug [Rr]elease *resharper* Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-03-04 19:34:04 UTC (rev 4111) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2009-03-04 21:13:53 UTC (rev 4112) @@ -14,7 +14,9 @@ <OldToolsVersion>2.0</OldToolsVersion> <UpgradeBackupLocation> </UpgradeBackupLocation> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + <TargetFrameworkSubset> + </TargetFrameworkSubset> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -51,9 +53,6 @@ </Reference> <Reference Include="System" /> <Reference Include="System.configuration" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> <Reference Include="System.Data" /> <Reference Include="System.Data.OracleClient" /> <Reference Include="System.Transactions" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-04 19:34:07
|
Revision: 4111 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4111&view=rev Author: fabiomaulo Date: 2009-03-04 19:34:04 +0000 (Wed, 04 Mar 2009) Log Message: ----------- User Example for NH-1685 Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/BinaryTimestamp.cs Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/ComplexDomain.cs trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/ComplexDomainFixture.cs trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/ComplexVersioned.hbm.xml Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-04 18:47:03 UTC (rev 4110) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-04 19:34:04 UTC (rev 4111) @@ -1113,6 +1113,8 @@ <Compile Include="UtilityTest\TypeNameParserFixture.cs" /> <Compile Include="UtilityTest\WeakHashtableFixture.cs" /> <Compile Include="VersionTest\Db\MsSQL\BinaryTimestamp.cs" /> + <Compile Include="VersionTest\Db\MsSQL\ComplexDomain.cs" /> + <Compile Include="VersionTest\Db\MsSQL\ComplexDomainFixture.cs" /> <Compile Include="VersionTest\Db\MsSQL\GeneratedBinaryVersionFixture.cs" /> <Compile Include="VersionTest\Db\MsSQL\SimpleVersioned.cs" /> <Compile Include="VersionTest\Person.cs" /> @@ -1672,6 +1674,7 @@ <EmbeddedResource Include="Cascade\JobBatch.hbm.xml" /> <EmbeddedResource Include="Deletetransient\Person.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="VersionTest\Db\MsSQL\ComplexVersioned.hbm.xml" /> <EmbeddedResource Include="Tools\hbm2ddl\SchemaExportTests\WithColumnTag.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1691\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1689\Mappings.hbm.xml" /> Modified: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/BinaryTimestamp.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/BinaryTimestamp.cs 2009-03-04 18:47:03 UTC (rev 4110) +++ trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/BinaryTimestamp.cs 2009-03-04 19:34:04 UTC (rev 4111) @@ -73,21 +73,33 @@ { var xbytes = (byte[]) x; var ybytes = (byte[]) y; - if (xbytes.Length < ybytes.Length) + return CompareValues(xbytes, ybytes); + } + + bool IUserType.Equals(object x, object y) + { + return (x == y); + } + + #endregion + + private static int CompareValues(byte[] x, byte[] y) + { + if (x.Length < y.Length) { return -1; } - if (xbytes.Length > ybytes.Length) + if (x.Length > y.Length) { return 1; } - for (int i = 0; i < xbytes.Length; i++) + for (int i = 0; i < x.Length; i++) { - if (xbytes[i] < ybytes[i]) + if (x[i] < y[i]) { return -1; } - if (xbytes[i] > ybytes[i]) + if (x[i] > y[i]) { return 1; } @@ -95,11 +107,9 @@ return 0; } - bool IUserType.Equals(object x, object y) + public static bool Equals(byte[] x, byte[] y) { - return (x == y); + return CompareValues(x, y) == 0; } - - #endregion } } \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/ComplexDomain.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/ComplexDomain.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/ComplexDomain.cs 2009-03-04 19:34:04 UTC (rev 4111) @@ -0,0 +1,30 @@ +using Iesi.Collections.Generic; + +namespace NHibernate.Test.VersionTest.Db.MsSQL +{ + public class Bar + { + public virtual int Id { get; set; } + public virtual byte[] Timestamp { get; private set; } + public virtual int AField { get; set; } + public virtual Foo Foo { get; set; } + } + + public class Foo + { + public Foo() + { + Bars = new HashedSet<Bar>(); + } + public virtual int Id { get; set; } + public virtual byte[] Timestamp { get; private set; } + public virtual int AField { get; set; } + public virtual ISet<Bar> Bars { get; set; } + + public virtual void AddBar(Bar bar) + { + bar.Foo = this; + Bars.Add(bar); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/ComplexDomainFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/ComplexDomainFixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/ComplexDomainFixture.cs 2009-03-04 19:34:04 UTC (rev 4111) @@ -0,0 +1,63 @@ +using System.Collections; +using NHibernate.Dialect; +using NUnit.Framework; + +namespace NHibernate.Test.VersionTest.Db.MsSQL +{ + [TestFixture] + public class ComplexDomainFixture : TestCase + { + protected override IList Mappings + { + get { return new[] { "VersionTest.Db.MsSQL.ComplexVersioned.hbm.xml" }; } + } + + protected override string MappingsAssembly + { + get { return "NHibernate.Test"; } + } + + protected override bool AppliesTo(Dialect.Dialect dialect) + { + return dialect is MsSql2000Dialect; + } + + [Test] + public void NH1685() + { + using (ISession session = OpenSession()) + { + var bar = new Bar {AField = 24}; + + var foo = new Foo {AField = 42}; + foo.AddBar(bar); + + session.Save(foo); + session.Flush(); + session.Evict(bar); + session.Evict(foo); + + var retrievedBar = session.Get<Bar>(bar.Id); + + // At this point the assumption is that bar and retrievedBar should have + // identical values, but represent two different POCOs. The asserts below + // are intended to verify this. Currently this test fails on the comparison + // of the SQL Server timestamp (i.e. binary(8)) fields because + // NHibernate does not retrieve the new timestamp after the last update. + + Assert.AreNotSame(bar, retrievedBar); + Assert.AreEqual(bar.Id, retrievedBar.Id); + Assert.AreEqual(bar.AField, retrievedBar.AField); + Assert.AreEqual(bar.Foo.Id, retrievedBar.Foo.Id); + Assert.IsTrue(BinaryTimestamp.Equals(bar.Timestamp, retrievedBar.Timestamp), "Timestamps are different!"); + } + + using (ISession session = OpenSession()) + { + session.BeginTransaction(); + session.Delete("from Bar"); + session.Transaction.Commit(); + } + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/ComplexVersioned.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/ComplexVersioned.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/ComplexVersioned.hbm.xml 2009-03-04 19:34:04 UTC (rev 4111) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + default-cascade="save-update" + auto-import="true" + assembly="NHibernate.Test" + namespace="NHibernate.Test.VersionTest.Db.MsSQL"> + + <typedef name="ByteTimestamp" + class="NHibernate.Test.VersionTest.Db.MsSQL.BinaryTimestamp, NHibernate.Test"/> + + <class name="Bar" table="Bar" optimistic-lock="version"> + <id name="Id"> + <generator class="identity" /> + </id> + <version name="Timestamp" type="ByteTimestamp" generated="always" unsaved-value="null" access="backfield"> + <column name="LastModified" not-null="false" sql-type="timestamp"/> + </version> + <property name="AField"/> + <many-to-one name="Foo" column="FooID" cascade="all" class="Foo" not-null="true" /> + </class> + + <class name="Foo" table="Foo" optimistic-lock="version"> + <id name="Id"> + <generator class="identity" /> + </id> + <version name="Timestamp" type="ByteTimestamp" generated="always" unsaved-value="null" access="backfield"> + <column name="LastModified" not-null="false" sql-type="timestamp"/> + </version> + <property name="AField"/> + <set name="Bars" cascade="all" access="backfield" inverse="true"> + <key column="FooID" /> + <one-to-many class="Bar" /> + </set> + </class> +</hibernate-mapping> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-04 18:47:07
|
Revision: 4110 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4110&view=rev Author: fabiomaulo Date: 2009-03-04 18:47:03 +0000 (Wed, 04 Mar 2009) Log Message: ----------- Fix of NH-1687 and NH-1685 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/RootClassBinder.cs trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/GeneratedBinaryVersionFixture.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs 2009-03-04 16:45:01 UTC (rev 4109) +++ trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs 2009-03-04 18:47:03 UTC (rev 4110) @@ -1297,8 +1297,10 @@ } } - protected static void BindColumn(HbmColumn columnSchema, Column column, bool isNullable) + protected void BindColumn(HbmColumn columnSchema, Column column, bool isNullable) { + column.Name = mappings.NamingStrategy.ColumnName(columnSchema.name); + if (columnSchema.length != null) column.Length = int.Parse(columnSchema.length); if (columnSchema.scale != null) Modified: trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/RootClassBinder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/RootClassBinder.cs 2009-03-04 16:45:01 UTC (rev 4109) +++ trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/RootClassBinder.cs 2009-03-04 18:47:03 UTC (rev 4110) @@ -213,11 +213,9 @@ private void BindColumns(HbmVersion versionSchema, SimpleValue model, bool isNullable, string propertyPath) { Table table = model.Table; - if (versionSchema.column1 != null) { - Column col = new Column(); - col.Value = model; + var col = new Column {Value = model}; BindColumn(col, isNullable); col.Name = mappings.NamingStrategy.ColumnName(versionSchema.column1); @@ -226,11 +224,22 @@ model.AddColumn(col); } + else if (versionSchema.column != null) + { + foreach (HbmColumn hbmColumn in versionSchema.column) + { + var col = new Column {Value = model}; + BindColumn(hbmColumn, col, isNullable); + if (table != null) + table.AddColumn(col); + model.AddColumn(col); + } + } + if (model.ColumnSpan == 0) { - Column col = new Column(); - col.Value = model; + var col = new Column {Value = model}; BindColumn(col, isNullable); col.Name = mappings.NamingStrategy.PropertyToColumnName(propertyPath); model.Table.AddColumn(col); Modified: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/GeneratedBinaryVersionFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/GeneratedBinaryVersionFixture.cs 2009-03-04 16:45:01 UTC (rev 4109) +++ trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/GeneratedBinaryVersionFixture.cs 2009-03-04 18:47:03 UTC (rev 4110) @@ -7,7 +7,7 @@ { // related issues NH-1687, NH-1685 - [TestFixture, Ignore("Not fixed yet.")] + [TestFixture] public class GeneratedBinaryVersionFixture : TestCase { protected override IList Mappings @@ -28,6 +28,8 @@ [Test] public void ShouldRetrieveVersionAfterFlush() { + // Note : if you are using identity-style strategy the value of version + // is available inmediately after save. var e = new SimpleVersioned {Something = "something"}; using (ISession s = OpenSession()) { @@ -42,5 +44,78 @@ } } } + + [Test] + public void ShouldChangeAfterUpdate() + { + object savedId = PersistANewSomething(); + using (ISession s = OpenSession()) + { + using (ITransaction tx = s.BeginTransaction()) + { + var fetched = s.Get<SimpleVersioned>(savedId); + var freshVersion = fetched.LastModified; + fetched.Something = "make it dirty"; + s.Update(fetched); + s.Flush(); // force flush to hit DB + Assert.That(fetched.LastModified, Is.Not.SameAs(freshVersion)); + s.Delete(fetched); + tx.Commit(); + } + } + } + + private object PersistANewSomething() + { + object savedId; + using (ISession s = OpenSession()) + { + using (ITransaction tx = s.BeginTransaction()) + { + var e = new SimpleVersioned {Something = "something"}; + savedId = s.Save(e); + tx.Commit(); + } + } + return savedId; + } + + [Test] + public void ShouldCheckStaleState() + { + var versioned = new SimpleVersioned {Something = "original string"}; + + try + { + using (ISession session = OpenSession()) + { + session.Save(versioned); + session.Flush(); + + using (ISession concurrentSession = OpenSession()) + { + var sameVersioned = concurrentSession.Get<SimpleVersioned>(versioned.Id); + sameVersioned.Something = "another string"; + concurrentSession.Flush(); + } + + versioned.Something = "new string"; + session.Flush(); + } + Assert.Fail("Expected exception was not thrown"); + } + catch (StaleObjectStateException) + { + // as expected + } + finally + { + using (ISession session = OpenSession()) + { + session.Delete("from SimpleVersioned"); + session.Flush(); + } + } + } } } \ 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...> - 2009-03-04 16:45:09
|
Revision: 4109 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4109&view=rev Author: fabiomaulo Date: 2009-03-04 16:45:01 +0000 (Wed, 04 Mar 2009) Log Message: ----------- Fix NH-1416 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/ trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTag.cs trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTag.hbm.xml trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs 2009-03-04 04:39:58 UTC (rev 4108) +++ trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs 2009-03-04 16:45:01 UTC (rev 4109) @@ -1075,6 +1075,12 @@ XmlAttribute lengthNode = node.Attributes["length"]; if (lengthNode != null) model.Length = int.Parse(lengthNode.Value); + XmlAttribute scaleNode = node.Attributes["scale"]; + if (scaleNode != null) + model.Scale = int.Parse(scaleNode.Value); + XmlAttribute precNode = node.Attributes["precision"]; + if (precNode != null) + model.Precision = int.Parse(precNode.Value); XmlAttribute nullNode = node.Attributes["not-null"]; model.IsNullable = (nullNode != null) ? !StringHelper.BooleanValue(nullNode.Value) : isNullable; @@ -1087,6 +1093,9 @@ XmlAttribute typeNode = node.Attributes["sql-type"]; model.SqlType = (typeNode == null) ? null : typeNode.Value; + + XmlAttribute defaAttribute = node.Attributes["default"]; + model.DefaultValue = (defaAttribute == null) ? null : defaAttribute.Value; } protected static void BindIndex(XmlAttribute indexAttribute, Table table, Column column) @@ -1292,11 +1301,18 @@ { if (columnSchema.length != null) column.Length = int.Parse(columnSchema.length); + if (columnSchema.scale != null) + column.Scale = int.Parse(columnSchema.scale); + if (columnSchema.precision != null) + column.Precision = int.Parse(columnSchema.precision); column.IsNullable = columnSchema.notnullSpecified ? !columnSchema.notnull : isNullable; column.IsUnique = columnSchema.uniqueSpecified && columnSchema.unique; column.CheckConstraint = columnSchema.check ?? string.Empty; column.SqlType = columnSchema.sqltype; + column.DefaultValue = columnSchema.@default; + if (columnSchema.comment != null) + column.Comment = string.Concat(columnSchema.comment.Text).Trim(); } } } Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-04 04:39:58 UTC (rev 4108) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-04 16:45:01 UTC (rev 4109) @@ -944,6 +944,8 @@ <Compile Include="SqlTest\Custom\CustomStoredProcSupportTest.cs" /> <Compile Include="SqlTest\Custom\MySQL\MySQLTest.cs" /> <Compile Include="SqlTest\Custom\Oracle\OracleCustomSQLFixture.cs" /> + <Compile Include="Tools\hbm2ddl\SchemaExportTests\WithColumnTag.cs" /> + <Compile Include="Tools\hbm2ddl\SchemaExportTests\WithColumnTagFixture.cs" /> <Compile Include="Tools\hbm2ddl\SchemaUpdate\MigrationFixture.cs" /> <Compile Include="Tools\hbm2ddl\SchemaUpdate\Version.cs" /> <Compile Include="SecondLevelCacheTest\AnotherItem.cs" /> @@ -1670,6 +1672,7 @@ <EmbeddedResource Include="Cascade\JobBatch.hbm.xml" /> <EmbeddedResource Include="Deletetransient\Person.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="Tools\hbm2ddl\SchemaExportTests\WithColumnTag.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1691\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1689\Mappings.hbm.xml" /> <EmbeddedResource Include="VersionTest\Db\MsSQL\SimpleVersioned.hbm.xml" /> Property changes on: trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests ___________________________________________________________________ Added: svn:mergeinfo + Added: trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTag.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTag.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTag.cs 2009-03-04 16:45:01 UTC (rev 4109) @@ -0,0 +1,8 @@ +namespace NHibernate.Test.Tools.hbm2ddl.SchemaExportTests +{ + public class WithColumnTag + { + public string WithServerFuction { get; set; } + public int WithSimpleValue { get; set; } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTag.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTag.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTag.hbm.xml 2009-03-04 16:45:01 UTC (rev 4109) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + namespace="NHibernate.Test.Tools.hbm2ddl.SchemaExportTests" + assembly="NHibernate.Test"> + + <class name="WithColumnTag"> + <id type="int"/> + <property name="WithServerFuction"> + <column name="created_by" length="50" default="SYSTEM_USER"/> + </property> + <property name="WithSimpleValue"> + <column name="my_value" default="77"/> + </property> + </class> + +</hibernate-mapping> \ No newline at end of file Property changes on: trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTag.hbm.xml ___________________________________________________________________ Added: svn:mergeinfo + Added: trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs 2009-03-04 16:45:01 UTC (rev 4109) @@ -0,0 +1,30 @@ +using System.IO; +using System.Reflection; +using System.Text; +using NHibernate.Cfg; +using NHibernate.Tool.hbm2ddl; +using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; + +namespace NHibernate.Test.Tools.hbm2ddl.SchemaExportTests +{ + [TestFixture] + public class WithColumnTagFixture + { + [Test] + public void ShouldCreateSchemaWithDefaultClause() + { + var script = new StringBuilder(); + const string mapping = "NHibernate.Test.Tools.hbm2ddl.SchemaExportTests.WithColumnTag.hbm.xml"; + + Configuration cfg = TestConfigurationHelper.GetDefaultConfiguration(); + using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(mapping)) + cfg.AddInputStream(stream); + new SchemaExport(cfg).Execute(s => script.AppendLine(s), false, false, false); + + string wholeScript = script.ToString(); + Assert.That(wholeScript, Text.Contains("default SYSTEM_USER")); + Assert.That(wholeScript, Text.Contains("default 77")); + } + } +} \ 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...> - 2009-03-04 04:39:59
|
Revision: 4108 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4108&view=rev Author: fabiomaulo Date: 2009-03-04 04:39:58 +0000 (Wed, 04 Mar 2009) Log Message: ----------- ByteCode provider of Spring.NET: 7 test to full support Modified Paths: -------------- trunk/nhibernate/src/NHibernate.ByteCode.Spring/LazyInitializer.cs trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs Modified: trunk/nhibernate/src/NHibernate.ByteCode.Spring/LazyInitializer.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/LazyInitializer.cs 2009-03-03 20:02:23 UTC (rev 4107) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/LazyInitializer.cs 2009-03-04 04:39:58 UTC (rev 4108) @@ -12,8 +12,6 @@ [Serializable] public class LazyInitializer : BasicLazyInitializer, IMethodInterceptor, ITargetSource { - private static readonly object NULL = new object(); - private static readonly MethodInfo exceptionInternalPreserveStackTrace = typeof (Exception).GetMethod("InternalPreserveStackTrace", BindingFlags.Instance | BindingFlags.NonPublic); @@ -51,7 +49,8 @@ object returnValue; try { - returnValue = base.Invoke(info.Method, info.Arguments, info.Target); + var methodInfo = info.Method; + returnValue = base.Invoke(methodInfo, info.Arguments, info.Proxy); if (returnValue != InvokeImplementation) { @@ -59,7 +58,7 @@ } if (InterceptCalls) { - var method = new SafeMethod(info.Method); + var method = new SafeMethod(methodInfo); return method.Invoke(GetImplementation(), info.Arguments); } } @@ -78,11 +77,7 @@ object ITargetSource.GetTarget() { - if (!IsUninitialized) - { - return Target; - } - return NULL; + return Target ?? this; } void ITargetSource.ReleaseTarget(object target) Modified: trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs 2009-03-03 20:02:23 UTC (rev 4107) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs 2009-03-04 04:39:58 UTC (rev 4108) @@ -31,10 +31,8 @@ var initializer = new LazyInitializer(EntityName, PersistentClass, id, GetIdentifierMethod, SetIdentifierMethod, ComponentIdType, session); - var proxyFactory = new SerializableProxyFactory(); - proxyFactory.Interfaces = Interfaces; - proxyFactory.TargetSource = initializer; - proxyFactory.ProxyTargetType = IsClassProxy; + var proxyFactory = new SerializableProxyFactory + {Interfaces = Interfaces, TargetSource = initializer, ProxyTargetType = IsClassProxy}; proxyFactory.AddAdvice(initializer); object proxyInstance = proxyFactory.GetProxy(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-03 20:02:26
|
Revision: 4107 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4107&view=rev Author: fabiomaulo Date: 2009-03-03 20:02:23 +0000 (Tue, 03 Mar 2009) Log Message: ----------- Libs for ByteCode provider of Spring.NET (sorry) Added Paths: ----------- trunk/nhibernate/lib/net/3.5/Common.Logging.dll trunk/nhibernate/lib/net/3.5/Spring.Aop.dll trunk/nhibernate/lib/net/3.5/Spring.Aop.xml trunk/nhibernate/lib/net/3.5/Spring.Core.dll trunk/nhibernate/lib/net/3.5/Spring.Core.xml trunk/nhibernate/lib/net/3.5/antlr.runtime.dll Added: trunk/nhibernate/lib/net/3.5/Common.Logging.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/lib/net/3.5/Common.Logging.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/lib/net/3.5/Spring.Aop.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/lib/net/3.5/Spring.Aop.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/lib/net/3.5/Spring.Aop.xml =================================================================== --- trunk/nhibernate/lib/net/3.5/Spring.Aop.xml (rev 0) +++ trunk/nhibernate/lib/net/3.5/Spring.Aop.xml 2009-03-03 20:02:23 UTC (rev 4107) @@ -0,0 +1,11225 @@ +<?xml version="1.0"?> +<doc> + <assembly> + <name>Spring.Aop</name> + </assembly> + <members> + <member name="T:Spring.Aop.Target.AbstractPoolingTargetSource"> + <summary> + Abstract superclass for pooling <see cref="T:Spring.Aop.ITargetSource"/>s. + </summary> + <remarks> + <p> + Maintains a pool of target instances, acquiring and releasing a target + object from the pool for each method invocation. + </p> + <p> + This class is independent of pooling technology. + </p> + <p> + Subclasses must implement the + <see cref="M:Spring.Aop.Target.AbstractPoolingTargetSource.GetTarget"/> and + <see cref="M:Spring.Aop.Target.AbstractPoolingTargetSource.ReleaseTarget(System.Object)"/> + methods to work with their chosen pool. The + <see cref="M:Spring.Aop.Target.AbstractPrototypeTargetSource.NewPrototypeInstance"/> + method inherited from the + <see cref="T:Spring.Aop.Target.AbstractPrototypeTargetSource"/> base class + can be used to create objects to put in the pool. Subclasses must also + implement some of the monitoring methods from the + <see cref="T:Spring.Aop.Target.PoolingConfig"/> interface. This class + provides the + <see cref="M:Spring.Aop.Target.AbstractPoolingTargetSource.GetPoolingConfigMixin"/> + method to return an <see cref="T:Spring.Aop.IIntroductionAdvisor"/> + making these statistics available on proxied objects. + </p> + <p> + This class implements the <see cref="T:System.IDisposable"/> interface in + order to force subclasses to implement the + <see cref="M:System.IDisposable.Dispose"/> method to cleanup and close + down their pool. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Federico Spinazzi (.NET)</author> + </member> + <member name="T:Spring.Aop.Target.AbstractPrototypeTargetSource"> + <summary> + Base class for dynamic <see cref="T:Spring.Aop.ITargetSource"/> + implementations that can create new prototype object instances to + support a pooling or new-instance-per-invocation strategy. + </summary> + <remarks> + <p> + All such <see cref="T:Spring.Aop.ITargetSource"/>s must run in an + <see cref="T:Spring.Objects.Factory.IObjectFactory"/>, as they need to + call the <see cref="M:Spring.Objects.Factory.IObjectFactory.GetObject(System.String)"/> + method to create a new prototype instance. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Federico Spinazzi (.NET)</author> + </member> + <member name="T:Spring.Aop.ITargetSource"> + <summary> + Used to obtain the current "target" of an AOP invocation + </summary> + <remarks> + <p> + This target will be invoked via reflection if no around advice chooses + to end the interceptor chain itself. + </p> + <p> + If an <see cref="T:Spring.Aop.ITargetSource"/> is <c>"static"</c>, it + will always return the same target, allowing optimizations in the AOP + framework. Dynamic target sources can support pooling, hot swapping etc. + </p> + <p> + Application developers don't usually need to work with target sources + directly: this is an AOP framework interface. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> + </member> + <member name="M:Spring.Aop.ITargetSource.GetTarget"> + <summary> + Returns the target object. + </summary> + <returns>The target object.</returns> + <exception cref="T:System.Exception"> + If unable to obtain the target object. + </exception> + </member> + <member name="M:Spring.Aop.ITargetSource.ReleaseTarget(System.Object)"> + <summary> + Releases the target object. + </summary> + <param name="target">The target object to release.</param> + </member> + <member name="P:Spring.Aop.ITargetSource.TargetType"> + <summary> + The <see cref="T:System.Type"/> of the target object. + </summary> + </member> + <member name="P:Spring.Aop.ITargetSource.IsStatic"> + <summary> + Is the target source static? + </summary> + <value> + <see langword="true"/> if the target source is static. + </value> + </member> + <member name="M:Spring.Aop.Target.AbstractPrototypeTargetSource.#ctor"> + <summary> + Creates a new instance of the + <see cref="T:Spring.Aop.Target.AbstractPrototypeTargetSource"/> + class. + </summary> + <remarks> + <p> + This is an <see langword="abstract"/> class, and as such exposes no + public constructors. + </p> + </remarks> + </member> + <member name="M:Spring.Aop.Target.AbstractPrototypeTargetSource.NewPrototypeInstance"> + <summary> + Subclasses should use this method to create a new prototype instance. + </summary> + </member> + <member name="M:Spring.Aop.Target.AbstractPrototypeTargetSource.GetTarget"> + <summary> + Returns the target object. + </summary> + <returns>The target object.</returns> + <exception cref="T:System.Exception"> + If unable to obtain the target object. + </exception> + </member> + <member name="M:Spring.Aop.Target.AbstractPrototypeTargetSource.ReleaseTarget(System.Object)"> + <summary> + Releases the target object. + </summary> + <param name="target">The target object to release.</param> + </member> + <member name="M:Spring.Aop.Target.AbstractPrototypeTargetSource.AfterPropertiesSet"> + <summary> + Invoked by an <see cref="T:Spring.Objects.Factory.IObjectFactory"/> + after it has set all object properties supplied + (and satisfied the + <see cref="T:Spring.Objects.Factory.IObjectFactoryAware"/> + and <see cref="T:Spring.Context.IApplicationContextAware"/> + interfaces). + </summary> + <remarks> + <p> + Ensures that the <see cref="P:Spring.Aop.Target.AbstractPrototypeTargetSource.TargetObjectName"/> property has been + set to a valid value (i.e. is not <see langword="null"/> or a string + that consists solely of whitespace). + </p> + </remarks> + <exception cref="T:System.Exception"> + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + </exception> + <seealso cref="M:Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/> + </member> + <member name="F:Spring.Aop.Target.AbstractPrototypeTargetSource.logger"> + <summary> + The shared <see cref="T:Common.Logging.ILog"/> instance for this class (and derived classes). + </summary> + </member> + <member name="P:Spring.Aop.Target.AbstractPrototypeTargetSource.TargetObjectName"> + <summary> + The name of the target object to be created on each invocation. + </summary> + <remarks> + <p> + This object should be a prototype, or the same instance will always + be obtained from the owning <see cref="P:Spring.Aop.Target.AbstractPrototypeTargetSource.ObjectFactory"/>. + </p> + </remarks> + </member> + <member name="P:Spring.Aop.Target.AbstractPrototypeTargetSource.TargetType"> + <summary> + The <see cref="T:System.Type"/> of the target object. + </summary> + </member> + <member name="P:Spring.Aop.Target.AbstractPrototypeTargetSource.IsStatic"> + <summary> + Is the target source static? + </summary> + <value> + <see langword="true"/> if the target source is static. + </value> + </member> + <member name="P:Spring.Aop.Target.AbstractPrototypeTargetSource.ObjectFactory"> + <summary> + The target factory that will be used to perform the lookup + of the object referred to by the <see cref="P:Spring.Aop.Target.AbstractPrototypeTargetSource.TargetObjectName"/> + property. + </summary> + <remarks> + <p> + Needed so that prototype instances can be created as necessary. + </p> + </remarks> + <value> + The owning <see cref="T:Spring.Objects.Factory.IObjectFactory"/> + (will never be <see langword="null"/>). + </value> + <exception cref="T:Spring.Objects.ObjectsException"> + In case of initialization errors. + </exception> + <seealso cref="P:Spring.Objects.Factory.IObjectFactoryAware.ObjectFactory"/> + </member> + <member name="T:Spring.Aop.Target.PoolingConfig"> + <summary> + Configuration interface for a pooling invoker. + </summary> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> + </member> + <member name="P:Spring.Aop.Target.PoolingConfig.Active"> + <summary> + The number of active object instances in a pool. + </summary> + </member> + <member name="P:Spring.Aop.Target.PoolingConfig.Free"> + <summary> + The number of free object instances in a pool. + </summary> + </member> + <member name="P:Spring.Aop.Target.PoolingConfig.MaxSize"> + <summary> + The maximum number of object instances in a pool. + </summary> + </member> + <member name="T:AopAlliance.Aop.IAdvice"> + <summary> + Tag interface for advice. + </summary> + <remarks> + <p> + Implementations can be any type of advice, such as interceptors. + </p> + </remarks> + </member> + <member name="M:Spring.Aop.Target.AbstractPoolingTargetSource.#ctor"> + <summary> + Creates a new instance of the + <see cref="T:Spring.Aop.Target.AbstractPoolingTargetSource"/> + class. + </summary> + <remarks> + <p> + This is an <see langword="abstract"/> class, and as such exposes no + public constructors. + </p> + </remarks> + </member> + <member name="M:Spring.Aop.Target.AbstractPoolingTargetSource.GetTarget"> + <summary> + Returns the target object (acquired from the pool). + </summary> + <returns>The target object (acquired from the pool).</returns> + <exception cref="T:System.Exception"> + If unable to obtain the target object. + </exception> + </member> + <member name="M:Spring.Aop.Target.AbstractPoolingTargetSource.GetPoolingConfigMixin"> + <summary> + Gets the <see cref="T:Spring.Aop.Target.PoolingConfig"/> mixin. + </summary> + <returns> + An <see cref="T:Spring.Aop.IIntroductionAdvisor"/> exposing statistics + about the pool maintained by this object. + </returns> + </member> + <member name="M:Spring.Aop.Target.AbstractPoolingTargetSource.CreatePool(Spring.Objects.Factory.IObjectFactory)"> + <summary> + Create the pool. + </summary> + <param name="factory"> + The owning <see cref="T:Spring.Objects.Factory.IObjectFactory"/>, in + case one needs collaborators from it (normally one's own properties + are sufficient). + </param> + <exception cref="T:System.Exception"> + In the case of errors encountered during the creation of the pool. + </exception> + </member> + <member name="M:Spring.Aop.Target.AbstractPoolingTargetSource.ReleaseTarget(System.Object)"> + <summary> + Releases the target object (returns it to the pool). + </summary> + <param name="target"> + The target object to release (return to the pool). + </param> + <exception cref="T:System.Exception"> + In the case that the <paramref name="target"/> could not be released. + </exception> + </member> + <member name="M:Spring.Aop.Target.AbstractPoolingTargetSource.Dispose"> + <summary> + Performs application-defined tasks associated with freeing, releasing, or + resetting unmanaged resources. + </summary> + <remarks> + <p> + Disposes of the pool. + </p> + </remarks> + </member> + <member name="P:Spring.Aop.Target.AbstractPoolingTargetSource.MaxSize"> + <summary> + The maximum number of object instances in this pool. + </summary> + </member> + <member name="P:Spring.Aop.Target.AbstractPoolingTargetSource.Active"> + <summary> + The number of active object instances in this pool. + </summary> + </member> + <member name="P:Spring.Aop.Target.AbstractPoolingTargetSource.Free"> + <summary> + The number of free object instances in this pool. + </summary> + </member> + <member name="P:Spring.Aop.Target.AbstractPoolingTargetSource.ObjectFactory"> + <summary> + The target factory that will be used to perform the lookup + of the object referred to by the + <see cref="P:Spring.Aop.Target.AbstractPrototypeTargetSource.TargetObjectName"/> + property. + </summary> + <value> + The owning <see cref="T:Spring.Objects.Factory.IObjectFactory"/> + (will never be <see langword="null"/>). + </value> + <exception cref="T:Spring.Objects.ObjectsException"> + In case of initialization errors. + </exception> + <seealso cref="P:Spring.Aop.Target.AbstractPrototypeTargetSource.ObjectFactory"/> + </member> + <member name="T:Spring.Aop.Support.DynamicMethodMatcher"> + <summary> + Convenient abstract superclass for dynamic method matchers that do + care about arguments at runtime. + </summary> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> + </member> + <member name="T:Spring.Aop.IMethodMatcher"> + <summary> + That part of an <see cref="T:Spring.Aop.IPointcut"/> that checks whether a + target method is eligible for advice. + </summary> + <remarks> + <p> + An <see cref="T:Spring.Aop.IMethodMatcher"/> may be evaluated + <b>statically</b> or at runtime (<b>dynamically</b>). Static + matching involves only the method signature and (possibly) any + <see cref="T:System.Attribute"/>s that have been applied to a method. + Dynamic matching additionally takes into account the actual argument + values passed to a method invocation. + </p> + <p> + If the value of the <see cref="P:Spring.Aop.IMethodMatcher.IsRuntime"/> + property of an implementation instance returns <see langword="false"/>, + evaluation can be performed statically, and the result will be the same + for all invocations of this method, whatever their arguments. This + means that if the value of the + <see cref="P:Spring.Aop.IMethodMatcher.IsRuntime"/> is + <see langword="false"/>, the three argument + <see cref="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type,System.Object[])"/> + method will never be invoked for the lifetime of the + <see cref="T:Spring.Aop.IMethodMatcher"/>. + </p> + <p> + If an implementation returns <see langword="true"/> in its two argument + <see cref="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type)"/> + method, and the value of it's + <see cref="P:Spring.Aop.IMethodMatcher.IsRuntime"/> property is + <see langword="true"/>, the three argument + <see cref="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type,System.Object[])"/> + method will be invoked <i>immediately before each and every potential + execution of the related advice</i>, to decide whether the advice + should run. All previous advice, such as earlier interceptors in an + interceptor chain, will have run, so any state changes they have + produced in parameters or thread local storage, will be available at + the time of evaluation. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> + <seealso cref="T:Spring.Aop.TrueMethodMatcher"/> + </member> + <member name="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type)"> + <summary> + Does the supplied <paramref name="method"/> satisfy this matcher? + </summary> + <remarks> + <p> + This is a static check. If this method invocation returns + <see langword="false"/>,or if the + <see cref="P:Spring.Aop.IMethodMatcher.IsRuntime"/> property is + <see langword="false"/>, then no runtime check will be made. + </p> + </remarks> + <param name="method">The candidate method.</param> + <param name="targetType"> + The target <see cref="T:System.Type"/> (may be <see langword="null"/>, + in which case the candidate <see cref="T:System.Type"/> must be taken + to be the <paramref name="method"/>'s declaring class). + </param> + <returns> + <see langword="true"/> if this this method matches statically. + </returns> + </member> + <member name="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type,System.Object[])"> + <summary> + Is there a runtime (dynamic) match for the supplied + <paramref name="method"/>? + </summary> + <remarks> + <p> + In order for this method to have even been invoked, the supplied + <paramref name="method"/> must have matched + statically. This method is invoked only if the two argument + <see cref="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type)"/> + method returns <see langword="true"/> for the supplied + <paramref name="method"/> and <paramref name="targetType"/>, and + if the <see cref="P:Spring.Aop.IMethodMatcher.IsRuntime"/> property + is <see langword="true"/>. + </p> + <p> + Invoked immediately <b>before</b> any potential running of the + advice, and <b>after</b> any advice earlier in the advice chain has + run. + </p> + </remarks> + <param name="method">The candidate method.</param> + <param name="targetType"> + The target <see cref="T:System.Type"/>. + </param> + <param name="args">The arguments to the method</param> + <returns> + <see langword="true"/> if there is a runtime match.</returns> + </member> + <member name="P:Spring.Aop.IMethodMatcher.IsRuntime"> + <summary> + Is this <see cref="T:Spring.Aop.IMethodMatcher"/> dynamic? + </summary> + <remarks> + <p> + If <see langword="true"/>, the three argument + <see cref="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type,System.Object[])"/> + method will be invoked if the two argument + <see cref="M:Spring.Aop.IMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type)"/> + method returns <see langword="true"/>. + </p> + <p> + Note that this property can be checked when an AOP proxy is created, + and implementations need not check the value of this property again + before each method invocation. + </p> + </remarks> + <value> + <see langword="true"/> if this + <see cref="T:Spring.Aop.IMethodMatcher"/> is dynamic. + </value> + </member> + <member name="M:Spring.Aop.Support.DynamicMethodMatcher.#ctor"> + <summary> + Creates a new instance of the + <see cref="T:Spring.Aop.Support.DynamicMethodMatcher"/> + class. + </summary> + <remarks> + <p> + This is an <see langword="abstract"/> class, and as such exposes no + public constructors. + </p> + </remarks> + </member> + <member name="M:Spring.Aop.Support.DynamicMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type)"> + <summary> + Does the supplied <paramref name="method"/> satisfy this matcher? + </summary> + <remarks> + <p> + Derived classes can override this method to add preconditions for + dynamic matching. + </p> + <p> + This implementation always returns <see langword="true"/>. + </p> + </remarks> + <param name="method">The candidate method.</param> + <param name="targetType"> + The target <see cref="T:System.Type"/> (may be <see langword="null"/>, + in which case the candidate <see cref="T:System.Type"/> must be taken + to be the <paramref name="method"/>'s declaring class). + </param> + <returns> + <see langword="true"/> if this this method matches statically. + </returns> + </member> + <member name="M:Spring.Aop.Support.DynamicMethodMatcher.Matches(System.Reflection.MethodInfo,System.Type,System.Object[])"> + <summary> + Is there a runtime (dynamic) match for the supplied + <paramref name="method"/>? + </summary> + <remarks> + <p> + Must be overriden by derived classes to provide criteria for dynamic matching. + </p> + </remarks> + <param name="method">The candidate method.</param> + <param name="targetType"> + The target <see cref="T:System.Type"/>. + </param> + <param name="args">The arguments to the method</param> + <returns> + <see langword="true"/> if there is a runtime match.</returns> + </member> + <member name="P:Spring.Aop.Support.DynamicMethodMatcher.IsRuntime"> + <summary> + Is this <see cref="T:Spring.Aop.IMethodMatcher"/> dynamic? + </summary> + <value> + Always returns <see langword="true"/>, to specify that this is a + dynamic matcher. + </value> + </member> + <member name="T:Spring.Aop.Support.ComposablePointcut"> + <summary> + Convenient class for building up pointcuts. + </summary> + <remarks> + <p> + All methods return a <see cref="T:Spring.Aop.Support.ComposablePointcut"/> + instance, which facilitates the following concise usage pattern... + </p> + <code language="C#"> + IPointcut pointcut = new ComposablePointcut() + .Union(typeFilter) + .Intersection(methodMatcher) + .Intersection(pointcut); + </code> + <p> + There is no <c>Union()</c> method on this class. Use the + <see cref="M:Spring.Aop.Support.Pointcuts.Union(Spring.Aop.IPointcut,Spring.Aop.IPointcut)"/> method for such functionality. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> + </member> + <member name="T:Spring.Aop.IPointcut"> + <summary> + Spring.NET's core pointcut abstraction. + </summary> + <remarks> + <p> + A pointcut is composed of <see cref="T:Spring.Aop.ITypeFilter"/>s and + <see cref="T:Spring.Aop.IMethodMatcher"/>s. Both these basic terms and an + <see cref="T:Spring.Aop.IPointcut"/> itself can be combined to build up + sophisticated combinations. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> + </member> + <member name="P:Spring.Aop.IPointcut.TypeFilter"> + <summary> + The <see cref="T:Spring.Aop.ITypeFilter"/> for this pointcut. + </summary> + <value> + The current <see cref="T:Spring.Aop.ITypeFilter"/>. + </value> + </member> + <member name="P:Spring.Aop.IPointcut.MethodMatcher"> + <summary> + The <see cref="T:Spring.Aop.IMethodMatcher"/> for this pointcut. + </summary> + <value> + The current <see cref="T:Spring.Aop.IMethodMatcher"/>. + </value> + </member> + <member name="M:Spring.Aop.Support.ComposablePointcut.#ctor"> + <summary> + Creates a new instance of the + <see cref="T:Spring.Aop.Support.ComposablePointcut"/> class + that matches all the methods on all <see cref="T:System.Type"/>s. + </summary> + </member> + <member name="M:Spring.Aop.Support.ComposablePointcut.#ctor(Spring.Aop.ITypeFilter,Spring.Aop.IMethodMatcher)"> + <summary> + Creates a new instance of the + <see cref="T:Spring.Aop.Support.ComposablePointcut"/> class + that uses the supplied <paramref name="typeFilter"/> and + <paramref name="methodMatcher"/>. + </summary> + <param name="typeFilter"> + The type filter to use. + </param> + <param name="methodMatcher"> + The method matcher to use. + </param> + </member> + <member name="M:Spring.Aop.Support.ComposablePointcut.Union(Spring.Aop.ITypeFilter)"> + <summary> + Changes the current type filter to be the union of the existing filter and the + supplied <paramref name="filter"/>. + </summary> + <param name="filter">The filter to union with.</param> + <returns> + The union of the existing filter and the supplied <paramref name="filter"/>. + </returns> + </member> + <member name="M:Spring.Aop.Support.ComposablePointcut.Intersection(Spring.Aop.ITypeFilter)"> + <summary> + Changes the current type filter to be the intersection of the existing filter + and the supplied <paramref name="filter"/>. + </summary> + <param name="filter">The filter to diff against.</param> + <returns> + The intersection of the existing filter and the supplied <paramref name="filter"/>. + </returns> + </member> + <member name="M:Spring.Aop.Support.ComposablePointcut.Union(Spring.Aop.IMethodMatcher)"> + <summary> + Changes the current method matcher to be the union of the existing matcher and the + supplied <paramref name="matcher"/>. + </summary> + <param name="matcher">The matcher to union with.</param> + <returns> + The union of the existing matcher and the supplied <paramref name="matcher"/>. + </returns> + </member> + <member name="M:Spring.Aop.Support.ComposablePointcut.Intersection(Spring.Aop.IMethodMatcher)"> + <summary> + Changes the current method matcher to be the intersection of the existing matcher + and the supplied <paramref name="matcher"/>. + </summary> + <param name="matcher">The matcher to diff against.</param> + <returns> + The intersection of the existing matcher and the supplied <paramref name="matcher"/>. + </returns> + </member> + <member name="M:Spring.Aop.Support.ComposablePointcut.Intersection(Spring.Aop.IPointcut)"> + <summary> + Changes current pointcut to intersection of the current and supplied pointcut + </summary> + <param name="other">pointcut to diff against</param> + <returns>updated pointcut</returns> + </member> + <member name="P:Spring.Aop.Support.ComposablePointcut.TypeFilter"> + <summary> + The <see cref="T:Spring.Aop.ITypeFilter"/> for this pointcut. + </summary> + <value> + The current <see cref="T:Spring.Aop.ITypeFilter"/>. + </value> + </member> + <member name="P:Spring.Aop.Support.ComposablePointcut.MethodMatcher"> + <summary> + The <see cref="T:Spring.Aop.IMethodMatcher"/> for this pointcut. + </summary> + <value> + The current <see cref="T:Spring.Aop.IMethodMatcher"/>. + </value> + </member> + <member name="T:Spring.Aop.Support.AttributeTypeFilter"> + <summary> + ITypeFilter that looks for a specific attribute being present on a class + </summary> + <author>Juergen Hoeller</author> + <author>Mark Pollack (.NET)</author> + </member> + <member name="T:Spring.Aop.ITypeFilter"> + <summary> + A filter that restricts the matching of a pointcut or introduction to + a given set of target types. + </summary> + <remarks> + <p> + Can be used as part of a pointcut, or for the entire targeting of an + introduction. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> + <seealso cref="T:Spring.Aop.IPointcut"/> + <seealso cref="F:Spring.Aop.TrueTypeFilter.True"/> + </member> + <member name="M:Spring.Aop.ITypeFilter.Matches(System.Type)"> + <summary> + Should the pointcut apply to the supplied + <see cref="T:System.Type"/>? + </summary> + <param name="type"> + The candidate <see cref="T:System.Type"/>. + </param> + <returns> + <see langword="true"/> if the advice should apply to the supplied + <paramref name="type"/> + </returns> + </member> + <member name="M:Spring.Aop.Support.AttributeTypeFilter.#ctor(System.Type)"> + <summary> + Initializes a new instance of the <see cref="T:Spring.Aop.Support.AttributeTypeFilter"/> class for the + given attribute type. + </summary> + <param name="attributeType">Type of the attribute to look for.</param> + </member> + <member name="M:Spring.Aop.Support.AttributeTypeFilter.#ctor(System.Type,System.Boolean)"> + <summary> + Initializes a new instance of the <see cref="T:Spring.Aop.Support.AttributeTypeFilter"/> class for the + given attribute type. + </summary> + <param name="attributeType">Type of the attribute.</param> + <param name="checkInherited">if set to <c>true</c> [check inherited].</param> + </member> + <member name="M:Spring.Aop.Support.AttributeTypeFilter.Matches(System.Type)"> + <summary> + Should the pointcut apply to the supplied <see cref="T:System.Type"/>? + </summary> + <param name="type">The candidate <see cref="T:System.Type"/>.</param> + <returns> + <see langword="true"/> if the advice should apply to the supplied + <paramref name="type"/> + </returns> + </member> + <member name="P:Spring.Aop.Support.AttributeTypeFilter.AttributeType"> + <summary> + The attribute <see cref="T:System.Type"/> for this filter. + </summary> + </member> + <member name="P:Spring.Aop.Support.AttributeTypeFilter.CheckInherited"> + <summary> + Indicates, whether this filter considers base types for filtering. + </summary> + </member> + <member name="T:Spring.Aop.IMethodBeforeAdvice"> + <summary> + Advice executed before a method is invoked. + </summary> + <remarks> + <p> + Such advice cannot prevent the method call proceeding, short of + throwing an <see cref="T:System.Exception"/>. + </p> + <p> + The main advantage of <c>before</c> advice is that there is no + possibility of inadvertently failing to proceed down the interceptor + chain, since there is no need (and indeed means) to invoke the next + interceptor in the call chain. + </p> + <p> + Possible uses for this type of advice would include performing class + invariant checks prior to the actual method invocation, the ubiquitous + logging of method invocations (useful during development), etc. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> + <seealso cref="T:Spring.Aop.IBeforeAdvice"/> + <seealso cref="T:Spring.Aop.IAfterReturningAdvice"/> + <seealso cref="T:Spring.Aop.IThrowsAdvice"/> + <seealso cref="T:AopAlliance.Intercept.IMethodInterceptor"/> + </member> + <member name="T:Spring.Aop.IBeforeAdvice"> + <summary> + Superinterface for all before advice. + </summary> + <remarks> + <p> + <i>Before</i> advice is advice that executes before a joinpoint, but + which does not have the ability to prevent execution flow proceeding to + the joinpoint (unless it throws an <see cref="T:System.Exception"/>). + </p> + <p> + Spring.NET only supports <i>method</i> before advice. Although this + is unlikely to change, this API is designed to allow <i>field</i> + before advice in future if desired. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> + <seealso cref="T:Spring.Aop.IMethodBeforeAdvice"/> + <seealso cref="T:Spring.Aop.IAfterReturningAdvice"/> + <seealso cref="T:Spring.Aop.IThrowsAdvice"/> + <seealso cref="T:AopAlliance.Intercept.IMethodInterceptor"/> + </member> + <member name="M:Spring.Aop.IMethodBeforeAdvice.Before(System.Reflection.MethodInfo,System.Object[],System.Object)"> + <summary> + The callback before a given method is invoked. + </summary> + <param name="method">The method being invoked.</param> + <param name="args">The arguments to the method.</param> + <param name="target"> + The target of the method invocation. May be <see langword="null"/>. + </param> + <exception cref="T:System.Exception"> + Thrown when and if this object wishes to abort the call. Any + exception so thrown will be propagated to the caller. + </exception> + </member> + <member name="T:Spring.Aop.Framework.ProxyFactoryObject"> + <summary> + <see cref="T:Spring.Objects.Factory.IFactoryObject"/> implementation to + source AOP proxies from a Spring.NET IoC container (an + <see cref="T:Spring.Objects.Factory.IObjectFactory"/>). + </summary> + <remarks> + <p> + <see cref="T:AopAlliance.Intercept.IInterceptor"/>s and + <see cref="T:Spring.Aop.IAdvisor"/>s are identified by a list of object + names in the current container.</p> + <p> + Global interceptors and advisors can be added at the factory level + (that is, outside the context of a + <see cref="T:Spring.Aop.Framework.ProxyFactoryObject"/> definition). The + specified interceptors and advisors are expanded in an interceptor list + (see + <see cref="P:Spring.Aop.Framework.ProxyFactoryObject.InterceptorNames"/>) + where an <c>'xxx*'</c> wildcard-style entry is included in the list, + matching the given prefix with the object names. For example, + <c>'global*'</c> would match both <c>'globalObject1'</c> and + <c>'globalObjectBar'</c>, and <c>'*'</c> would match all defined + interceptors. The matching interceptors get applied according to their + returned order value, if they implement the + <see cref="T:Spring.Core.IOrdered"/> interface. An interceptor name list + may not conclude with a global <c>'xxx*'</c> pattern, as global + interceptors cannot invoke targets. + </p> + <p> + It is possible to cast a proxy obtained from this factory to an + <see cref="T:Spring.Aop.Framework.IAdvised"/> reference, or to obtain the + <see cref="T:Spring.Aop.Framework.ProxyFactoryObject"/> reference and + programmatically manipulate it. This won't work for existing prototype + references, which are independent... however, it will work for prototypes + subsequently obtained from the factory. Changes to interception will + work immediately on singletons (including existing references). + However, to change interfaces or the target it is necessary to obtain a + new instance from the surrounding container. This means that singleton + instances obtained from the factory do not have the same object + identity... however, they do have the same interceptors and target, and + changing any reference will change all objects. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Juergen Hoeller</author> + <author>Federico Spinazzi (.NET)</author> + <author>Choy Rim (.NET)</author> + <author>Mark Pollack (.NET)</author> + <author>Aleksandar Seovic (.NET)</author> + <seealso cref="P:Spring.Aop.Framework.ProxyFactoryObject.InterceptorNames"/> + <seealso cref="P:Spring.Aop.Framework.ProxyFactoryObject.ProxyInterfaces"/> + <seealso cref="T:AopAlliance.Intercept.IMethodInterceptor"/> + <seealso cref="T:Spring.Aop.IAdvisor"/> + <seealso cref="T:Spring.Aop.Target.SingletonTargetSource"/> + </member> + <member name="T:Spring.Aop.Framework.AdvisedSupport"> + <summary> + Superclass for AOP proxy configuration managers. + </summary> + <remarks> + <p> + Instances of this class are not themselves AOP proxies, but + subclasses of this class are normally factories from which AOP proxy + instances are obtained directly. + </p> + <p> + This class frees subclasses of the housekeeping of + <see cref="T:AopAlliance.Intercept.IInterceptor"/> and + <see cref="T:Spring.Aop.IAdvisor"/> instances, but doesn't actually + implement proxy creation methods, the functionality for which + is provided by subclasses. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> + <seealso cref="T:Spring.Aop.Framework.IAopProxy"/> + </member> + <member name="T:Spring.Aop.Framework.ProxyConfig"> + <summary> + Convenience superclass for configuration used in creating proxies, + to ensure that all proxy creators have consistent properties. + </summary> + <remarks> + <p> + Note that it is no longer possible to configure subclasses to + expose the <see cref="T:AopAlliance.Intercept.IMethodInvocation"/>. + Interceptors should normally manage their own thread locals if they + need to make resources available to advised objects. If it is + absolutely necessary to expose the + <see cref="T:AopAlliance.Intercept.IMethodInvocation"/>, use an + interceptor to do so. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> + </member> + <member name="M:Spring.Aop.Framework.ProxyConfig.CopyFrom(Spring.Aop.Framework.ProxyConfig)"> + <summary> + Copies the configuration from the supplied + <paramref name="otherConfiguration"/> into this instance. + </summary> + <param name="otherConfiguration"> + The configuration to be copied. + </param> + <exception cref="T:System.ArgumentNullException"> + If the supplied <paramref name="otherConfiguration"/> is + <see langword="null"/>. + </exception> + </member> + <member name="M:Spring.Aop.Framework.ProxyConfig.ToString"> + <summary> + A <see cref="T:System.String"/> that represents the current + <see cref="T:Spring.Aop.Framework.ProxyConfig"/> configuration. + </summary> + <returns> + A <see cref="T:System.String"/> that represents the current + <see cref="T:Spring.Aop.Framework.ProxyConfig"/> configuration. + </returns> + </member> + <member name="P:Spring.Aop.Framework.ProxyConfig.SyncRoot"> + <summary> + Use to synchronize access to this ProxyConfig instance + </summary> + </member> + <member name="P:Spring.Aop.Framework.ProxyConfig.ProxyTargetType"> + <summary> + Is the target <see cref="T:System.Type"/> to be proxied in addition + to any interfaces declared on the proxied <see cref="T:System.Type"/>? + </summary> + </member> + <member name="P:Spring.Aop.Framework.ProxyConfig.ProxyTargetAttributes"> + <summary> + Is target type attributes, method attributes, method's return type attributes + and method's parameter attributes to be proxied in addition + to any interfaces declared on the proxied <see cref="T:System.Type"/>? + </summary> + </member> + <member name="P:Spring.Aop.Framework.ProxyConfig.Optimize"> + <summary> + Are any <i>agressive optimizations</i> to be performed? + </summary> + <remarks> + <p> + The exact meaning of <i>agressive optimizations</i> will differ + between proxies, but there is usually some tradeoff. + </p> + <p> + For example, optimization will usually mean that advice changes + won't take effect after a proxy has been created. For this reason, + optimization is disabled by default. An optimize value of + <see langword="true"/> may be ignored if other settings preclude + optimization: for example, if the + <see cref="P:Spring.Aop.Framework.ProxyConfig.ExposeProxy"/> property + is set to <see langword="true"/> and such a value is not compatible + with the optimization. + </p> + <p> + The default is <see langword="false"/>. + </p> + </remarks> + </member> + <member name="P:Spring.Aop.Framework.ProxyConfig.ExposeProxy"> + <summary> + Should proxies obtained from this configuration expose + the AOP proxy to the + <see cref="T:Spring.Aop.Framework.AopContext"/> class? + </summary> + <remarks> + <p> + The default is <see langword="false"/>, as enabling this property + may impair performance. + </p> + </remarks> + </member> + <member name="P:Spring.Aop.Framework.ProxyConfig.AopProxyFactory"> + <summary> + Gets and set the factory to be used to create AOP proxies. + </summary> + <remarks> + <p> + This obviously allows one to customise the + <see cref="T:Spring.Aop.Framework.IAopProxyFactory"/> implementation, + allowing different strategies to be dropped in without changing the + core framework. For example, an + <see cref="T:Spring.Aop.Framework.IAopProxyFactory"/> implementation + could return an <see cref="T:Spring.Aop.Framework.IAopProxy"/> + using remoting proxies, <c>Reflection.Emit</c> or a code generation + strategy. + </p> + </remarks> + </member> + <member name="P:Spring.Aop.Framework.ProxyConfig.IsFrozen"> + <summary> + Is this configuration frozen? + </summary> + <remarks> + <p> + The default is not frozen. + </p> + </remarks> + </member> + <member name="T:Spring.Aop.Framework.IAdvised"> + <summary> + Configuration data for an AOP proxy factory. + </summary> + <remarks> + <p> + This configuration includes the + <see cref="T:AopAlliance.Intercept.IInterceptor"/>s, + <see cref="T:Spring.Aop.IAdvisor"/>s, and (any) proxied interfaces. + </p> + <p> + Any AOP proxy obtained from Spring.NET can be cast to this interface to + allow the manipulation of said proxy's AOP advice. + </p> + </remarks> + <author>Rod Johnson</author> + <author>Aleksandar Seovic (.NET)</author> + <seealso cref="T:Spring.Aop.Framework.AdvisedSupport"/> + </member> + <member name="M:Spring.Aop.Framework.IAdvised.AddAdvice(AopAlliance.Aop.IAdvice)"> + <summary> + Adds the supplied <paramref name="advice"/> to the end (or tail) + of the advice (interceptor) chain. + </summary> + <remarks> + <p> + Please be aware that Spring.NET's AOP implementation only supports + method advice (as encapsulated by the + <see cref="T:AopAlliance.Intercept.IMethodInterceptor"/> interface). + </p> + </remarks> + <param name="advice"> + The <see cref="T:AopAlliance.Aop.IAdvice"/> to be added. + </param> + <seealso cref="T:Spring.Aop.Support.DefaultPointcutAdvisor"/> + <seealso cref="M:Spring.Aop.Framework.IAdvised.AddAdvice(System.Int32,AopAlliance.Aop.IAdvice)"/> + </member> + <member name="M:Spring.Aop.Framework.IAdvised.AddAdvice(System.Int32,AopAlliance.Aop.IAdvice)"> + <summary> + Adds the supplied <paramref name="advice"/> to the supplied + <paramref name="position"/> in the advice (interceptor) chain. + </summary> + <remarks> + <p> + Please be aware that Spring.NET's AOP implementation only supports + method advice (as encapsulated by the + <see cref="T:AopAlliance.Intercept.IMethodInterceptor"/> interface). + </p> + </remarks> + <param name="position"> + The zero (0) indexed position (from the head) at which the + supplied <paramref name="advice"/> is to be inserted into the + advice (interceptor) chain. + </param> + <param name="advice"> + The <see cref="T:AopAlliance.Aop.IAdvice"/> to be added. + </param> + <seealso cref="T:Spring.Aop.Support.DefaultPointcutAdvisor"/> + <seealso cref="M:Spring.Aop.Framework.IAdvised.AddAdvice(AopAlliance.Aop.IAdvice)"/> + </member> + <member name="M:Spring.Aop.Framework.IAdvised.IsInterfaceProxied(System.Type)"> + <summary> + Is the supplied <paramref name="intf"/> (interface) + <see cref="T:System.Type"/> proxied? + </summary> + <param name="intf"> + The interface <see cref="T:System.Type"/> to test. + </param> + <returns> + <see langword="true"/> if the supplied <paramref name="intf"/> + (interface) <see cref="T:System.Type"/> is proxied; + <see langword="false"/> if not or the supplied + <paramref name="intf"/> is <cref lang="null"/>. + </returns> + </member> + <member name="M:Spring.Aop.Framework.IAdvised.AddAdvisors(Spring.Aop.IAdvisors)"> + <summary> + Adds the advisors from the supplied <paramref name="advisors"/> + to the list of <see cref="P:Spring.Aop.Framework.IAdvised.Advisors"/>. + </summary> + <param name="advisors"> + The <see cref="T:Spring.Aop.IAdvisors"/> to add advisors from. + </param> + <exception cref="T:Spring.Aop.Framework.AopConfigException"> + If this proxy configuration is frozen and the + <paramref name="advisors"/> cannot be added. + </exception> + </member> + <member name="M:Spring.Aop.Framework.IAdvised.AddAdvisor(Spring.Aop.IAdvisor)"> + <summary> + Adds the supplied <paramref name="advisor"/> to the list + of <see cref="P:Spring.Aop.Framework.IAdvised.Advisors"/>. + </summary> + <param name="advisor"> + The <see cref="T:Spring.Aop.IAdvisor"/> to add. + </param> + <exception cref="T:Spring.Aop.Framework.AopConfigException"> + If this proxy configuration is frozen and the + <paramref name="advisor"/> cannot be added. + </exception> + </member> + <member name="M:Spring.Aop.Framework.IAdvised.AddAdvisor(System.Int32,Spring.Aop.IAdvisor)"> + <summary> + Adds the supplied <paramref name="advisor"/> to the list + of <see cref="P:Spring.Aop.Framework.IAdvised.Advisors"/>. + </summary> + <param name="index"> + The index in the <see cref="P:Spring.Aop.Framework.IAdvised.Advisors"/> + list at which the supplied <paramref name="advisor"/> + is to be inserted. + </param> + <param name="advisor"> + The <see cref="T:Spring.Aop.IIntroductionAdvisor"/> to add. + </param> + <exception cref="T:Spring.Aop.Framework.AopConfigException"> + If this proxy configuration is frozen and the + <paramref name="advisor"/> cannot be added. + </exception> + </member> + <member name="M:Spring.Aop.Framework.IAdvised.AddIntroduction(Spring.Aop.IIntroductionAdvisor)"> + <summary> + Adds the supplied <paramref name="introductionAdvisor"/> to the list + of <see cref="P:Spring.Aop.Framework.IAdvised.Introductions"/>. + </summary> + <param name="introductionAdvisor"> + The <see cref="T:Spring.Aop.IIntroductionAdvisor"/> to add. + </param> + <exception cref="T:Spring.Aop.Framework.AopConfigException"> + If this proxy configuration is frozen and the + <paramref name="introductionAdvisor"/> cannot be added. + </exception> + </member> + <member name="M:Spring.Aop.Framework.IAdvised.AddIntroduction(System.Int32,Spring.Aop.IIntroductionAdvisor)"> + <summary> + Adds the supplied <paramref name="introductionAdvisor"/> to the list + of <see cref="P:Spring.Aop.Framework.IAdvised.Introductions"/>. + </summary> + <param name="index"> + The index in the <see cref="P:Spring.Aop.Framework.IAdvised.Introductions"/> + list at which the supplied <paramref name="introductionAdvisor"/> + is to be inserted. + </param> + <param name="introductionAdvisor"> + The <see cref="T:Spring.Aop.IIntroductionAdvisor"/> to add. + </param> + <exception cref="T:Spring.Aop.Framework.AopConfigException"> + If this proxy configuration is frozen and the + <paramref name="introductionAdvisor"/> cannot be added. + </exception> + </member> + <member name="M:Spring.Aop.Framework.IAdvised.IndexOf(Spring.Aop.IAdvisor)"> + <summary> + Return the index (0 based) of the supplied + <see cref="T:Spring.Aop.IAdvisor"/> in the interceptor + (advice) chain for this proxy. + </summary> + <remarks> + <p> + The return value of this method can be used to index into + the <see cref="P:Spring.Aop.Framework.IAdvised.Advisors"/> + list. + </p> + </remarks> + <param name="advisor"> + The <see cref="T:Spring.Aop.IAdvisor"/> to search for. + </param> + <returns> + The zero (0) based index of this advisor, or -1 if the + supplied <paramref name="advisor"/> is not an advisor for this + proxy. + </returns> + </member> + <member name="M:Spring.Aop.Framework.IAdvised.IndexOf(Spring.Aop.IIntroductionAdvisor)"> + <summary> + Return the index (0 based) of the supplied + <see cref="T:Spring.Aop.IIntroductionAdvisor"/> in the introductions + for this proxy. + </summary> + <remarks> + <p> + The return value of this method can be used to index into + the <see cref="P:Spring.Aop.Framework.IAdvised.Introductions"/> + list. + </p> + </remarks> + <param name="advisor"> + The <see cref="T:Spring.Aop.IIntroductionAdvisor"/> to search for. + </param> + <returns> + The zero (0) based index of this advisor, or -1 if the + supplied <paramref name="advisor"/> is not an introduction advisor + for this proxy. + </returns> + </member> + <member name="M:Spring.Aop.Framework.IAdvised.RemoveAdvisor(Spring.Aop.IAdvisor)"> + <summary> + Removes the supplied <paramref name="advisor"/> the list of advisors + for this proxy. + </summary> + <param name="advisor">The advisor to remove.</param> + <returns> + <see langword="true"/> if advisor was found in the list of + <see cref="P:Spring.Aop.Framework.IAdvised.Advisors"/> for this + proxy and was successfully removed; <see langword="false"/> if not + or if the supplied <paramref name="advisor"/> is <cref lang="null"/>. + </returns> + <exception cref="T:Spring.Aop.Framework.AopConfigException"> + If this proxy configuration is frozen and the + <paramref name="advisor"/> cannot be removed. + </exception> + </member> + <member name="M:Spring.Aop.Framework.IAdvised.RemoveAdvisor(System.Int32)"> + <summary> + Removes the <see cref="T:Spring.Aop.IAdvisor"/> at the supplied + <paramref name="index"/> in the + <see cref="P:Spring.Aop.Framework.IAdvised.Advisors"/> list + from the list of + <see cref="P:Spring.Aop.Framework.IAdvised.Advisors"/> for this proxy. + </summary> + <param name="index"> + The index of the <see cref="T:Spring.Aop.IAdvisor"/> to remove. + </param> + <exception cref="T:Spring.Aop.Framework.AopConfigException"> + If this proxy configuration is frozen and the + <see cref="T:Spring.Aop.IAdvisor"/> at the supplied <paramref name="index"/> + cannot be removed; or if the supplied <paramref name="index"/> is out of + range. + </exception> + </member> + <member name="M:Spring.Aop.Framework.IAdvised.RemoveAdvice(AopAlliance.Aop.IAdvice)"> + <summary> + Removes the supplied <paramref name="advice"/> from the list + of <see cref="P:Spring.Aop.Framework.IAdvised.Advisors"/>. + </summary> + <param name="advice"> + The <see cref="T:AopAlliance.Aop.IAdvice"/> to remove. + </param> + <returns> + <see langword="true"/> if the supplied <paramr... [truncated message content] |
From: <fab...@us...> - 2009-03-03 19:55:10
|
Revision: 4106 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4106&view=rev Author: fabiomaulo Date: 2009-03-03 19:55:08 +0000 (Tue, 03 Mar 2009) Log Message: ----------- ByteCode provider of Spring.NET Modified Paths: -------------- trunk/nhibernate/default.build trunk/nhibernate/src/NHibernate.Everything.sln Added Paths: ----------- trunk/nhibernate/src/NHibernate.ByteCode.Spring/ trunk/nhibernate/src/NHibernate.ByteCode.Spring/AbstractProxyFactory.cs trunk/nhibernate/src/NHibernate.ByteCode.Spring/ByteCode.build trunk/nhibernate/src/NHibernate.ByteCode.Spring/LazyInitializer.cs trunk/nhibernate/src/NHibernate.ByteCode.Spring/NHibernate.ByteCode.Spring.csproj trunk/nhibernate/src/NHibernate.ByteCode.Spring/Properties/ trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactoryFactory.cs trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/App.config trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ByteCode.Test.build trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/DebugConnectionProvider.cs trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/NHibernate.ByteCode.Spring.Tests.csproj trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/Properties/ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/IMyProxy.cs trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/MyProxyImpl.cs trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/ProxyFixture.cs trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/ProxyImpl.hbm.xml trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/TestCase.cs trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/TestConfigurationHelper.cs Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2009-03-03 07:06:19 UTC (rev 4105) +++ trunk/nhibernate/default.build 2009-03-03 19:55:08 UTC (rev 4106) @@ -30,6 +30,8 @@ <include name="NHibernate.ByteCode.LinFu.Tests/ByteCode.Test.build" /> <include name="NHibernate.ByteCode.Castle/ByteCode.build" /> <include name="NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build" /> + <include name="NHibernate.ByteCode.Spring/ByteCode.build" /> + <include name="NHibernate.ByteCode.Spring.Tests/ByteCode.Test.build" /> <include name="NHibernate.DomainModel/NHibernate.DomainModel.build" /> <include name="NHibernate.Test/NHibernate.Test.build" /> <include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build" /> @@ -41,6 +43,7 @@ <include name="Iesi.Collections.Test/Iesi.Collections.Test.build" /> <include name="NHibernate.ByteCode.LinFu.Tests/ByteCode.Test.build" /> <include name="NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build" /> + <include name="NHibernate.ByteCode.Spring.Tests/ByteCode.Test.build" /> <include name="NHibernate.Test/NHibernate.Test.build" /> <include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build" if="${run.performance.tests}" /> @@ -89,10 +92,12 @@ --> <exclude name="Iesi.Collections.dll" /> <exclude name="Iesi.Collections.xml" /> - <exclude name="NHibernate.ByteCode.LinFuDynamicProxy.dll" /> - <exclude name="NHibernate.ByteCode.LinFuDynamicProxy.xml" /> - <exclude name="NHibernate.ByteCode.CastleDynamicProxy.dll" /> - <exclude name="NHibernate.ByteCode.CastleDynamicProxy.xml" /> + <exclude name="NHibernate.ByteCode.LinFu.dll" /> + <exclude name="NHibernate.ByteCode.LinFu.xml" /> + <exclude name="NHibernate.ByteCode.Castle.dll" /> + <exclude name="NHibernate.ByteCode.Castle.xml" /> + <exclude name="NHibernate.ByteCode.Spring.dll" /> + <exclude name="NHibernate.ByteCode.Spring.xml" /> <include name="*.dll" /> <include name="*.xml" /> <include name="*.license.txt" /> Property changes on: trunk/nhibernate/src/NHibernate.ByteCode.Spring ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: svn:ignore + obj .#* *.user *.xsx AssemblyInfo.cs *.aps *.eto [Bb]in [Dd]ebug [Rr]elease *resharper* Added: bugtraq:logregex + NH-\d+ Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring/AbstractProxyFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/AbstractProxyFactory.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/AbstractProxyFactory.cs 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,51 @@ +using System.Reflection; +using Common.Logging; +using Iesi.Collections.Generic; +using NHibernate.Engine; +using NHibernate.Proxy; +using NHibernate.Type; + +namespace NHibernate.ByteCode.Spring +{ + /// <summary> + /// Convenience base class for <see cref="IProxyFactory"/> implementations, + /// providing common functionality. + /// </summary> + /// <author>Erich Eichinger (Spring.NET Team)</author> + public abstract class AbstractProxyFactory : IProxyFactory + { + protected readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + protected string EntityName { get; private set; } + protected System.Type PersistentClass { get; private set; } + protected System.Type[] Interfaces { get; private set; } + protected MethodInfo GetIdentifierMethod { get; private set; } + protected MethodInfo SetIdentifierMethod { get; private set; } + protected IAbstractComponentType ComponentIdType { get; private set; } + + protected bool IsClassProxy + { + get { return Interfaces.Length == 1; } + } + + public virtual void PostInstantiate(string entityName, System.Type persistentClass, ISet<System.Type> interfaces, + MethodInfo getIdentifierMethod, MethodInfo setIdentifierMethod, + IAbstractComponentType componentIdType) + { + EntityName = entityName; + PersistentClass = persistentClass; + Interfaces = new System.Type[interfaces.Count]; + + if (interfaces.Count > 0) + { + interfaces.CopyTo(Interfaces, 0); + } + + GetIdentifierMethod = getIdentifierMethod; + SetIdentifierMethod = setIdentifierMethod; + ComponentIdType = componentIdType; + } + + public abstract INHibernateProxy GetProxy(object id, ISessionImplementor session); + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring/ByteCode.build =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/src/NHibernate.ByteCode.Spring/ByteCode.build ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring/LazyInitializer.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/LazyInitializer.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/LazyInitializer.cs 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,105 @@ +using System; +using System.Reflection; +using AopAlliance.Intercept; +using NHibernate.Engine; +using NHibernate.Proxy.Poco; +using NHibernate.Type; +using Spring.Aop; +using Spring.Reflection.Dynamic; + +namespace NHibernate.ByteCode.Spring +{ + [Serializable] + public class LazyInitializer : BasicLazyInitializer, IMethodInterceptor, ITargetSource + { + private static readonly object NULL = new object(); + + private static readonly MethodInfo exceptionInternalPreserveStackTrace = + typeof (Exception).GetMethod("InternalPreserveStackTrace", BindingFlags.Instance | BindingFlags.NonPublic); + + private static MethodInfo MapInterfaceMethodToImplementationIfNecessary(MethodInfo methodInfo, + System.Type implementingType) + { + MethodInfo concreteMethodInfo = methodInfo; + + if (methodInfo!= null && methodInfo.DeclaringType.IsInterface) + { + InterfaceMapping interfaceMapping = implementingType.GetInterfaceMap(methodInfo.DeclaringType); + int methodIndex = Array.IndexOf(interfaceMapping.InterfaceMethods, methodInfo); + concreteMethodInfo = interfaceMapping.TargetMethods[methodIndex]; + } + + return concreteMethodInfo; + } + + public LazyInitializer(string entityName, System.Type persistentClass, object id, MethodInfo getIdentifierMethod, + MethodInfo setIdentifierMethod, IAbstractComponentType componentIdType, + ISessionImplementor session) + : base( + entityName, persistentClass, id, MapInterfaceMethodToImplementationIfNecessary(getIdentifierMethod, persistentClass), + MapInterfaceMethodToImplementationIfNecessary(setIdentifierMethod, persistentClass), componentIdType, session) + { + InterceptCalls = true; + } + + public bool InterceptCalls { get; set; } + + #region Implementation of IInterceptor + + public object Invoke(IMethodInvocation info) + { + object returnValue; + try + { + returnValue = base.Invoke(info.Method, info.Arguments, info.Target); + + if (returnValue != InvokeImplementation) + { + return returnValue; + } + if (InterceptCalls) + { + var method = new SafeMethod(info.Method); + return method.Invoke(GetImplementation(), info.Arguments); + } + } + catch (TargetInvocationException ex) + { + exceptionInternalPreserveStackTrace.Invoke(ex.InnerException, new Object[] { }); + throw ex.InnerException; + } + + return returnValue; + } + + #endregion + + #region Implementation of ITargetSource + + object ITargetSource.GetTarget() + { + if (!IsUninitialized) + { + return Target; + } + return NULL; + } + + void ITargetSource.ReleaseTarget(object target) + { + //throw new System.NotImplementedException(); + } + + System.Type ITargetSource.TargetType + { + get { return base.PersistentClass; } + } + + bool ITargetSource.IsStatic + { + get { return false; } + } + + #endregion + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring/NHibernate.ByteCode.Spring.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/NHibernate.ByteCode.Spring.csproj (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/NHibernate.ByteCode.Spring.csproj 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.30729</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{946BCA10-109A-4472-8521-76616174AD4D}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>NHibernate.ByteCode.Spring</RootNamespace> + <AssemblyName>NHibernate.ByteCode.Spring</AssemblyName> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <TargetFrameworkSubset> + </TargetFrameworkSubset> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="antlr.runtime, Version=2.7.6.2, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\antlr.runtime.dll</HintPath> + </Reference> + <Reference Include="Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\Common.Logging.dll</HintPath> + </Reference> + <Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\Iesi.Collections.dll</HintPath> + </Reference> + <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\log4net.dll</HintPath> + </Reference> + <Reference Include="Spring.Aop, Version=1.2.0.20001, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\Spring.Aop.dll</HintPath> + </Reference> + <Reference Include="Spring.Core, Version=1.2.0.20001, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\Spring.Core.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="AbstractProxyFactory.cs" /> + <Compile Include="AssemblyInfo.cs" /> + <Compile Include="LazyInitializer.cs" /> + <Compile Include="ProxyFactory.cs" /> + <Compile Include="ProxyFactoryFactory.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\NHibernate\NHibernate.csproj"> + <Project>{5909BFE7-93CF-4E5F-BE22-6293368AF01D}</Project> + <Name>NHibernate</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <None Include="ByteCode.build" /> + </ItemGroup> + <ItemGroup> + <Folder Include="Properties\" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Property changes on: trunk/nhibernate/src/NHibernate.ByteCode.Spring/Properties ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactory.cs 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,55 @@ +using System; +using NHibernate.Engine; +using NHibernate.Proxy; + +namespace NHibernate.ByteCode.Spring +{ + /// <summary> + /// A Spring for .NET backed <see cref="IProxyFactory"/> implementation for creating + /// NHibernate proxies. + /// </summary> + /// <seealso cref="ProxyFactoryFactory"/> + /// <author>Erich Eichinger (Spring.NET Team)</author> + public class ProxyFactory : AbstractProxyFactory + { + [Serializable] + private class SerializableProxyFactory : global::Spring.Aop.Framework.ProxyFactory + { + // ensure proxy types are generated as Serializable + public override bool IsSerializable + { + get { return true; } + } + } + + #region IProxyFactory Members + + public override INHibernateProxy GetProxy(object id, ISessionImplementor session) + { + try + { + var initializer = new LazyInitializer(EntityName, PersistentClass, id, GetIdentifierMethod, SetIdentifierMethod, + ComponentIdType, session); + + var proxyFactory = new SerializableProxyFactory(); + proxyFactory.Interfaces = Interfaces; + proxyFactory.TargetSource = initializer; + proxyFactory.ProxyTargetType = IsClassProxy; + proxyFactory.AddAdvice(initializer); + + object proxyInstance = proxyFactory.GetProxy(); + + initializer.InterceptCalls = true; + + return (INHibernateProxy) proxyInstance; + } + catch (Exception ex) + { + log.Error("Creating a proxy instance failed", ex); + throw new HibernateException("Creating a proxy instance failed", ex); + } + } + + #endregion + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactoryFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactoryFactory.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring/ProxyFactoryFactory.cs 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,30 @@ +using NHibernate.Bytecode; +using NHibernate.Proxy; + +namespace NHibernate.ByteCode.Spring +{ + /// <summary> + /// Creates a Spring for .NET backed <see cref="IProxyFactory"/> instance. + /// </summary> + /// <remarks> + /// TODO: mention how to configure + /// </remarks> + /// <author>Erich Eichinger</author> + public class ProxyFactoryFactory : IProxyFactoryFactory + { + #region IProxyFactoryFactory Members + + public IProxyFactory BuildProxyFactory() + { + return new ProxyFactory(); + } + + public IProxyValidator ProxyValidator + { + // TODO : check what this validator does? + get { return new DynProxyTypeValidator(); } + } + + #endregion + } +} \ No newline at end of file Property changes on: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: svn:ignore + obj .#* *.user *.xsx *.aps *.eto [Bb]in [Dd]ebug [Rr]elease *resharper* AssemblyInfo.cs hibernate.cfg.xml Added: bugtraq:logregex + NH-\d+ Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/App.config =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/App.config (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/App.config 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,84 @@ +<?xml version="1.0"?> +<configuration> + <configSections> + <section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"/> + <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/> + </configSections> + + <!-- + hibernate-configuration section + + You don't need to change this section for your own use. + You can write your own hibernate.cfg.xml to override all session-factory configuration. + Templates are available in NHibernate.Config.Templates folder. + --> + <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> + <bytecode-provider type="lcg"/> + <reflection-optimizer use="true"/> + <session-factory name="NHibernate.Test"> + <property name="connection.provider">NHibernate.ByteCode.Spring.Tests.DebugConnectionProvider, NHibernate.ByteCode.Spring.Tests</property> + <property name="cache.provider_class">NHibernate.Cache.HashtableCacheProvider, NHibernate</property> + <property name="cache.use_query_cache">true</property> + <property name="prepare_sql">false</property> + <property name="query.startup_check">false</property> + <property name="connection.isolation">ReadCommitted</property> + <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> + <property name="connection.connection_string"> + Server=(local);initial catalog=nhibernate;Integrated Security=SSPI + </property> + <property name="show_sql">false</property> + <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> + <property name="use_outer_join">true</property> + <property name="command_timeout">10</property> + <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property> + <property name="adonet.wrap_result_sets">false</property> + + <property name="proxyfactory.factory_class">NHibernate.ByteCode.Spring.ProxyFactoryFactory, NHibernate.ByteCode.Spring</property> + + </session-factory> + </hibernate-configuration> + + <!-- This section contains the log4net configuration settings --> + <log4net debug="false"> + + <!-- Define some output appenders --> + <appender name="trace" type="log4net.Appender.TraceAppender, log4net"> + <layout type="log4net.Layout.PatternLayout,log4net"> + <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n"/> + </layout> + </appender> + + <appender name="console" type="log4net.Appender.ConsoleAppender, log4net"> + <layout type="log4net.Layout.PatternLayout,log4net"> + <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n"/> + </layout> + </appender> + + <appender name="rollingFile" type="log4net.Appender.RollingFileAppender,log4net"> + + <param name="File" value="log.txt"/> + <param name="AppendToFile" value="false"/> + <param name="RollingStyle" value="Date"/> + <param name="DatePattern" value="yyyy.MM.dd"/> + <param name="StaticLogFileName" value="true"/> + + <layout type="log4net.Layout.PatternLayout,log4net"> + <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n"/> + </layout> + </appender> + + <root> + <priority value="WARN"/> + <appender-ref ref="console"/> + </root> + <logger name="NHibernate.Proxy.Poco"> + <priority value="DEBUG"/> + </logger> + + <logger name="NHibernate.ByteCode.Spring"> + <priority value="DEBUG"/> + </logger> + </log4net> + + +<startup><supportedRuntime version="v2.0.50727"/></startup></configuration> Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ByteCode.Test.build =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ByteCode.Test.build (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ByteCode.Test.build 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,47 @@ +<?xml version="1.0" ?> + +<project + name="NHibernate.ByteCode.Spring.Tests" + default="build" + xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd" +> + <property name="root.dir" value="../.." /> + + <include buildfile="${root.dir}/build-common/common-project.xml" /> + + <target name="init" depends="common.init"> + + <property name="assembly.is-cls-compliant" value="false" /> + <property name="assembly.description" value="The Unit Tests for Spring ByteCode." /> + <property name="assembly.version" value="1.0.0.1" /> + <property name="assembly.version.informational" value="1.0" /> + + <property name="clover.instrument" value="false" /> + + <assemblyfileset id="project.references" basedir="${bin.dir}"> + <include name="System.dll" /> + <include name="System.XML.dll" /> + <include name="System.Data.dll" /> + <include name="System.Core.dll" /> + <include name="Common.Logging.dll" /> + <include name="Iesi.Collections.dll" /> + <include name="log4net.dll" /> + <include name="antlr.runtime.dll" /> + <include name="Spring.Aop.dll" /> + <include name="Spring.Core.dll" /> + <include name="NHibernate.dll" /> + <include name="NHibernate.ByteCode.Spring.dll" /> + <include name="nunit.framework.dll"/> + </assemblyfileset> + + <resourcefileset id="project.resources" prefix="NHibernate.ByteCode.Spring.Tests" dynamicprefix="true"> + <include name="**/*.xml" /> + <exclude name="bin/**/*.xml" /> + </resourcefileset> + </target> + + <target name="generate-assemblyinfo" depends="init common.generate-assemblyinfo" /> + <target name="build" depends="init generate-assemblyinfo common.compile-tests" /> + <target name="test" depends="init build common.run-tests" /> + +</project> Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/DebugConnectionProvider.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/DebugConnectionProvider.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/DebugConnectionProvider.cs 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,68 @@ +using System.Collections; +using System.Data; +using Iesi.Collections; +using NHibernate.Connection; + +namespace NHibernate.ByteCode.Spring.Tests +{ + public class DebugConnectionProvider : DriverConnectionProvider + { + private readonly ISet connections = new ListSet(); + + public override IDbConnection GetConnection() + { + IDbConnection connection = base.GetConnection(); + connections.Add(connection); + return connection; + } + + public override void CloseConnection(IDbConnection conn) + { + base.CloseConnection(conn); + connections.Remove(conn); + } + + public bool HasOpenConnections + { + get + { + // check to see if all connections that were at one point opened + // have been closed through the CloseConnection + // method + if (connections.IsEmpty) + { + // there are no connections, either none were opened or + // all of the closings went through CloseConnection. + return false; + } + else + { + // Disposing of an ISession does not call CloseConnection (should it???) + // so a Diposed of ISession will leave an IDbConnection in the list but + // the IDbConnection will be closed (atleast with MsSql it works this way). + foreach (IDbConnection conn in connections) + { + if (conn.State != ConnectionState.Closed) + { + return true; + } + } + + // all of the connections have been Disposed and were closed that way + // or they were Closed through the CloseConnection method. + return false; + } + } + } + + public void CloseAllConnections() + { + while (!connections.IsEmpty) + { + IEnumerator en = connections.GetEnumerator(); + en.MoveNext(); + CloseConnection(en.Current as IDbConnection); + } + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/NHibernate.ByteCode.Spring.Tests.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/NHibernate.ByteCode.Spring.Tests.csproj (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/NHibernate.ByteCode.Spring.Tests.csproj 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.30729</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{7EFC4549-3761-4B68-B81F-12AA51D78E92}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>NHibernate.ByteCode.Spring.Tests</RootNamespace> + <AssemblyName>NHibernate.ByteCode.Spring.Tests</AssemblyName> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <TargetFrameworkSubset> + </TargetFrameworkSubset> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="antlr.runtime, Version=2.7.6.2, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\antlr.runtime.dll</HintPath> + </Reference> + <Reference Include="Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\Common.Logging.dll</HintPath> + </Reference> + <Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\Iesi.Collections.dll</HintPath> + </Reference> + <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\log4net.dll</HintPath> + </Reference> + <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\nunit.framework.dll</HintPath> + </Reference> + <Reference Include="Spring.Aop, Version=1.2.0.20001, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\Spring.Aop.dll</HintPath> + </Reference> + <Reference Include="Spring.Core, Version=1.2.0.20001, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\lib\net\3.5\Spring.Core.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Data" /> + <Reference Include="System.XML" /> + </ItemGroup> + <ItemGroup> + <Compile Include="AssemblyInfo.cs" /> + <Compile Include="DebugConnectionProvider.cs" /> + <Compile Include="ProxyInterface\IMyProxy.cs" /> + <Compile Include="ProxyInterface\MyProxyImpl.cs" /> + <Compile Include="ProxyInterface\ProxyFixture.cs" /> + <Compile Include="TestCase.cs" /> + <Compile Include="TestConfigurationHelper.cs" /> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="ProxyInterface\ProxyImpl.hbm.xml" /> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + <None Include="ByteCode.Test.build" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\NHibernate.ByteCode.Spring\NHibernate.ByteCode.Spring.csproj"> + <Project>{946BCA10-109A-4472-8521-76616174AD4D}</Project> + <Name>NHibernate.ByteCode.Spring</Name> + </ProjectReference> + <ProjectReference Include="..\NHibernate\NHibernate.csproj"> + <Project>{5909BFE7-93CF-4E5F-BE22-6293368AF01D}</Project> + <Name>NHibernate</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Folder Include="Properties\" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> + <PropertyGroup> + <PostBuildEvent>if exist hibernate.cfg.xml (del hibernate.cfg.xml) +if exist "$(ProjectDir)hibernate.cfg.xml" (copy "$(ProjectDir)hibernate.cfg.xml" "hibernate.cfg.xml")</PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Property changes on: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/Properties ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Property changes on: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: svn:ignore + obj .#* *.user *.xsx AssemblyInfo.cs *.aps *.eto [Bb]in [Dd]ebug [Rr]elease *resharper* Added: bugtraq:logregex + NH-\d+ Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/IMyProxy.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/IMyProxy.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/IMyProxy.cs 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,11 @@ +namespace NHibernate.ByteCode.Spring.Tests.ProxyInterface +{ + public interface IMyProxy + { + int Id { get; set; } + + string Name { get; set; } + + void ThrowDeepException(); + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/MyProxyImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/MyProxyImpl.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/MyProxyImpl.cs 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,30 @@ +using System; + +namespace NHibernate.ByteCode.Spring.Tests.ProxyInterface +{ + public class MyProxyImpl: IMyProxy + { + private static void Level1() + { + Level2(); + } + + private static void Level2() + { + throw new ArgumentException("thrown from Level2"); + } + + #region IMyProxy Members + + public int Id { get; set; } + + public string Name { get; set; } + + public void ThrowDeepException() + { + Level1(); + } + + #endregion + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/ProxyFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/ProxyFixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/ProxyFixture.cs 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,137 @@ +using System; +using System.Collections; +using System.IO; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters.Binary; +using NUnit.Framework; + +namespace NHibernate.ByteCode.Spring.Tests.ProxyInterface +{ + [TestFixture] + public class ProxyFixture : TestCase + { + protected override IList Mappings + { + get { return new[] {"ProxyInterface.ProxyImpl.hbm.xml"}; } + } + + private void SerializeAndDeserialize(ref ISession s) + { + // Serialize the session + using (Stream stream = new MemoryStream()) + { + IFormatter formatter = new BinaryFormatter(); + formatter.Serialize(stream, s); + + // Close the original session + s.Close(); + + // Deserialize the session + stream.Position = 0; + s = (ISession) formatter.Deserialize(stream); + } + } + + [Test] + public void Proxy() + { + ISession s = OpenSession(); + IMyProxy ap = new MyProxyImpl {Id = 1, Name = "first proxy"}; + s.Save(ap); + s.Flush(); + s.Close(); + + s = OpenSession(); + ap = (IMyProxy) s.Load(typeof (MyProxyImpl), ap.Id); + Assert.IsFalse(NHibernateUtil.IsInitialized(ap)); + int id = ap.Id; + Assert.IsFalse(NHibernateUtil.IsInitialized(ap), "get id should not have initialized it."); + string name = ap.Name; + Assert.IsTrue(NHibernateUtil.IsInitialized(ap), "get name should have initialized it."); + s.Delete(ap); + s.Flush(); + s.Close(); + } + + [Test] + public void ExceptionStackTrace() + { + ISession s = OpenSession(); + IMyProxy ap = new MyProxyImpl {Id = 1, Name = "first proxy"}; + s.Save(ap); + s.Flush(); + s.Close(); + + s = OpenSession(); + ap = (IMyProxy) s.Load(typeof (MyProxyImpl), ap.Id); + Assert.IsFalse(NHibernateUtil.IsInitialized(ap), "check we have a proxy"); + + try + { + ap.ThrowDeepException(); + Assert.Fail("Exception not thrown"); + } + catch (ArgumentException ae) + { + Assert.AreEqual("thrown from Level2", ae.Message); + + string[] stackTraceLines = ae.StackTrace.Split('\n'); + Assert.IsTrue(stackTraceLines[0].Contains("Level2"), "top of exception stack is Level2()"); + Assert.IsTrue(stackTraceLines[1].Contains("Level1"), "next on exception stack is Level1()"); + } + finally + { + s.Delete(ap); + s.Flush(); + s.Close(); + } + } + + [Test] + public void ProxySerialize() + { + ISession s = OpenSession(); + IMyProxy ap = new MyProxyImpl {Id = 1, Name = "first proxy"}; + s.Save(ap); + s.Flush(); + s.Close(); + + s = OpenSession(); + ap = (IMyProxy) s.Load(typeof (MyProxyImpl), ap.Id); + Assert.AreEqual(1, ap.Id); + s.Disconnect(); + + SerializeAndDeserialize(ref s); + + s.Reconnect(); + s.Disconnect(); + + // serialize and then deserialize the session again - make sure Castle.DynamicProxy + // has no problem with serializing two times - earlier versions of it did. + SerializeAndDeserialize(ref s); + + s.Close(); + + s = OpenSession(); + s.Delete(ap); + s.Flush(); + s.Close(); + } + + [Test] + public void SerializeNotFoundProxy() + { + ISession s = OpenSession(); + // this does not actually exists in db + var notThere = (IMyProxy) s.Load(typeof (MyProxyImpl), 5); + Assert.AreEqual(5, notThere.Id); + s.Disconnect(); + + // serialize and then deserialize the session. + SerializeAndDeserialize(ref s); + + Assert.IsNotNull(s.Load(typeof (MyProxyImpl), 5), "should be proxy - even though it doesn't exists in db"); + s.Close(); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/ProxyImpl.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/ProxyImpl.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/ProxyInterface/ProxyImpl.hbm.xml 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + assembly="NHibernate.ByteCode.Spring.Tests" + namespace="NHibernate.ByteCode.Spring.Tests.ProxyInterface"> + <class name="MyProxyImpl" proxy="IMyProxy"> + <id name="Id"> + <generator class="assigned" /> + </id> + + <property name="Name" /> + </class> +</hibernate-mapping> \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/TestCase.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/TestCase.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/TestCase.cs 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,323 @@ +using System; +using System.Collections; +using System.Data; +using System.Reflection; +using log4net; +using log4net.Config; +using NHibernate.Cfg; +using NHibernate.Connection; +using NHibernate.Engine; +using NHibernate.Mapping; +using NHibernate.Tool.hbm2ddl; +using NHibernate.Type; +using NUnit.Framework; + +namespace NHibernate.ByteCode.Spring.Tests +{ + public abstract class TestCase + { + private const bool OutputDdl = false; + protected Configuration cfg; + protected ISessionFactoryImplementor sessions; + + private static readonly ILog log = LogManager.GetLogger(typeof(TestCase)); + + protected Dialect.Dialect Dialect + { + get { return NHibernate.Dialect.Dialect.GetDialect(cfg.Properties); } + } + + protected ISession lastOpenedSession; + private DebugConnectionProvider connectionProvider; + + /// <summary> + /// Mapping files used in the TestCase + /// </summary> + protected abstract IList Mappings { get; } + + /// <summary> + /// Assembly to load mapping files from (default is NHibernate.DomainModel). + /// </summary> + protected virtual string MappingsAssembly + { + get { return typeof(TestCase).Namespace; } + } + + static TestCase() + { + // Configure log4net here since configuration through an attribute doesn't always work. + XmlConfigurator.Configure(); + } + + /// <summary> + /// Creates the tables used in this TestCase + /// </summary> + [TestFixtureSetUp] + public void TestFixtureSetUp() + { + try + { + Configure(); + if (!AppliesTo(Dialect)) + { + Assert.Ignore(GetType() + " does not apply to " + Dialect); + } + + CreateSchema(); + BuildSessionFactory(); + } + catch (Exception e) + { + log.Error("Error while setting up the test fixture", e); + throw; + } + } + + /// <summary> + /// Removes the tables used in this TestCase. + /// </summary> + /// <remarks> + /// If the tables are not cleaned up sometimes SchemaExport runs into + /// Sql errors because it can't drop tables because of the FKs. This + /// will occur if the TestCase does not have the same hbm.xml files + /// included as a previous one. + /// </remarks> + [TestFixtureTearDown] + public void TestFixtureTearDown() + { + DropSchema(); + Cleanup(); + } + + protected virtual void OnSetUp() + { + } + + /// <summary> + /// Set up the test. This method is not overridable, but it calls + /// <see cref="OnSetUp" /> which is. + /// </summary> + [SetUp] + public void SetUp() + { + OnSetUp(); + } + + protected virtual void OnTearDown() + { + } + + /// <summary> + /// Checks that the test case cleans up after itself. This method + /// is not overridable, but it calls <see cref="OnTearDown" /> which is. + /// </summary> + [TearDown] + public void TearDown() + { + OnTearDown(); + + bool wasClosed = CheckSessionWasClosed(); + bool wasCleaned = CheckDatabaseWasCleaned(); + bool wereConnectionsClosed = CheckConnectionsWereClosed(); + bool fail = !wasClosed || !wasCleaned || !wereConnectionsClosed; + + if (fail) + { + Assert.Fail("Test didn't clean up after itself"); + } + } + + private bool CheckSessionWasClosed() + { + if (lastOpenedSession != null && lastOpenedSession.IsOpen) + { + log.Error("Test case didn't close a session, closing"); + lastOpenedSession.Close(); + return false; + } + + return true; + } + + private bool CheckDatabaseWasCleaned() + { + if (sessions.GetAllClassMetadata().Count == 0) + { + // Return early in the case of no mappings, also avoiding + // a warning when executing the HQL below. + return true; + } + + bool empty; + using (ISession s = sessions.OpenSession()) + { + IList objects = s.CreateQuery("from System.Object o").List(); + empty = objects.Count == 0; + } + + if (!empty) + { + log.Error("Test case didn't clean up the database after itself, re-creating the schema"); + DropSchema(); + CreateSchema(); + } + + return empty; + } + + private bool CheckConnectionsWereClosed() + { + if (connectionProvider == null || !connectionProvider.HasOpenConnections) + { + return true; + } + + log.Error("Test case didn't close all open connections, closing"); + connectionProvider.CloseAllConnections(); + return false; + } + + private void Configure() + { + cfg = new Configuration(); + if (TestConfigurationHelper.hibernateConfigFile != null) + cfg.Configure(TestConfigurationHelper.hibernateConfigFile); + + Assembly assembly = Assembly.Load(MappingsAssembly); + + foreach (string file in Mappings) + { + cfg.AddResource(MappingsAssembly + "." + file, assembly); + } + + Configure(cfg); + + ApplyCacheSettings(cfg); + } + + private void CreateSchema() + { + new SchemaExport(cfg).Create(OutputDdl, true); + } + + private void DropSchema() + { + new SchemaExport(cfg).Drop(OutputDdl, true); + } + + protected virtual void BuildSessionFactory() + { + sessions = (ISessionFactoryImplementor)cfg.BuildSessionFactory(); + connectionProvider = sessions.ConnectionProvider as DebugConnectionProvider; + } + + private void Cleanup() + { + sessions.Close(); + sessions = null; + connectionProvider = null; + lastOpenedSession = null; + cfg = null; + } + + public int ExecuteStatement(string sql) + { + if (cfg == null) + { + cfg = new Configuration(); + } + + using (IConnectionProvider prov = ConnectionProviderFactory.NewConnectionProvider(cfg.Properties)) + { + IDbConnection conn = prov.GetConnection(); + + try + { + using (IDbTransaction tran = conn.BeginTransaction()) + using (IDbCommand comm = conn.CreateCommand()) + { + comm.CommandText = sql; + comm.Transaction = tran; + comm.CommandType = CommandType.Text; + int result = comm.ExecuteNonQuery(); + tran.Commit(); + return result; + } + } + finally + { + prov.CloseConnection(conn); + } + } + } + + protected ISessionFactoryImplementor Sfi + { + get { return sessions; } + } + + protected virtual ISession OpenSession() + { + lastOpenedSession = sessions.OpenSession(); + return lastOpenedSession; + } + + protected virtual ISession OpenSession(IInterceptor sessionLocalInterceptor) + { + lastOpenedSession = sessions.OpenSession(sessionLocalInterceptor); + return lastOpenedSession; + } + + protected void ApplyCacheSettings(Configuration configuration) + { + if (CacheConcurrencyStrategy == null) + { + return; + } + + foreach (PersistentClass clazz in configuration.ClassMappings) + { + bool hasLob = false; + foreach (Property prop in clazz.PropertyClosureIterator) + { + if (prop.Value.IsSimpleValue) + { + IType type = ((SimpleValue)prop.Value).Type; + if (type == NHibernateUtil.BinaryBlob) + { + hasLob = true; + } + } + } + if (!hasLob && !clazz.IsInherited) + { + configuration.SetCacheConcurrencyStrategy(clazz.EntityName, CacheConcurrencyStrategy); + } + } + + foreach (Mapping.Collection coll in configuration.CollectionMappings) + { + configuration.SetCollectionCacheConcurrencyStrategy(coll.Role, CacheConcurrencyStrategy); + } + } + + #region Properties overridable by subclasses + + protected virtual bool AppliesTo(Dialect.Dialect dialect) + { + return true; + } + + protected virtual void Configure(Configuration configuration) + { + } + + protected virtual string CacheConcurrencyStrategy + { + get { return "nonstrict-read-write"; } + //get { return null; } + } + + #endregion + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/TestConfigurationHelper.cs =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/TestConfigurationHelper.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Spring.Tests/TestConfigurationHelper.cs 2009-03-03 19:55:08 UTC (rev 4106) @@ -0,0 +1,40 @@ +using System; +using System.IO; +using NHibernate.Cfg; + +namespace NHibernate.ByteCode.Spring.Tests +{ + public static class TestConfigurationHelper + { + public static readonly string hibernateConfigFile; + + static TestConfigurationHelper() + { + // Verify if hibernate.cfg.xml exists + hibernateConfigFile = GetDefaultConfigurationFilePath(); + } + + public static string GetDefaultConfigurationFilePath() + { + string baseDir = AppDomain.CurrentDomain.BaseDirectory; + string relativeSearchPath = AppDomain.CurrentDomain.RelativeSearchPath; + string binPath = relativeSearchPath == null ? baseDir : Path.Combine(baseDir, relativeSearchPath); + string fullPath = Path.Combine(binPath, Configuration.DefaultHibernateCfgFileName); + return File.Exists(fullPath) ? fullPath : null; + } + + /// <summary> + /// Standard Configuration for tests. + /// </summary> + /// <returns>The configuration using merge between App.Config and hibernate.cfg.xml if present.</returns> + public static Configuration GetDefaultConfiguration() + { + var result = new Configuration(); + if (hibernateConfigFile != null) + { + result.Configure(hibernateConfigFile); + } + return result; + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Everything.sln =================================================================== --- trunk/nhibernate/src/NHibernate.Everything.sln 2009-03-03 07:06:19 UTC (rev 4105) +++ trunk/nhibernate/src/NHibernate.Everything.sln 2009-03-03 19:55:08 UTC (rev 4106) @@ -109,6 +109,10 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.ByteCode.LinFu.Tests", "NHibernate.ByteCode.LinFu.Tests\NHibernate.ByteCode.LinFu.Tests.csproj", "{94FDD99B-8275-4E51-8F43-958B2C632120}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.ByteCode.Spring", "NHibernate.ByteCode.Spring\NHibernate.ByteCode.Spring.csproj", "{946BCA10-109A-4472-8521-76616174AD4D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.ByteCode.Spring.Tests", "NHibernate.ByteCode.Spring.Tests\NHibernate.ByteCode.Spring.Tests.csproj", "{7EFC4549-3761-4B68-B81F-12AA51D78E92}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|.NET = Debug|.NET @@ -250,6 +254,26 @@ {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|Any CPU.Build.0 = Release|Any CPU {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {94FDD99B-8275-4E51-8F43-958B2C632120}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {946BCA10-109A-4472-8521-76616174AD4D}.Debug|.NET.ActiveCfg = Debug|Any CPU + {946BCA10-109A-4472-8521-76616174AD4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {946BCA10-109A-4472-8521-76616174AD4D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {946BCA10-109A-4472-8521-76616174AD4D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {946BCA10-109A-4472-8521-76616174AD4D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {946BCA10-109A-4472-8521-76616174AD4D}.Release|.NET.ActiveCfg = Release|Any CPU + {946BCA10-109A-4472-8521-76616174AD4D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {946BCA10-109A-4472-8521-76616174AD4D}.Release|Any CPU.Build.0 = Release|Any CPU + {946BCA10-109A-4472-8521-76616174AD4D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {946BCA10-109A-4472-8521-76616174AD4D}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Debug|.NET.ActiveCfg = Debug|Any CPU + {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Release|.NET.ActiveCfg = Release|Any CPU + {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Release|Any CPU.Build.0 = Release|Any CPU + {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {7EFC4549-3761-4B68-B81F-12AA51D78E92}.Release|Mixed Platforms.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -270,10 +294,12 @@ {446E148D-A9D5-4D7D-A706-BEDD45B2BC7D} = {92509065-DAEA-4457-8300-C7B64CD0E9F4} {4C251E3E-6EA1-4A51-BBCB-F9C42AE55344} = {C91E7018-3C67-4830-963A-C388C75E1BD5} {58CE4584-31B9-4E74-A7FB-5D40BFAD0876} = {C91E7018-3C67-4830-963A-C388C75E1BD5} + {31C3F0EA-0FED-4A2F-B68D-96CE29844487} = {D2E4E87F-2531-4C7A-BBE9-FE8BFEDECECE} {4972EE96-2417-4D47-9FF1-3B1D6B1D3191} = {D2E4E87F-2531-4C7A-BBE9-FE8BFEDECECE} {8289D6AD-9714-42D3-A94D-D4D9814D1281} = {D2E4E87F-2531-4C7A-BBE9-FE8BFEDECECE} {94FDD99B-8275-4E51-8F43-958B2C632120} = {D2E4E87F-2531-4C7A-BBE9-FE8BFEDECECE} - {31C3F0EA-0FED-4A2F-B68D-96CE29844487} = {D2E4E87F-2531-4C7A-BBE9-FE8BFEDECECE} + {946BCA10-109A-4472-8521-76616174AD4D} = {D2E4E87F-2531-4C7A-BBE9-FE8BFEDECECE} + {7EFC4549-3761-4B68-B81F-12AA51D78E92} = {D2E4E87F-2531-4C7A-BBE9-FE8BFEDECECE} EndGlobalSection GlobalSection(TextTemplating) = postSolution TextTemplating = 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-03-03 07:06:26
|
Revision: 4105 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4105&view=rev Author: tehlike Date: 2009-03-03 07:06:19 +0000 (Tue, 03 Mar 2009) Log Message: ----------- Reverting rev 4104 for further investigation Revision Links: -------------- http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4104&view=rev Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Loader/AbstractEntityJoinWalker.cs trunk/nhibernate/src/NHibernate/Loader/Collection/BasicCollectionJoinWalker.cs trunk/nhibernate/src/NHibernate/Loader/Collection/OneToManyJoinWalker.cs trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Removed Paths: ------------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/ Property Changed: ---------------- trunk/nhibernate/src/NHibernate/EntityModeEqualityComparer.cs trunk/nhibernate/src/NHibernate/Id/TriggerIdentityGenerator.cs trunk/nhibernate/src/NHibernate/Tool/hbm2ddl/SchemaValidator.cs trunk/nhibernate/src/NHibernate/Type/AbstractBinaryType.cs trunk/nhibernate/src/NHibernate.Test/Generatedkeys/Identity/MyEntityIdentity.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Evicting/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Evicting/Employee.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Evicting/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Evicting/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1349/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1443/AclassWithNothing.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1521/AclassWithDefault.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1521/AclassWithNothing.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1521/AclassWithSpecific.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1521/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1549/CategoryWithInheritedId.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1549/ProductWithInheritedId.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1587/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1632/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1632/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1632/Model.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1665/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Fixture.cs trunk/nhibernate/src/NHibernate.Test/SqlTest/Custom/Firebird/FireBirdEmployment.hbm.xml trunk/nhibernate/src/NHibernate.Test/SqlTest/Custom/Firebird/FireBirdTest.cs trunk/nhibernate/src/NHibernate.Test/SqlTest/Custom/MsSQL/MSSQLEmployment.hbm.xml trunk/nhibernate/src/NHibernate.Test/SqlTest/Custom/MsSQL/MSSQLTest.cs trunk/nhibernate/src/NHibernate.Test/SqlTest/Custom/MySQL/MySQLEmployment.hbm.xml trunk/nhibernate/src/NHibernate.Test/SqlTest/Identity/IdentityInsertWithStoredProcsTest.cs trunk/nhibernate/src/NHibernate.Test/SqlTest/Identity/MsSQL/MSSQLIdentityInsertWithStoredProcs.hbm.xml trunk/nhibernate/src/NHibernate.Test/SqlTest/Identity/MsSQL/MSSQLIdentityInsertWithStoredProcsTest.cs trunk/nhibernate/src/NHibernate.Test/SqlTest/Query/Item.cs trunk/nhibernate/src/NHibernate.Test/SqlTest/Query/Item.hbm.xml trunk/nhibernate/src/NHibernate.Test/SqlTest/Query/NativeSQLQueries.hbm.xml trunk/nhibernate/src/NHibernate.Test/SqlTest/Query/NativeSQLQueriesFixture.cs trunk/nhibernate/src/NHibernate.Test/SqlTest/Query/SelfReferencingCollectionLoadTest.cs trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaUpdate/ trunk/nhibernate/src/NHibernate.Test/TypesTest/GenericEnumStringClass.hbm.xml trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/GeneratedBinaryVersionFixture.cs trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/SimpleVersioned.cs trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/SimpleVersioned.hbm.xml Property changes on: trunk/nhibernate/src/NHibernate/EntityModeEqualityComparer.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate/Id/TriggerIdentityGenerator.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: trunk/nhibernate/src/NHibernate/Loader/AbstractEntityJoinWalker.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/AbstractEntityJoinWalker.cs 2009-03-02 19:46:38 UTC (rev 4104) +++ trunk/nhibernate/src/NHibernate/Loader/AbstractEntityJoinWalker.cs 2009-03-03 07:06:19 UTC (rev 4105) @@ -44,7 +44,7 @@ SqlString orderByString, string groupByString, SqlString havingString, LockMode lockMode) { WalkEntityTree(persister, Alias); - this.Persisters = new ILoadable[0]; + Persisters = new ILoadable[0]; InitStatementString(projectionString, whereString, orderByString, groupByString, havingString, lockMode); } @@ -57,12 +57,12 @@ SqlString orderBy,string groupBy, SqlString having, LockMode lockMode) { int joins = CountEntityPersisters(associations); - this.Suffixes = BasicLoader.GenerateSuffixes(joins + 1); + Suffixes = BasicLoader.GenerateSuffixes(joins + 1); JoinFragment ojf = MergeOuterJoins(associations); SqlString selectClause = projection ?? - new SqlString(persister.SelectFragment(alias, this.Suffixes[joins]) + SelectString(associations)); + new SqlString(persister.SelectFragment(alias, Suffixes[joins]) + SelectString(associations)); SqlSelectBuilder select = new SqlSelectBuilder(Factory) .SetLockMode(lockMode) Modified: trunk/nhibernate/src/NHibernate/Loader/Collection/BasicCollectionJoinWalker.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/Collection/BasicCollectionJoinWalker.cs 2009-03-02 19:46:38 UTC (rev 4104) +++ trunk/nhibernate/src/NHibernate/Loader/Collection/BasicCollectionJoinWalker.cs 2009-03-03 07:06:19 UTC (rev 4105) @@ -40,8 +40,8 @@ { int joins = CountEntityPersisters(associations); int collectionJoins = CountCollectionPersisters(associations) + 1; - this.Suffixes = BasicLoader.GenerateSuffixes(joins); - this.CollectionSuffixes = BasicLoader.GenerateSuffixes(joins, collectionJoins); + Suffixes = BasicLoader.GenerateSuffixes(joins); + CollectionSuffixes = BasicLoader.GenerateSuffixes(joins, collectionJoins); SqlStringBuilder whereString = WhereString(alias, collectionPersister.KeyColumnNames, subquery, batchSize); @@ -72,7 +72,7 @@ SqlSelectBuilder select = new SqlSelectBuilder(Factory) - .SetSelectClause(collectionPersister.SelectFragment(alias, this.CollectionSuffixes[0]) + .SetSelectClause(collectionPersister.SelectFragment(alias, CollectionSuffixes[0]) + SelectString(associations)) .SetFromClause(collectionPersister.TableName, alias) .SetWhereClause(whereString.ToSqlString()) Modified: trunk/nhibernate/src/NHibernate/Loader/Collection/OneToManyJoinWalker.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/Collection/OneToManyJoinWalker.cs 2009-03-02 19:46:38 UTC (rev 4104) +++ trunk/nhibernate/src/NHibernate/Loader/Collection/OneToManyJoinWalker.cs 2009-03-03 07:06:19 UTC (rev 4105) @@ -45,29 +45,26 @@ private void InitStatementString(IOuterJoinLoadable elementPersister, string alias, int batchSize, SqlString subquery) { int joins = CountEntityPersisters(associations); - this.Suffixes = BasicLoader.GenerateSuffixes(joins + 1); + Suffixes = BasicLoader.GenerateSuffixes(joins + 1); int collectionJoins = CountCollectionPersisters(associations) + 1; - this.CollectionSuffixes = BasicLoader.GenerateSuffixes(joins + 1, collectionJoins); + CollectionSuffixes = BasicLoader.GenerateSuffixes(joins + 1, collectionJoins); SqlStringBuilder whereString = WhereString(alias, oneToManyPersister.KeyColumnNames, subquery, batchSize); - string filter = oneToManyPersister.FilterFragment(alias, EnabledFilters); whereString.Insert(0, StringHelper.MoveAndToBeginning(filter)); - whereString.Add(elementPersister.FilterFragment(alias, new CollectionHelper.EmptyMapClass<string, IFilter>())); + JoinFragment ojf = MergeOuterJoins(associations); SqlSelectBuilder select = - new SqlSelectBuilder(Factory) - .SetSelectClause( - oneToManyPersister.SelectFragment(null, null, alias, this.Suffixes[joins], this.CollectionSuffixes[0], true) - + SelectString(associations)) - .SetFromClause(elementPersister.FromTableFragment(alias) - + elementPersister.FromJoinFragment(alias, true, true)) - .SetWhereClause(whereString.ToSqlString()) - .SetOuterJoins(ojf.ToFromFragmentString, - ojf.ToWhereFragmentString + elementPersister.WhereJoinFragment(alias, true, true)) - .SetOrderByClause(OrderBy(associations, oneToManyPersister.GetSQLOrderByString(alias))); + new SqlSelectBuilder(Factory).SetSelectClause( + oneToManyPersister.SelectFragment(null, null, alias, Suffixes[joins], CollectionSuffixes[0], true) + + SelectString(associations)).SetFromClause(elementPersister.FromTableFragment(alias) + + elementPersister.FromJoinFragment(alias, true, true)).SetWhereClause( + whereString.ToSqlString()).SetOuterJoins(ojf.ToFromFragmentString, + ojf.ToWhereFragmentString + + elementPersister.WhereJoinFragment(alias, true, true)); + select.SetOrderByClause(OrderBy(associations, oneToManyPersister.GetSQLOrderByString(alias))); if (Factory.Settings.IsCommentsEnabled) { Modified: trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs 2009-03-02 19:46:38 UTC (rev 4104) +++ trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs 2009-03-03 07:06:19 UTC (rev 4105) @@ -19,26 +19,77 @@ private readonly ISet<AssociationKey> visitedAssociationKeys = new HashedSet<AssociationKey>(); private readonly IDictionary<string, IFilter> enabledFilters; - public string[] CollectionSuffixes { get; set; } + private string[] suffixes; + private string[] collectionSuffixes; + private ILoadable[] persisters; + private int[] owners; + private EntityType[] ownerAssociationTypes; + private ICollectionPersister[] collectionPersisters; + private int[] collectionOwners; + private string[] aliases; + private LockMode[] lockModeArray; + private SqlString sql; - public LockMode[] LockModeArray { get; set; } + public string[] CollectionSuffixes + { + get { return collectionSuffixes; } + set { collectionSuffixes = value; } + } - public string[] Suffixes { get; set; } + public LockMode[] LockModeArray + { + get { return lockModeArray; } + set { lockModeArray = value; } + } - public string[] Aliases { get; set; } + public string[] Suffixes + { + get { return suffixes; } + set { suffixes = value; } + } - public int[] CollectionOwners { get; set; } + public string[] Aliases + { + get { return aliases; } + set { aliases = value; } + } - public ICollectionPersister[] CollectionPersisters { get; set; } + public int[] CollectionOwners + { + get { return collectionOwners; } + set { collectionOwners = value; } + } - public EntityType[] OwnerAssociationTypes { get; set; } + public ICollectionPersister[] CollectionPersisters + { + get { return collectionPersisters; } + set { collectionPersisters = value; } + } - public int[] Owners { get; set; } + public EntityType[] OwnerAssociationTypes + { + get { return ownerAssociationTypes; } + set { ownerAssociationTypes = value; } + } - public ILoadable[] Persisters { get; set; } + public int[] Owners + { + get { return owners; } + set { owners = value; } + } - public SqlString SqlString { get; set; } + public ILoadable[] Persisters + { + get { return persisters; } + set { persisters = value; } + } + public SqlString SqlString + { + get { return sql; } + set { sql = value; } + } + protected ISessionFactoryImplementor Factory { get { return factory; } @@ -657,15 +708,15 @@ int joins = CountEntityPersisters(associations); int collections = CountCollectionPersisters(associations); - this.CollectionOwners = collections == 0 ? null : new int[collections]; - this.CollectionPersisters = collections == 0 ? null : new ICollectionPersister[collections]; - this.CollectionSuffixes = BasicLoader.GenerateSuffixes(joins + 1, collections); + collectionOwners = collections == 0 ? null : new int[collections]; + collectionPersisters = collections == 0 ? null : new ICollectionPersister[collections]; + collectionSuffixes = BasicLoader.GenerateSuffixes(joins + 1, collections); - this.Persisters = new ILoadable[joins]; - this.Aliases = new String[joins]; - this.Owners = new int[joins]; - this.OwnerAssociationTypes = new EntityType[joins]; - this.LockModeArray = ArrayHelper.FillArray(lockMode, joins); + persisters = new ILoadable[joins]; + aliases = new String[joins]; + owners = new int[joins]; + ownerAssociationTypes = new EntityType[joins]; + lockModeArray = ArrayHelper.FillArray(lockMode, joins); int i = 0; int j = 0; @@ -674,10 +725,10 @@ { if (!oj.IsCollection) { - this.Persisters[i] = (ILoadable)oj.Joinable; - this.Aliases[i] = oj.RHSAlias; - this.Owners[i] = oj.GetOwner(associations); - this.OwnerAssociationTypes[i] = (EntityType)oj.JoinableType; + persisters[i] = (ILoadable)oj.Joinable; + aliases[i] = oj.RHSAlias; + owners[i] = oj.GetOwner(associations); + ownerAssociationTypes[i] = (EntityType)oj.JoinableType; i++; } else @@ -687,25 +738,25 @@ if (oj.JoinType == JoinType.LeftOuterJoin) { //it must be a collection fetch - this.CollectionPersisters[j] = collPersister; - this.CollectionOwners[j] = oj.GetOwner(associations); + collectionPersisters[j] = collPersister; + collectionOwners[j] = oj.GetOwner(associations); j++; } if (collPersister.IsOneToMany) { - this.Persisters[i] = (ILoadable)collPersister.ElementPersister; - this.Aliases[i] = oj.RHSAlias; + persisters[i] = (ILoadable)collPersister.ElementPersister; + aliases[i] = oj.RHSAlias; i++; } } } - if (ArrayHelper.IsAllNegative(this.Owners)) - this.Owners = null; + if (ArrayHelper.IsAllNegative(owners)) + owners = null; - if (this.CollectionOwners != null && ArrayHelper.IsAllNegative(this.CollectionOwners)) - this.CollectionOwners = null; + if (collectionOwners != null && ArrayHelper.IsAllNegative(collectionOwners)) + collectionOwners = null; } /// <summary> @@ -731,11 +782,11 @@ OuterJoinableAssociation next = (i == associations.Count - 1) ? null : associations[i + 1]; IJoinable joinable = join.Joinable; - string entitySuffix = (this.Suffixes == null || entityAliasCount >= this.Suffixes.Length) ? null : this.Suffixes[entityAliasCount]; + string entitySuffix = (suffixes == null || entityAliasCount >= suffixes.Length) ? null : suffixes[entityAliasCount]; - string collectionSuffix = (this.CollectionSuffixes == null || collectionAliasCount >= this.CollectionSuffixes.Length) + string collectionSuffix = (collectionSuffixes == null || collectionAliasCount >= collectionSuffixes.Length) ? null - : this.CollectionSuffixes[collectionAliasCount]; + : collectionSuffixes[collectionAliasCount]; string selectFragment = joinable.SelectFragment(next == null ? null : next.Joinable, next == null ? null : next.RHSAlias, join.RHSAlias, Property changes on: trunk/nhibernate/src/NHibernate/Tool/hbm2ddl/SchemaValidator.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate/Type/AbstractBinaryType.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/Generatedkeys/Identity/MyEntityIdentity.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Evicting ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Evicting/Employee.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Evicting/Fixture.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Evicting/Mappings.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1349 ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1443/AclassWithNothing.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1521/AclassWithDefault.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1521/AclassWithNothing.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1521/AclassWithSpecific.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1521/Fixture.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1549/CategoryWithInheritedId.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1549/ProductWithInheritedId.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1587/Mappings.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1632/Fixture.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1632/Mappings.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1632/Model.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1665 ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Fixture.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-02 19:46:38 UTC (rev 4104) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-03 07:06:19 UTC (rev 4105) @@ -416,9 +416,6 @@ <Compile Include="NHSpecificTest\NH1289\PurchaseItem.cs" /> <Compile Include="NHSpecificTest\NH1289\PurchaseOrder.cs" /> <Compile Include="NHSpecificTest\NH1289\WorkflowItem.cs" /> - <Compile Include="NHSpecificTest\NH1391\Company.cs" /> - <Compile Include="NHSpecificTest\NH1391\Fixture.cs" /> - <Compile Include="NHSpecificTest\NH1391\Product.cs" /> <Compile Include="NHSpecificTest\NH1665\Fixture.cs" /> <Compile Include="NHSpecificTest\NH1665\MyEntity.cs" /> <Compile Include="NHSpecificTest\NH1443\Fixture.cs" /> @@ -1673,7 +1670,6 @@ <EmbeddedResource Include="Cascade\JobBatch.hbm.xml" /> <EmbeddedResource Include="Deletetransient\Person.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> - <EmbeddedResource Include="NHSpecificTest\NH1391\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1691\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1689\Mappings.hbm.xml" /> <EmbeddedResource Include="VersionTest\Db\MsSQL\SimpleVersioned.hbm.xml" /> Property changes on: trunk/nhibernate/src/NHibernate.Test/SqlTest/Custom/Firebird/FireBirdEmployment.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/SqlTest/Custom/Firebird/FireBirdTest.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/SqlTest/Custom/MsSQL/MSSQLEmployment.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/SqlTest/Custom/MsSQL/MSSQLTest.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/SqlTest/Custom/MySQL/MySQLEmployment.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/SqlTest/Identity/IdentityInsertWithStoredProcsTest.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/SqlTest/Identity/MsSQL/MSSQLIdentityInsertWithStoredProcs.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/SqlTest/Identity/MsSQL/MSSQLIdentityInsertWithStoredProcsTest.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/SqlTest/Query/Item.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/SqlTest/Query/Item.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/SqlTest/Query/NativeSQLQueries.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/SqlTest/Query/NativeSQLQueriesFixture.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/SqlTest/Query/SelfReferencingCollectionLoadTest.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaUpdate ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/TypesTest/GenericEnumStringClass.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/GeneratedBinaryVersionFixture.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/SimpleVersioned.cs ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/SimpleVersioned.hbm.xml ___________________________________________________________________ Deleted: svn:mergeinfo - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-03-02 19:46:46
|
Revision: 4104 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4104&view=rev Author: tehlike Date: 2009-03-02 19:46:38 +0000 (Mon, 02 Mar 2009) Log Message: ----------- Fixing a bug with one-to-many subclass. Fix for NH-1391 Some simplicifactions using automatic properties. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Loader/AbstractEntityJoinWalker.cs trunk/nhibernate/src/NHibernate/Loader/Collection/BasicCollectionJoinWalker.cs trunk/nhibernate/src/NHibernate/Loader/Collection/OneToManyJoinWalker.cs trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Company.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Product.cs Modified: trunk/nhibernate/src/NHibernate/Loader/AbstractEntityJoinWalker.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/AbstractEntityJoinWalker.cs 2009-03-01 23:14:40 UTC (rev 4103) +++ trunk/nhibernate/src/NHibernate/Loader/AbstractEntityJoinWalker.cs 2009-03-02 19:46:38 UTC (rev 4104) @@ -44,7 +44,7 @@ SqlString orderByString, string groupByString, SqlString havingString, LockMode lockMode) { WalkEntityTree(persister, Alias); - Persisters = new ILoadable[0]; + this.Persisters = new ILoadable[0]; InitStatementString(projectionString, whereString, orderByString, groupByString, havingString, lockMode); } @@ -57,12 +57,12 @@ SqlString orderBy,string groupBy, SqlString having, LockMode lockMode) { int joins = CountEntityPersisters(associations); - Suffixes = BasicLoader.GenerateSuffixes(joins + 1); + this.Suffixes = BasicLoader.GenerateSuffixes(joins + 1); JoinFragment ojf = MergeOuterJoins(associations); SqlString selectClause = projection ?? - new SqlString(persister.SelectFragment(alias, Suffixes[joins]) + SelectString(associations)); + new SqlString(persister.SelectFragment(alias, this.Suffixes[joins]) + SelectString(associations)); SqlSelectBuilder select = new SqlSelectBuilder(Factory) .SetLockMode(lockMode) Modified: trunk/nhibernate/src/NHibernate/Loader/Collection/BasicCollectionJoinWalker.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/Collection/BasicCollectionJoinWalker.cs 2009-03-01 23:14:40 UTC (rev 4103) +++ trunk/nhibernate/src/NHibernate/Loader/Collection/BasicCollectionJoinWalker.cs 2009-03-02 19:46:38 UTC (rev 4104) @@ -40,8 +40,8 @@ { int joins = CountEntityPersisters(associations); int collectionJoins = CountCollectionPersisters(associations) + 1; - Suffixes = BasicLoader.GenerateSuffixes(joins); - CollectionSuffixes = BasicLoader.GenerateSuffixes(joins, collectionJoins); + this.Suffixes = BasicLoader.GenerateSuffixes(joins); + this.CollectionSuffixes = BasicLoader.GenerateSuffixes(joins, collectionJoins); SqlStringBuilder whereString = WhereString(alias, collectionPersister.KeyColumnNames, subquery, batchSize); @@ -72,7 +72,7 @@ SqlSelectBuilder select = new SqlSelectBuilder(Factory) - .SetSelectClause(collectionPersister.SelectFragment(alias, CollectionSuffixes[0]) + .SetSelectClause(collectionPersister.SelectFragment(alias, this.CollectionSuffixes[0]) + SelectString(associations)) .SetFromClause(collectionPersister.TableName, alias) .SetWhereClause(whereString.ToSqlString()) Modified: trunk/nhibernate/src/NHibernate/Loader/Collection/OneToManyJoinWalker.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/Collection/OneToManyJoinWalker.cs 2009-03-01 23:14:40 UTC (rev 4103) +++ trunk/nhibernate/src/NHibernate/Loader/Collection/OneToManyJoinWalker.cs 2009-03-02 19:46:38 UTC (rev 4104) @@ -45,26 +45,29 @@ private void InitStatementString(IOuterJoinLoadable elementPersister, string alias, int batchSize, SqlString subquery) { int joins = CountEntityPersisters(associations); - Suffixes = BasicLoader.GenerateSuffixes(joins + 1); + this.Suffixes = BasicLoader.GenerateSuffixes(joins + 1); int collectionJoins = CountCollectionPersisters(associations) + 1; - CollectionSuffixes = BasicLoader.GenerateSuffixes(joins + 1, collectionJoins); + this.CollectionSuffixes = BasicLoader.GenerateSuffixes(joins + 1, collectionJoins); SqlStringBuilder whereString = WhereString(alias, oneToManyPersister.KeyColumnNames, subquery, batchSize); + string filter = oneToManyPersister.FilterFragment(alias, EnabledFilters); whereString.Insert(0, StringHelper.MoveAndToBeginning(filter)); - + whereString.Add(elementPersister.FilterFragment(alias, new CollectionHelper.EmptyMapClass<string, IFilter>())); JoinFragment ojf = MergeOuterJoins(associations); SqlSelectBuilder select = - new SqlSelectBuilder(Factory).SetSelectClause( - oneToManyPersister.SelectFragment(null, null, alias, Suffixes[joins], CollectionSuffixes[0], true) - + SelectString(associations)).SetFromClause(elementPersister.FromTableFragment(alias) - + elementPersister.FromJoinFragment(alias, true, true)).SetWhereClause( - whereString.ToSqlString()).SetOuterJoins(ojf.ToFromFragmentString, - ojf.ToWhereFragmentString - + elementPersister.WhereJoinFragment(alias, true, true)); + new SqlSelectBuilder(Factory) + .SetSelectClause( + oneToManyPersister.SelectFragment(null, null, alias, this.Suffixes[joins], this.CollectionSuffixes[0], true) + + SelectString(associations)) + .SetFromClause(elementPersister.FromTableFragment(alias) + + elementPersister.FromJoinFragment(alias, true, true)) + .SetWhereClause(whereString.ToSqlString()) + .SetOuterJoins(ojf.ToFromFragmentString, + ojf.ToWhereFragmentString + elementPersister.WhereJoinFragment(alias, true, true)) + .SetOrderByClause(OrderBy(associations, oneToManyPersister.GetSQLOrderByString(alias))); - select.SetOrderByClause(OrderBy(associations, oneToManyPersister.GetSQLOrderByString(alias))); if (Factory.Settings.IsCommentsEnabled) { Modified: trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs 2009-03-01 23:14:40 UTC (rev 4103) +++ trunk/nhibernate/src/NHibernate/Loader/JoinWalker.cs 2009-03-02 19:46:38 UTC (rev 4104) @@ -19,77 +19,26 @@ private readonly ISet<AssociationKey> visitedAssociationKeys = new HashedSet<AssociationKey>(); private readonly IDictionary<string, IFilter> enabledFilters; - private string[] suffixes; - private string[] collectionSuffixes; - private ILoadable[] persisters; - private int[] owners; - private EntityType[] ownerAssociationTypes; - private ICollectionPersister[] collectionPersisters; - private int[] collectionOwners; - private string[] aliases; - private LockMode[] lockModeArray; - private SqlString sql; + public string[] CollectionSuffixes { get; set; } - public string[] CollectionSuffixes - { - get { return collectionSuffixes; } - set { collectionSuffixes = value; } - } + public LockMode[] LockModeArray { get; set; } - public LockMode[] LockModeArray - { - get { return lockModeArray; } - set { lockModeArray = value; } - } + public string[] Suffixes { get; set; } - public string[] Suffixes - { - get { return suffixes; } - set { suffixes = value; } - } + public string[] Aliases { get; set; } - public string[] Aliases - { - get { return aliases; } - set { aliases = value; } - } + public int[] CollectionOwners { get; set; } - public int[] CollectionOwners - { - get { return collectionOwners; } - set { collectionOwners = value; } - } + public ICollectionPersister[] CollectionPersisters { get; set; } - public ICollectionPersister[] CollectionPersisters - { - get { return collectionPersisters; } - set { collectionPersisters = value; } - } + public EntityType[] OwnerAssociationTypes { get; set; } - public EntityType[] OwnerAssociationTypes - { - get { return ownerAssociationTypes; } - set { ownerAssociationTypes = value; } - } + public int[] Owners { get; set; } - public int[] Owners - { - get { return owners; } - set { owners = value; } - } + public ILoadable[] Persisters { get; set; } - public ILoadable[] Persisters - { - get { return persisters; } - set { persisters = value; } - } + public SqlString SqlString { get; set; } - public SqlString SqlString - { - get { return sql; } - set { sql = value; } - } - protected ISessionFactoryImplementor Factory { get { return factory; } @@ -708,15 +657,15 @@ int joins = CountEntityPersisters(associations); int collections = CountCollectionPersisters(associations); - collectionOwners = collections == 0 ? null : new int[collections]; - collectionPersisters = collections == 0 ? null : new ICollectionPersister[collections]; - collectionSuffixes = BasicLoader.GenerateSuffixes(joins + 1, collections); + this.CollectionOwners = collections == 0 ? null : new int[collections]; + this.CollectionPersisters = collections == 0 ? null : new ICollectionPersister[collections]; + this.CollectionSuffixes = BasicLoader.GenerateSuffixes(joins + 1, collections); - persisters = new ILoadable[joins]; - aliases = new String[joins]; - owners = new int[joins]; - ownerAssociationTypes = new EntityType[joins]; - lockModeArray = ArrayHelper.FillArray(lockMode, joins); + this.Persisters = new ILoadable[joins]; + this.Aliases = new String[joins]; + this.Owners = new int[joins]; + this.OwnerAssociationTypes = new EntityType[joins]; + this.LockModeArray = ArrayHelper.FillArray(lockMode, joins); int i = 0; int j = 0; @@ -725,10 +674,10 @@ { if (!oj.IsCollection) { - persisters[i] = (ILoadable)oj.Joinable; - aliases[i] = oj.RHSAlias; - owners[i] = oj.GetOwner(associations); - ownerAssociationTypes[i] = (EntityType)oj.JoinableType; + this.Persisters[i] = (ILoadable)oj.Joinable; + this.Aliases[i] = oj.RHSAlias; + this.Owners[i] = oj.GetOwner(associations); + this.OwnerAssociationTypes[i] = (EntityType)oj.JoinableType; i++; } else @@ -738,25 +687,25 @@ if (oj.JoinType == JoinType.LeftOuterJoin) { //it must be a collection fetch - collectionPersisters[j] = collPersister; - collectionOwners[j] = oj.GetOwner(associations); + this.CollectionPersisters[j] = collPersister; + this.CollectionOwners[j] = oj.GetOwner(associations); j++; } if (collPersister.IsOneToMany) { - persisters[i] = (ILoadable)collPersister.ElementPersister; - aliases[i] = oj.RHSAlias; + this.Persisters[i] = (ILoadable)collPersister.ElementPersister; + this.Aliases[i] = oj.RHSAlias; i++; } } } - if (ArrayHelper.IsAllNegative(owners)) - owners = null; + if (ArrayHelper.IsAllNegative(this.Owners)) + this.Owners = null; - if (collectionOwners != null && ArrayHelper.IsAllNegative(collectionOwners)) - collectionOwners = null; + if (this.CollectionOwners != null && ArrayHelper.IsAllNegative(this.CollectionOwners)) + this.CollectionOwners = null; } /// <summary> @@ -782,11 +731,11 @@ OuterJoinableAssociation next = (i == associations.Count - 1) ? null : associations[i + 1]; IJoinable joinable = join.Joinable; - string entitySuffix = (suffixes == null || entityAliasCount >= suffixes.Length) ? null : suffixes[entityAliasCount]; + string entitySuffix = (this.Suffixes == null || entityAliasCount >= this.Suffixes.Length) ? null : this.Suffixes[entityAliasCount]; - string collectionSuffix = (collectionSuffixes == null || collectionAliasCount >= collectionSuffixes.Length) + string collectionSuffix = (this.CollectionSuffixes == null || collectionAliasCount >= this.CollectionSuffixes.Length) ? null - : collectionSuffixes[collectionAliasCount]; + : this.CollectionSuffixes[collectionAliasCount]; string selectFragment = joinable.SelectFragment(next == null ? null : next.Joinable, next == null ? null : next.RHSAlias, join.RHSAlias, Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Company.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Company.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Company.cs 2009-03-02 19:46:38 UTC (rev 4104) @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace NHibernate.Test.NHSpecificTest.NH1391 +{ + public class Company + { + public virtual int Id { get; set; } + public virtual IList<ProductA> Products { get; set; } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Fixture.cs 2009-03-02 19:46:38 UTC (rev 4104) @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Text; +using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; +namespace NHibernate.Test.NHSpecificTest.NH1391 +{ + [TestFixture] + public class Fixture:BugTestCase + { + protected override void OnSetUp() + { + using(var session=OpenSession()) + using(var tran=session.BeginTransaction()) + { + var producta = new ProductA {Name = "producta"}; + var productb = new ProductB {Name = "productb"}; + var company = new Company { Products = new List<ProductA>() }; + company.Products.Add(producta); + producta.Company = company; + productb.Company = company; + session.Save(company); + session.Save(productb); + session.Save(producta); + tran.Commit(); + } + } + protected override void OnTearDown() + { + using (var session = OpenSession()) + using (var tran = session.BeginTransaction()) + { + session.Delete("from Product"); + session.Delete("from Company"); + tran.Commit(); + } + } + + + [Test] + public void Can_discriminate_subclass_on_list_with_lazy_loading() + { + using (var session = OpenSession()) + using (var tran = session.BeginTransaction()) + { + var company = session.Get<Company>(1); + Assert.That(company, Is.Not.Null); + Assert.That(company.Products, Has.Count(1)); + Assert.That(company.Products[0], Is.AssignableFrom(typeof (ProductA))); + tran.Commit(); + } + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Mappings.hbm.xml 2009-03-02 19:46:38 UTC (rev 4104) @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + assembly="NHibernate.Test" + namespace="NHibernate.Test.NHSpecificTest.NH1391"> + + <class name="Product" discriminator-value="0"> + <id name="Id" type="int"> + <generator class="native"/> + </id> + <discriminator column="ProdType" type="int"/> + <property name="Name" type="string"/> + <many-to-one name="Company" column="CompanyId" not-null="true"/> + <subclass name="ProductA" discriminator-value="10"/> + <subclass name="ProductB" discriminator-value="20"/> + </class> + <class name="Company"> + <id name="Id"> + <generator class="native"/> + </id> + <bag name="Products" lazy="true" + inverse="true"> + <key column="CompanyId" /> + <one-to-many class="ProductA"/> + </bag> + </class> +</hibernate-mapping> \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Product.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Product.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1391/Product.cs 2009-03-02 19:46:38 UTC (rev 4104) @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace NHibernate.Test.NHSpecificTest.NH1391 +{ + public class Product + { + public virtual int Id { get; set; } + public virtual string Name { get; set; } + public virtual Company Company { get; set; } + } + public class ProductA:Product + { + + } + public class ProductB:Product + { + + } +} Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-01 23:14:40 UTC (rev 4103) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-02 19:46:38 UTC (rev 4104) @@ -416,6 +416,9 @@ <Compile Include="NHSpecificTest\NH1289\PurchaseItem.cs" /> <Compile Include="NHSpecificTest\NH1289\PurchaseOrder.cs" /> <Compile Include="NHSpecificTest\NH1289\WorkflowItem.cs" /> + <Compile Include="NHSpecificTest\NH1391\Company.cs" /> + <Compile Include="NHSpecificTest\NH1391\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH1391\Product.cs" /> <Compile Include="NHSpecificTest\NH1665\Fixture.cs" /> <Compile Include="NHSpecificTest\NH1665\MyEntity.cs" /> <Compile Include="NHSpecificTest\NH1443\Fixture.cs" /> @@ -1670,6 +1673,7 @@ <EmbeddedResource Include="Cascade\JobBatch.hbm.xml" /> <EmbeddedResource Include="Deletetransient\Person.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH1391\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1691\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1689\Mappings.hbm.xml" /> <EmbeddedResource Include="VersionTest\Db\MsSQL\SimpleVersioned.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-03-01 23:14:46
|
Revision: 4103 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4103&view=rev Author: tehlike Date: 2009-03-01 23:14:40 +0000 (Sun, 01 Mar 2009) Log Message: ----------- Adding test for NH-1307 Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1098/FilterParameterOrderFixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1098/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1098/Model.cs Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1098/FilterParameterOrderFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1098/FilterParameterOrderFixture.cs 2009-03-01 14:23:27 UTC (rev 4102) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1098/FilterParameterOrderFixture.cs 2009-03-01 23:14:40 UTC (rev 4103) @@ -67,6 +67,9 @@ b4.Enabled = true; session.Save( b4 ); + a1.C.Add( a1.Id, "Text1" ); + a1.C.Add( a2.Id, "Text2" ); + session.Flush(); session.Close(); } @@ -118,7 +121,7 @@ Assert.AreEqual( 1, result.Count ); } - [Test, Ignore("Known issue, parameter order is wrong when named and positional parameters are mixed")] + [Test, Ignore( "Known issue, parameter order is wrong when named and positional parameters are mixed" )] public void QueryWithNamedParameters() { ISession session = OpenSession(); @@ -229,5 +232,26 @@ Assert.AreEqual( 1, result.Count ); } + [Test,Ignore("Parameter order is wrong when index is used")] + public void QueryMapElements() + { + IQuery query = OpenSession().CreateQuery( "from A a where a.C[:ValC] = :Text" ); + query.SetInt32( "ValC", 1 ); + query.SetString( "Text", "Text1" ); + + // Query: + // {select a0_.id as id0_, a0_.val_a as val2_0_, a0_.enabled as enabled0_ + // from table_a a0_, table_c c1_ + // where (c1_.text = (?) and a0_.id=c1_.val_a and c1_.val_c = (?) ); } + // Parameter: + // 1) "c1_.text = (?)" [named parameter #2 Text] + // 2) "c1_.val_c = (?)" [named parameter #1 ValC] + // + // => ERROR, parameters are in wrong order: named ValC, named Text + + A a = query.UniqueResult<A>(); + + Assert.AreEqual( a.C[1], "Text1" ); + } } } Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1098/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1098/Mappings.hbm.xml 2009-03-01 14:23:27 UTC (rev 4102) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1098/Mappings.hbm.xml 2009-03-01 23:14:40 UTC (rev 4103) @@ -13,6 +13,12 @@ <property name="ValueA" column="val_a" type="int"/> <property name="Enabled" column="enabled" type="boolean"/> + <map name="C" table="table_c" cascade="all"> + <key column="val_a" /> + <index column="val_c" type="int" /> + <element column="text" type="string" /> + </map> + <filter name="EnabledObjects" condition="enabled = :Enabled" /> </class> @@ -29,7 +35,7 @@ <filter name="EnabledObjects" condition="enabled = :Enabled" /> </class> - + <filter-def name="EnabledObjects"> <filter-param name="Enabled" type="boolean"/> </filter-def> Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1098/Model.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1098/Model.cs 2009-03-01 14:23:27 UTC (rev 4102) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1098/Model.cs 2009-03-01 23:14:40 UTC (rev 4103) @@ -30,6 +30,13 @@ set { enabled = value; } } + public IDictionary<int, string> C + { + get { return c; } + set { c = value; } + } + + private IDictionary<int, string> c = new Dictionary<int,string>(); } class B This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-03-01 14:23:33
|
Revision: 4102 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4102&view=rev Author: fabiomaulo Date: 2009-03-01 14:23:27 +0000 (Sun, 01 Mar 2009) Log Message: ----------- Fix NH-1691 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Persister/Collection/AbstractCollectionPersister.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Domain.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Mappings.hbm.xml Modified: trunk/nhibernate/src/NHibernate/Persister/Collection/AbstractCollectionPersister.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Persister/Collection/AbstractCollectionPersister.cs 2009-02-28 19:42:24 UTC (rev 4101) +++ trunk/nhibernate/src/NHibernate/Persister/Collection/AbstractCollectionPersister.cs 2009-03-01 14:23:27 UTC (rev 4102) @@ -1446,7 +1446,7 @@ if (type.IsComponentType) { - // NH-1612: Recursively add column aliases for nested components to support the selection + // NH-1612+NH-1691: Recursively add column aliases for nested components to support the selection // of individual component properties in native SQL queries. This also seems to provide // a more complete solution to HHH-1019 (http://opensource.atlassian.com/projects/hibernate/browse/HHH-1019) // because it works for <load-collection> and <return-join>. @@ -1458,10 +1458,10 @@ { string name = propertyNames[propertyIndex]; IType propertyType = ct.Subtypes[propertyIndex]; - int propertyColSpan = propertyType.IsComponentType - ? ((IAbstractComponentType) propertyType).PropertyNames.Length - : 1; + int propertyColSpan = 0; + CalcPropertyColumnSpan(propertyType, ref propertyColSpan); + var propertyColumnAliases = new string[propertyColSpan]; var propertyColumnNames = new string[propertyColSpan]; System.Array.Copy(columnAliases, columnIndex, propertyColumnAliases, 0, propertyColSpan); @@ -1473,6 +1473,22 @@ } } + private static void CalcPropertyColumnSpan(IType propertyType, ref int count) + { + if (!propertyType.IsComponentType) + { + count++; + } + else + { + var componentType = (IAbstractComponentType) propertyType; + foreach (var subtype in componentType.Subtypes) + { + CalcPropertyColumnSpan(subtype, ref count); + } + } + } + public int GetSize(object key, ISessionImplementor session) { try Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Domain.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Domain.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Domain.cs 2009-03-01 14:23:27 UTC (rev 4102) @@ -0,0 +1,35 @@ +using System.Collections; + +namespace NHibernate.Test.NHSpecificTest.NH1691 +{ + public class SubComponent + { + public string SubName { get; set; } + public string SubName1 { get; set; } + public SubComponent Nested { get; set; } + } + + public class Component + { + public string Name { get; set; } + public SubComponent SubComponent { get; set; } + } + + public class DeepComponent + { + public string Prop1 { get; set; } + public string Prop2 { get; set; } + public string Prop3 { get; set; } + public string Prop4 { get; set; } + public Component Component { get; set; } + } + + public class Nest + { + public virtual Component Component { get; set; } + public virtual int Id { get; set; } + public string Name { get; set; } + public virtual IList Components { get; set; } + public virtual IList ComplexComponents { get; set; } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Fixture.cs 2009-03-01 14:23:27 UTC (rev 4102) @@ -0,0 +1,115 @@ +using System.Collections; +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.NH1691 +{ + [TestFixture] + public class Fixture : BugTestCase + { + private static Component GetInitializedComponent() + { + var component = new Component(); + var sub1 = new SubComponent(); + var sub2 = new SubComponent(); + component.Name = "Comp1"; + sub1.SubName = "Sub1"; + sub1.SubName1 = "Sub1x"; + + sub2.SubName = "Sub2"; + sub2.SubName1 = "Sub2x"; + + sub1.Nested = sub2; + + component.SubComponent = sub1; + return component; + } + + [Test] + public void ComplexNest() + { + Component comp1 = GetInitializedComponent(); + var nest = new Nest {Name = "NAME", Components = new ArrayList {comp1}}; + var deep1 = new DeepComponent {Prop1 = "PROP1", Prop2 = "PROP2", Prop3 = "PROP3", Prop4 = "PROP4"}; + Component innerComp = GetInitializedComponent(); + deep1.Component = innerComp; + Component innerComp2 = GetInitializedComponent(); + var deep2 = new DeepComponent + {Prop1 = "PROP1", Prop2 = "PROP2", Prop3 = "PROP3", Prop4 = "PROP4", Component = innerComp2}; + + nest.ComplexComponents = new ArrayList {deep1, deep2}; + + object nestId; + using (ISession session = OpenSession()) + { + using (ITransaction transaction = session.BeginTransaction()) + { + session.Save(nest); + transaction.Commit(); + nestId = nest.Id; + } + } + + using (ISession session = OpenSession()) + { + using (ITransaction transaction = session.BeginTransaction()) + { + var loadedNest = session.Load<Nest>(nestId); + transaction.Commit(); + + Assert.AreEqual(2, loadedNest.ComplexComponents.Count); + Assert.IsNotNull(((DeepComponent) loadedNest.ComplexComponents[0]).Component.SubComponent.Nested.SubName1); + Assert.IsNull(((DeepComponent) loadedNest.ComplexComponents[0]).Component.SubComponent.SubName1); + } + } + + using (ISession s = OpenSession()) + { + using (ITransaction t = s.BeginTransaction()) + { + s.Delete("from Nest"); + t.Commit(); + } + } + } + + [Test] + public void NestedComponentCollection() + { + var nest = new Nest {Name = "NAME"}; + Component comp1 = GetInitializedComponent(); + + nest.Components = new ArrayList {comp1}; + + object nestId; + using (ISession session = OpenSession()) + { + using (ITransaction transaction = session.BeginTransaction()) + { + session.Save(nest); + transaction.Commit(); + nestId = nest.Id; + } + } + + using (ISession session = OpenSession()) + { + using (ITransaction transaction = session.BeginTransaction()) + { + var nest2 = session.Load<Nest>(nestId); + transaction.Commit(); + + Assert.IsNotNull(((Component) nest2.Components[0]).SubComponent.Nested.SubName); + } + } + + using (ISession s = OpenSession()) + { + using (ITransaction t = s.BeginTransaction()) + { + s.Delete("from Nest"); + t.Commit(); + } + } + } + } +} \ No newline at end of file Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Fixture.cs ___________________________________________________________________ Added: svn:mergeinfo + Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1691/Mappings.hbm.xml 2009-03-01 14:23:27 UTC (rev 4102) @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + namespace="NHibernate.Test.NHSpecificTest.NH1691" + assembly="NHibernate.Test" + default-lazy="false"> + <class name="Nest"> + <id name="Id"> + <generator class="native"/> + </id> + + <bag name="Components" + access="property" + table="Nest_Components" + cascade="all-delete-orphan" + lazy="false"> + <key column="NestId"/> + <composite-element class="Component"> + <property name="Name" column="Component_Name" /> + <nested-composite-element name="SubComponent" access="property" class="SubComponent"> + <property name="SubName" column="Component_SubComponent_SubName" /> + <property name="SubName1" column="Component_SubComponent_SubName1" /> + <nested-composite-element name="Nested" access="property" class="SubComponent"> + <property name="SubName" column="Component_SubComponent_Nested_SubName" /> + <property name="SubName1" column="Component_SubComponent_Nested_SubName1" /> + </nested-composite-element> + </nested-composite-element> + </composite-element> + </bag> + + <bag name="ComplexComponents" + access="property" + table="Nest_DeepComponents" + cascade="all-delete-orphan" + lazy="false"> + <key column="NestId"/> + <composite-element class="DeepComponent"> + <property name="Prop1" column="DeepComponent_Prop1" /> + <property name="Prop2" column="DeepComponent_Prop2" /> + <property name="Prop3" column="DeepComponent_Prop3" /> + <property name="Prop4" column="DeepComponent_Prop4" /> + <nested-composite-element name="Component" class="Component"> + <property name="Name" column="Component_Name" /> + <nested-composite-element name="SubComponent" access="property" class="SubComponent"> + <property name="SubName" column="Component_SubComponent_SubName" /> + <nested-composite-element name="Nested" access="property" class="SubComponent"> + <property name="SubName" column="Component_SubComponent_Nested_SubName" /> + <property name="SubName1" column="Component_SubComponent_Nested_SubName1" /> + </nested-composite-element> + </nested-composite-element> + </nested-composite-element> + + </composite-element> + </bag> + + </class> +</hibernate-mapping> Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-02-28 19:42:24 UTC (rev 4101) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-03-01 14:23:27 UTC (rev 4102) @@ -634,6 +634,8 @@ <Compile Include="NHSpecificTest\NH1679\Fixture.cs" /> <Compile Include="NHSpecificTest\NH1689\DomainClass.cs" /> <Compile Include="NHSpecificTest\NH1689\SampleTest.cs" /> + <Compile Include="NHSpecificTest\NH1691\Domain.cs" /> + <Compile Include="NHSpecificTest\NH1691\Fixture.cs" /> <Compile Include="NHSpecificTest\NH280\Fixture.cs" /> <Compile Include="NHSpecificTest\NH280\Foo.cs" /> <Compile Include="NHSpecificTest\NH1018\Employee.cs" /> @@ -1668,6 +1670,7 @@ <EmbeddedResource Include="Cascade\JobBatch.hbm.xml" /> <EmbeddedResource Include="Deletetransient\Person.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH1691\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1689\Mappings.hbm.xml" /> <EmbeddedResource Include="VersionTest\Db\MsSQL\SimpleVersioned.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1675\Mappings.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-02-28 19:42:37
|
Revision: 4101 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4101&view=rev Author: tehlike Date: 2009-02-28 19:42:24 +0000 (Sat, 28 Feb 2009) Log Message: ----------- Marking test as non-ignored. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/SampleTest.cs Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/SampleTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/SampleTest.cs 2009-02-28 19:31:56 UTC (rev 4100) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/SampleTest.cs 2009-02-28 19:42:24 UTC (rev 4101) @@ -4,7 +4,7 @@ using Dialect; using NUnit.Framework; - [TestFixture,Ignore] + [TestFixture] public class SampleTest : BugTestCase { protected override void OnSetUp() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2009-02-28 19:31:59
|
Revision: 4100 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4100&view=rev Author: tehlike Date: 2009-02-28 19:31:56 +0000 (Sat, 28 Feb 2009) Log Message: ----------- Fixing problem with accessing Entity method when access strategy is field-camelcase. Fix for NH-1689 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Proxy/Poco/BasicLazyInitializer.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/DomainClass.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/SampleTest.cs Modified: trunk/nhibernate/src/NHibernate/Proxy/Poco/BasicLazyInitializer.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Proxy/Poco/BasicLazyInitializer.cs 2009-02-24 19:34:25 UTC (rev 4099) +++ trunk/nhibernate/src/NHibernate/Proxy/Poco/BasicLazyInitializer.cs 2009-02-28 19:31:56 UTC (rev 4100) @@ -92,7 +92,7 @@ { return IdentityEqualityComparer.Equals(args[0], proxy); } - else if (method.Equals(setIdentifierMethod)) + else if (setIdentifierMethod!=null&&method.Equals(setIdentifierMethod)) { Initialize(); Identifier = args[0]; Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/DomainClass.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/DomainClass.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/DomainClass.cs 2009-02-28 19:31:56 UTC (rev 4100) @@ -0,0 +1,22 @@ + + +namespace NHibernate.Test.NHSpecificTest.NH1689 +{ + using System.Collections.Generic; + + public class DomainClass + { + private int id; + + public virtual int Id + { + get { return id; } + set { id = value; } + } + + public virtual IList<TargetType> GetListOfTargetType<TargetType>(string someArg) + { + return new List<TargetType>(); + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/Mappings.hbm.xml 2009-02-28 19:31:56 UTC (rev 4100) @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" + namespace="NHibernate.Test.NHSpecificTest.NH1689" default-access="field.camelcase"> + <class name="DomainClass"> + <id name="Id"> + <generator class="assigned" /> + </id> + </class> +</hibernate-mapping> \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/SampleTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/SampleTest.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1689/SampleTest.cs 2009-02-28 19:31:56 UTC (rev 4100) @@ -0,0 +1,47 @@ +namespace NHibernate.Test.NHSpecificTest.NH1689 +{ + using System.Collections.Generic; + using Dialect; + using NUnit.Framework; + + [TestFixture,Ignore] + public class SampleTest : BugTestCase + { + protected override void OnSetUp() + { + base.OnSetUp(); + using (ISession session = this.OpenSession()) + { + DomainClass entity = new DomainClass(); + entity.Id = 1; + session.Save(entity); + session.Flush(); + session.Evict(entity); + } + } + + protected override void OnTearDown() + { + base.OnTearDown(); + using (ISession session = this.OpenSession()) + { + string hql = "from System.Object"; + session.Delete(hql); + session.Flush(); + } + } + + [Test] + public void ShouldBeAbleToCallGenericMethod() + { + using (ISession session = this.OpenSession()) + { + DomainClass entity = session.Load<DomainClass>(1); + + IList<string> inputStrings = entity.GetListOfTargetType<string>("arg"); + Assert.That(inputStrings.Count == 0); + } + } + } + +} Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-02-24 19:34:25 UTC (rev 4099) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-02-28 19:31:56 UTC (rev 4100) @@ -632,6 +632,8 @@ <Compile Include="NHSpecificTest\NH1677\Fixture.cs" /> <Compile Include="NHSpecificTest\NH1679\DomainClass.cs" /> <Compile Include="NHSpecificTest\NH1679\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH1689\DomainClass.cs" /> + <Compile Include="NHSpecificTest\NH1689\SampleTest.cs" /> <Compile Include="NHSpecificTest\NH280\Fixture.cs" /> <Compile Include="NHSpecificTest\NH280\Foo.cs" /> <Compile Include="NHSpecificTest\NH1018\Employee.cs" /> @@ -1666,6 +1668,7 @@ <EmbeddedResource Include="Cascade\JobBatch.hbm.xml" /> <EmbeddedResource Include="Deletetransient\Person.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH1689\Mappings.hbm.xml" /> <EmbeddedResource Include="VersionTest\Db\MsSQL\SimpleVersioned.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1675\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1677\Mappings.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Tuna T. <te...@gm...> - 2009-02-24 19:38:35
|
Why is it required? Tuna Toksöz http://tunatoksoz.com http://turkiyealt.net http://twitter.com/tehlike Typos included to enhance the readers attention! On Tue, Feb 24, 2009 at 9:34 PM, <fab...@us...> wrote: > Revision: 4099 > > http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4099&view=rev > Author: fabiomaulo > Date: 2009-02-24 19:34:25 +0000 (Tue, 24 Feb 2009) > > Log Message: > ----------- > NHibernate.ByteCode.Castle projects target to NET.3.5 (as required by > Castle) > > Modified Paths: > -------------- > > trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj > > trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj > > Modified: > trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj > =================================================================== > --- > trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj > 2009-02-24 19:31:32 UTC (rev 4098) > +++ > trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj > 2009-02-24 19:34:25 UTC (rev 4099) > @@ -10,7 +10,7 @@ > <AppDesignerFolder>Properties</AppDesignerFolder> > <RootNamespace>NHibernate.ByteCode.Castle</RootNamespace> > <AssemblyName>NHibernate.ByteCode.Castle</AssemblyName> > - <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> > + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> > <FileAlignment>512</FileAlignment> > </PropertyGroup> > <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == > 'Debug|AnyCPU' "> > @@ -48,6 +48,9 @@ > <HintPath>..\..\lib\net\2.0\log4net.dll</HintPath> > </Reference> > <Reference Include="System" /> > + <Reference Include="System.Core"> > + <RequiredTargetFramework>3.5</RequiredTargetFramework> > + </Reference> > </ItemGroup> > <ItemGroup> > <Compile Include="AssemblyInfo.cs" /> > > Modified: > trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj > =================================================================== > --- > trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj > 2009-02-24 19:31:32 UTC (rev 4098) > +++ > trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj > 2009-02-24 19:34:25 UTC (rev 4099) > @@ -10,7 +10,7 @@ > <AppDesignerFolder>Properties</AppDesignerFolder> > <RootNamespace>NHibernate.ByteCode.Castle.Tests</RootNamespace> > <AssemblyName>NHibernate.ByteCode.Castle.Tests</AssemblyName> > - <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> > + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> > <FileAlignment>512</FileAlignment> > </PropertyGroup> > <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == > 'Debug|AnyCPU' "> > @@ -52,6 +52,9 @@ > <HintPath>..\..\lib\net\2.0\nunit.framework.dll</HintPath> > </Reference> > <Reference Include="System" /> > + <Reference Include="System.Core"> > + <RequiredTargetFramework>3.5</RequiredTargetFramework> > + </Reference> > <Reference Include="System.Data" /> > <Reference Include="System.Xml" /> > </ItemGroup> > > > This was sent by the SourceForge.net collaborative development platform, > the world's largest Open Source development site. > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, > CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source code: > SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Nhibernate-commit mailing list > Nhi...@li... > https://lists.sourceforge.net/lists/listinfo/nhibernate-commit > |
From: <fab...@us...> - 2009-02-24 19:34:29
|
Revision: 4099 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4099&view=rev Author: fabiomaulo Date: 2009-02-24 19:34:25 +0000 (Tue, 24 Feb 2009) Log Message: ----------- NHibernate.ByteCode.Castle projects target to NET.3.5 (as required by Castle) Modified Paths: -------------- trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj Modified: trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj 2009-02-24 19:31:32 UTC (rev 4098) +++ trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj 2009-02-24 19:34:25 UTC (rev 4099) @@ -10,7 +10,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>NHibernate.ByteCode.Castle</RootNamespace> <AssemblyName>NHibernate.ByteCode.Castle</AssemblyName> - <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> @@ -48,6 +48,9 @@ <HintPath>..\..\lib\net\2.0\log4net.dll</HintPath> </Reference> <Reference Include="System" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="AssemblyInfo.cs" /> Modified: trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj 2009-02-24 19:31:32 UTC (rev 4098) +++ trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj 2009-02-24 19:34:25 UTC (rev 4099) @@ -10,7 +10,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>NHibernate.ByteCode.Castle.Tests</RootNamespace> <AssemblyName>NHibernate.ByteCode.Castle.Tests</AssemblyName> - <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> @@ -52,6 +52,9 @@ <HintPath>..\..\lib\net\2.0\nunit.framework.dll</HintPath> </Reference> <Reference Include="System" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-02-24 19:31:43
|
Revision: 4098 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4098&view=rev Author: fabiomaulo Date: 2009-02-24 19:31:32 +0000 (Tue, 24 Feb 2009) Log Message: ----------- Actualization of Castle today-version (Castle don't has formal release) Modified Paths: -------------- trunk/nhibernate/lib/net/2.0/Castle.Core.dll trunk/nhibernate/lib/net/2.0/Castle.Core.xml trunk/nhibernate/lib/net/2.0/Castle.DynamicProxy2.dll trunk/nhibernate/lib/net/2.0/Castle.DynamicProxy2.xml trunk/nhibernate/lib/net/3.5/Castle.Core.dll trunk/nhibernate/lib/net/3.5/Castle.Core.xml trunk/nhibernate/lib/net/3.5/Castle.DynamicProxy2.dll trunk/nhibernate/lib/net/3.5/Castle.DynamicProxy2.xml Modified: trunk/nhibernate/lib/net/2.0/Castle.Core.dll =================================================================== (Binary files differ) Modified: trunk/nhibernate/lib/net/2.0/Castle.Core.xml =================================================================== --- trunk/nhibernate/lib/net/2.0/Castle.Core.xml 2009-02-24 18:00:18 UTC (rev 4097) +++ trunk/nhibernate/lib/net/2.0/Castle.Core.xml 2009-02-24 19:31:32 UTC (rev 4098) @@ -1927,9 +1927,6 @@ </member> <member name="T:Castle.Core.Configuration.IConfiguration"> <summary> - Summary description for IConfiguration. - </summary> - <summary> <see cref="T:Castle.Core.Configuration.IConfiguration"/> is a interface encapsulating a configuration node used to retrieve configuration values. </summary> @@ -2024,17 +2021,11 @@ Creates a new instance of <c>ConfigurationCollection</c>. </summary> </member> - <member name="M:Castle.Core.Configuration.ConfigurationCollection.#ctor(System.Collections.Generic.IList{Castle.Core.Configuration.IConfiguration})"> + <member name="M:Castle.Core.Configuration.ConfigurationCollection.#ctor(System.Collections.Generic.IEnumerable{Castle.Core.Configuration.IConfiguration})"> <summary> Creates a new instance of <c>ConfigurationCollection</c>. </summary> </member> - <member name="M:Castle.Core.Configuration.ConfigurationCollection.AddRange(System.Collections.Generic.IList{Castle.Core.Configuration.IConfiguration})"> - <summary> - Adds an array of <see cref="T:Castle.Core.Configuration.IConfiguration"/>. - </summary> - <param name="value">The Array of <see cref="T:Castle.Core.Configuration.IConfiguration"/> to add.</param> - </member> <member name="T:Castle.Core.Configuration.MutableConfiguration"> <summary> Summary description for MutableConfiguration. @@ -2046,6 +2037,14 @@ </summary> <param name="name">The name.</param> </member> + <member name="P:Castle.Core.Configuration.MutableConfiguration.Value"> + <summary> + Gets the value of <see cref="T:Castle.Core.Configuration.IConfiguration"/>. + </summary> + <value> + The Value of the <see cref="T:Castle.Core.Configuration.IConfiguration"/>. + </value> + </member> <member name="T:Castle.Core.LifestyleType"> <summary> Enumeration used to mark the component's lifestyle. @@ -2381,7 +2380,7 @@ Initializes a new instance of the <see cref="T:Castle.Core.DependencyModelCollection"/> class. </summary> </member> - <member name="M:Castle.Core.DependencyModelCollection.#ctor(System.Collections.Generic.IList{Castle.Core.DependencyModel})"> + <member name="M:Castle.Core.DependencyModelCollection.#ctor(System.Collections.Generic.IEnumerable{Castle.Core.DependencyModel})"> <summary> Initializes a new instance of the <see cref="T:Castle.Core.DependencyModelCollection"/> class. </summary> @@ -2450,28 +2449,28 @@ </member> <member name="M:Castle.Core.InterceptorReferenceCollection.Add(Castle.Core.InterceptorReference)"> <summary> - Adds the specified interceptor. + Adds the specified item. </summary> - <param name="interceptor">The interceptor.</param> + <param name="item">The interceptor.</param> </member> <member name="M:Castle.Core.InterceptorReferenceCollection.AddFirst(Castle.Core.InterceptorReference)"> <summary> - Adds the the specified interceptor as the first. + Adds the specified interceptor as the first. </summary> - <param name="interceptor">The interceptor.</param> + <param name="item">The interceptor.</param> </member> <member name="M:Castle.Core.InterceptorReferenceCollection.AddLast(Castle.Core.InterceptorReference)"> <summary> - Adds the the specified interceptor as the last. + Adds the specified interceptor as the last. </summary> - <param name="interceptor">The interceptor.</param> + <param name="item">The interceptor.</param> </member> <member name="M:Castle.Core.InterceptorReferenceCollection.Insert(System.Int32,Castle.Core.InterceptorReference)"> <summary> Inserts the specified interceptor at the specified index. </summary> <param name="index">The index.</param> - <param name="interceptor">The interceptor.</param> + <param name="item">The interceptor.</param> </member> <member name="M:Castle.Core.InterceptorReferenceCollection.CopyTo(System.Array,System.Int32)"> <summary> @@ -2569,6 +2568,13 @@ <param name="type"></param> <param name="stepImplementation"></param> </member> + <member name="M:Castle.Core.LifecycleStepCollection.AddFirst(Castle.Core.LifecycleStepType,System.Object)"> + <summary> + Adds a step as the first step to execute for the commission or decomission phase. + </summary> + <param name="type"></param> + <param name="stepImplementation"></param> + </member> <member name="M:Castle.Core.LifecycleStepCollection.CopyTo(System.Array,System.Int32)"> <summary> Copies the elements of @@ -2928,7 +2934,7 @@ </summary> </member> - <member name="F:Castle.Core.Resource.AbstractStreamResource.CreateStream"> + <member name="F:Castle.Core.Resource.AbstractStreamResource.createStream"> <summary> This returns a new stream instance each time it is called. It is the responsability of the caller to dispose of this stream @@ -3039,6 +3045,21 @@ <param name="first"></param> <param name="second"></param> </member> + <member name="T:Castle.Core.ProxyServices"> + <summary> + List of utility methods related to dynamic proxy operations + </summary> + </member> + <member name="M:Castle.Core.ProxyServices.IsDynamicProxy(System.Type)"> + <summary> + Determines whether the specified type is a proxy generated by + DynamicProxy (1 or 2). + </summary> + <param name="type">The type.</param> + <returns> + <c>true</c> if it is a proxy; otherwise, <c>false</c>. + </returns> + </member> <member name="T:Castle.Core.ReflectionBasedDictionaryAdapter"> <summary> Pendent Modified: trunk/nhibernate/lib/net/2.0/Castle.DynamicProxy2.dll =================================================================== (Binary files differ) Modified: trunk/nhibernate/lib/net/2.0/Castle.DynamicProxy2.xml =================================================================== --- trunk/nhibernate/lib/net/2.0/Castle.DynamicProxy2.xml 2009-02-24 18:00:18 UTC (rev 4097) +++ trunk/nhibernate/lib/net/2.0/Castle.DynamicProxy2.xml 2009-02-24 19:31:32 UTC (rev 4098) @@ -43,7 +43,7 @@ </summary> </member> <member name="T:Castle.DynamicProxy.Generators.Emitters.LdcOpCodesDictionary"> - <summary> + <summary>s Provides appropriate Ldc.X opcode for the type of primitive value to be loaded. </summary> </member> @@ -110,7 +110,6 @@ </summary> <remarks> TODO: - - Use the interceptor selector if provided - Add tests and fixes for 'leaking this' problem </remarks> </member> @@ -366,15 +365,16 @@ <param name="options"></param> <returns></returns> </member> - <member name="M:Castle.DynamicProxy.IProxyBuilder.CreateInterfaceProxyTypeWithTargetInterface(System.Type,Castle.DynamicProxy.ProxyGenerationOptions)"> + <member name="M:Castle.DynamicProxy.IProxyBuilder.CreateInterfaceProxyTypeWithTargetInterface(System.Type,System.Type[],Castle.DynamicProxy.ProxyGenerationOptions)"> <summary> Implementors should return a proxy for the specified - interface that delegate all executions to the + interface(s) that delegate all executions to the specified interceptor(s) and uses an instance of the interface as their targets, rather than a class. All IInvocation's should then implement IChangeProxyTarget. </summary> <param name="theInterface"></param> + <param name="interfaces"></param> <param name="options"></param> <returns></returns> </member> @@ -386,9 +386,9 @@ </member> <member name="M:Castle.DynamicProxy.InternalsHelper.IsInternalToDynamicProxy(System.Reflection.Assembly)"> <summary> - Determines whether this assembly has internals visisble to dynamic proxy. + Determines whether this assembly has internals visible to dynamic proxy. </summary> - <param name="asm">The asm.</param> + <param name="asm">The assembly to inspect.</param> </member> <member name="M:Castle.DynamicProxy.InternalsHelper.IsInternal(System.Reflection.MethodInfo)"> <summary> Modified: trunk/nhibernate/lib/net/3.5/Castle.Core.dll =================================================================== (Binary files differ) Modified: trunk/nhibernate/lib/net/3.5/Castle.Core.xml =================================================================== --- trunk/nhibernate/lib/net/3.5/Castle.Core.xml 2009-02-24 18:00:18 UTC (rev 4097) +++ trunk/nhibernate/lib/net/3.5/Castle.Core.xml 2009-02-24 19:31:32 UTC (rev 4098) @@ -1927,9 +1927,6 @@ </member> <member name="T:Castle.Core.Configuration.IConfiguration"> <summary> - Summary description for IConfiguration. - </summary> - <summary> <see cref="T:Castle.Core.Configuration.IConfiguration"/> is a interface encapsulating a configuration node used to retrieve configuration values. </summary> @@ -2024,17 +2021,11 @@ Creates a new instance of <c>ConfigurationCollection</c>. </summary> </member> - <member name="M:Castle.Core.Configuration.ConfigurationCollection.#ctor(System.Collections.Generic.IList{Castle.Core.Configuration.IConfiguration})"> + <member name="M:Castle.Core.Configuration.ConfigurationCollection.#ctor(System.Collections.Generic.IEnumerable{Castle.Core.Configuration.IConfiguration})"> <summary> Creates a new instance of <c>ConfigurationCollection</c>. </summary> </member> - <member name="M:Castle.Core.Configuration.ConfigurationCollection.AddRange(System.Collections.Generic.IList{Castle.Core.Configuration.IConfiguration})"> - <summary> - Adds an array of <see cref="T:Castle.Core.Configuration.IConfiguration"/>. - </summary> - <param name="value">The Array of <see cref="T:Castle.Core.Configuration.IConfiguration"/> to add.</param> - </member> <member name="T:Castle.Core.Configuration.MutableConfiguration"> <summary> Summary description for MutableConfiguration. @@ -2046,6 +2037,14 @@ </summary> <param name="name">The name.</param> </member> + <member name="P:Castle.Core.Configuration.MutableConfiguration.Value"> + <summary> + Gets the value of <see cref="T:Castle.Core.Configuration.IConfiguration"/>. + </summary> + <value> + The Value of the <see cref="T:Castle.Core.Configuration.IConfiguration"/>. + </value> + </member> <member name="T:Castle.Core.LifestyleType"> <summary> Enumeration used to mark the component's lifestyle. @@ -2381,7 +2380,7 @@ Initializes a new instance of the <see cref="T:Castle.Core.DependencyModelCollection"/> class. </summary> </member> - <member name="M:Castle.Core.DependencyModelCollection.#ctor(System.Collections.Generic.IList{Castle.Core.DependencyModel})"> + <member name="M:Castle.Core.DependencyModelCollection.#ctor(System.Collections.Generic.IEnumerable{Castle.Core.DependencyModel})"> <summary> Initializes a new instance of the <see cref="T:Castle.Core.DependencyModelCollection"/> class. </summary> @@ -2450,28 +2449,28 @@ </member> <member name="M:Castle.Core.InterceptorReferenceCollection.Add(Castle.Core.InterceptorReference)"> <summary> - Adds the specified interceptor. + Adds the specified item. </summary> - <param name="interceptor">The interceptor.</param> + <param name="item">The interceptor.</param> </member> <member name="M:Castle.Core.InterceptorReferenceCollection.AddFirst(Castle.Core.InterceptorReference)"> <summary> - Adds the the specified interceptor as the first. + Adds the specified interceptor as the first. </summary> - <param name="interceptor">The interceptor.</param> + <param name="item">The interceptor.</param> </member> <member name="M:Castle.Core.InterceptorReferenceCollection.AddLast(Castle.Core.InterceptorReference)"> <summary> - Adds the the specified interceptor as the last. + Adds the specified interceptor as the last. </summary> - <param name="interceptor">The interceptor.</param> + <param name="item">The interceptor.</param> </member> <member name="M:Castle.Core.InterceptorReferenceCollection.Insert(System.Int32,Castle.Core.InterceptorReference)"> <summary> Inserts the specified interceptor at the specified index. </summary> <param name="index">The index.</param> - <param name="interceptor">The interceptor.</param> + <param name="item">The interceptor.</param> </member> <member name="M:Castle.Core.InterceptorReferenceCollection.CopyTo(System.Array,System.Int32)"> <summary> @@ -2569,6 +2568,13 @@ <param name="type"></param> <param name="stepImplementation"></param> </member> + <member name="M:Castle.Core.LifecycleStepCollection.AddFirst(Castle.Core.LifecycleStepType,System.Object)"> + <summary> + Adds a step as the first step to execute for the commission or decomission phase. + </summary> + <param name="type"></param> + <param name="stepImplementation"></param> + </member> <member name="M:Castle.Core.LifecycleStepCollection.CopyTo(System.Array,System.Int32)"> <summary> Copies the elements of @@ -2928,7 +2934,7 @@ </summary> </member> - <member name="F:Castle.Core.Resource.AbstractStreamResource.CreateStream"> + <member name="F:Castle.Core.Resource.AbstractStreamResource.createStream"> <summary> This returns a new stream instance each time it is called. It is the responsability of the caller to dispose of this stream @@ -3039,6 +3045,21 @@ <param name="first"></param> <param name="second"></param> </member> + <member name="T:Castle.Core.ProxyServices"> + <summary> + List of utility methods related to dynamic proxy operations + </summary> + </member> + <member name="M:Castle.Core.ProxyServices.IsDynamicProxy(System.Type)"> + <summary> + Determines whether the specified type is a proxy generated by + DynamicProxy (1 or 2). + </summary> + <param name="type">The type.</param> + <returns> + <c>true</c> if it is a proxy; otherwise, <c>false</c>. + </returns> + </member> <member name="T:Castle.Core.ReflectionBasedDictionaryAdapter"> <summary> Pendent Modified: trunk/nhibernate/lib/net/3.5/Castle.DynamicProxy2.dll =================================================================== (Binary files differ) Modified: trunk/nhibernate/lib/net/3.5/Castle.DynamicProxy2.xml =================================================================== --- trunk/nhibernate/lib/net/3.5/Castle.DynamicProxy2.xml 2009-02-24 18:00:18 UTC (rev 4097) +++ trunk/nhibernate/lib/net/3.5/Castle.DynamicProxy2.xml 2009-02-24 19:31:32 UTC (rev 4098) @@ -43,7 +43,7 @@ </summary> </member> <member name="T:Castle.DynamicProxy.Generators.Emitters.LdcOpCodesDictionary"> - <summary> + <summary>s Provides appropriate Ldc.X opcode for the type of primitive value to be loaded. </summary> </member> @@ -110,7 +110,6 @@ </summary> <remarks> TODO: - - Use the interceptor selector if provided - Add tests and fixes for 'leaking this' problem </remarks> </member> @@ -366,15 +365,16 @@ <param name="options"></param> <returns></returns> </member> - <member name="M:Castle.DynamicProxy.IProxyBuilder.CreateInterfaceProxyTypeWithTargetInterface(System.Type,Castle.DynamicProxy.ProxyGenerationOptions)"> + <member name="M:Castle.DynamicProxy.IProxyBuilder.CreateInterfaceProxyTypeWithTargetInterface(System.Type,System.Type[],Castle.DynamicProxy.ProxyGenerationOptions)"> <summary> Implementors should return a proxy for the specified - interface that delegate all executions to the + interface(s) that delegate all executions to the specified interceptor(s) and uses an instance of the interface as their targets, rather than a class. All IInvocation's should then implement IChangeProxyTarget. </summary> <param name="theInterface"></param> + <param name="interfaces"></param> <param name="options"></param> <returns></returns> </member> @@ -386,9 +386,9 @@ </member> <member name="M:Castle.DynamicProxy.InternalsHelper.IsInternalToDynamicProxy(System.Reflection.Assembly)"> <summary> - Determines whether this assembly has internals visisble to dynamic proxy. + Determines whether this assembly has internals visible to dynamic proxy. </summary> - <param name="asm">The asm.</param> + <param name="asm">The assembly to inspect.</param> </member> <member name="M:Castle.DynamicProxy.InternalsHelper.IsInternal(System.Reflection.MethodInfo)"> <summary> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-02-24 18:00:22
|
Revision: 4097 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4097&view=rev Author: fabiomaulo Date: 2009-02-24 18:00:18 +0000 (Tue, 24 Feb 2009) Log Message: ----------- Bug fix in SingletonEnumerable Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Util/SingletonEnumerable.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/UtilityTest/SingletonEnumerableFixture.cs Modified: trunk/nhibernate/src/NHibernate/Util/SingletonEnumerable.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Util/SingletonEnumerable.cs 2009-02-21 17:08:24 UTC (rev 4096) +++ trunk/nhibernate/src/NHibernate/Util/SingletonEnumerable.cs 2009-02-24 18:00:18 UTC (rev 4097) @@ -44,11 +44,7 @@ public T Current { - get - { - if (hasNext) hasNext = false; - return current; - } + get { return current; } } #endregion @@ -65,7 +61,9 @@ public bool MoveNext() { - return hasNext; + var result = hasNext; + hasNext = false; + return result; } public void Reset() Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-02-21 17:08:24 UTC (rev 4096) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-02-24 18:00:18 UTC (rev 4097) @@ -1100,6 +1100,7 @@ <Compile Include="UtilityTest\ReflectHelperFixture.cs" /> <Compile Include="UtilityTest\SafetyEnumerableFixture.cs" /> <Compile Include="UtilityTest\SequencedHashMapFixture.cs" /> + <Compile Include="UtilityTest\SingletonEnumerableFixture.cs" /> <Compile Include="UtilityTest\StringHelperFixture.cs" /> <Compile Include="UtilityTest\StringTokenizerFixture.cs" /> <Compile Include="UtilityTest\ThreadSafeDictionaryFixture.cs" /> Added: trunk/nhibernate/src/NHibernate.Test/UtilityTest/SingletonEnumerableFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/UtilityTest/SingletonEnumerableFixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/UtilityTest/SingletonEnumerableFixture.cs 2009-02-24 18:00:18 UTC (rev 4097) @@ -0,0 +1,50 @@ +using System.Collections; +using NHibernate.Util; +using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; + +namespace NHibernate.Test.UtilityTest +{ + [TestFixture] + public class SingletonEnumerableFixture + { + [Test] + public void DifferentEnumeratorInEachRequest() + { + var obj = new object(); + var se = new SingletonEnumerable<object>(obj); + Assert.That(!ReferenceEquals(se.GetEnumerator(), se.GetEnumerator())); + + // with no generic enumerator + var see = (IEnumerable) se; + Assert.That(!ReferenceEquals(see.GetEnumerator(), see.GetEnumerator())); + } + + [Test] + public void ShouldWorkInForeach() + { + var obj = new object(); + var se = new SingletonEnumerable<object>(obj); + int i=0; + foreach (var o in se) + { + i++; + } + Assert.That(i, Is.EqualTo(1)); + } + + [Test] + public void ShouldWorkAsEnumerator() + { + var obj = new object(); + var se = new SingletonEnumerable<object>(obj); + var enu = se.GetEnumerator(); + int i = 0; + while (enu.MoveNext()) + { + i++; + } + Assert.That(i, Is.EqualTo(1)); + } + } +} \ 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...> - 2009-02-21 17:08:33
|
Revision: 4096 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4096&view=rev Author: fabiomaulo Date: 2009-02-21 17:08:24 +0000 (Sat, 21 Feb 2009) Log Message: ----------- Test for version generated Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/ trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/ trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/BinaryTimestamp.cs trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/GeneratedBinaryVersionFixture.cs trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/SimpleVersioned.cs trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/SimpleVersioned.hbm.xml Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-02-21 04:12:45 UTC (rev 4095) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-02-21 17:08:24 UTC (rev 4096) @@ -1105,6 +1105,9 @@ <Compile Include="UtilityTest\ThreadSafeDictionaryFixture.cs" /> <Compile Include="UtilityTest\TypeNameParserFixture.cs" /> <Compile Include="UtilityTest\WeakHashtableFixture.cs" /> + <Compile Include="VersionTest\Db\MsSQL\BinaryTimestamp.cs" /> + <Compile Include="VersionTest\Db\MsSQL\GeneratedBinaryVersionFixture.cs" /> + <Compile Include="VersionTest\Db\MsSQL\SimpleVersioned.cs" /> <Compile Include="VersionTest\Person.cs" /> <Compile Include="VersionTest\Task.cs" /> <Compile Include="VersionTest\Thing.cs" /> @@ -1662,6 +1665,7 @@ <EmbeddedResource Include="Cascade\JobBatch.hbm.xml" /> <EmbeddedResource Include="Deletetransient\Person.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="VersionTest\Db\MsSQL\SimpleVersioned.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1675\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1677\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1679\Mappings.hbm.xml" /> Added: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/BinaryTimestamp.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/BinaryTimestamp.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/BinaryTimestamp.cs 2009-02-21 17:08:24 UTC (rev 4096) @@ -0,0 +1,105 @@ +using System.Data; +using NHibernate.Engine; +using NHibernate.SqlTypes; +using NHibernate.UserTypes; + +namespace NHibernate.Test.VersionTest.Db.MsSQL +{ + public class BinaryTimestamp : IUserVersionType + { + #region IUserVersionType Members + + public object Next(object current, ISessionImplementor session) + { + return current; + } + + public object Seed(ISessionImplementor session) + { + return new byte[8]; + } + + public object Assemble(object cached, object owner) + { + return DeepCopy(cached); + } + + public object DeepCopy(object value) + { + return value; + } + + public object Disassemble(object value) + { + return DeepCopy(value); + } + + public int GetHashCode(object x) + { + return x.GetHashCode(); + } + + public bool IsMutable + { + get { return false; } + } + + public object NullSafeGet(IDataReader rs, string[] names, object owner) + { + return rs.GetValue(rs.GetOrdinal(names[0])); + } + + public void NullSafeSet(IDbCommand cmd, object value, int index) + { + NHibernateUtil.Binary.NullSafeSet(cmd, value, index); + } + + public object Replace(object original, object target, object owner) + { + return original; + } + + public System.Type ReturnedType + { + get { return typeof (byte[]); } + } + + public SqlType[] SqlTypes + { + get { return new[] {new SqlType(DbType.Binary, 8)}; } + } + + public int Compare(object x, object y) + { + var xbytes = (byte[]) x; + var ybytes = (byte[]) y; + if (xbytes.Length < ybytes.Length) + { + return -1; + } + if (xbytes.Length > ybytes.Length) + { + return 1; + } + for (int i = 0; i < xbytes.Length; i++) + { + if (xbytes[i] < ybytes[i]) + { + return -1; + } + if (xbytes[i] > ybytes[i]) + { + return 1; + } + } + return 0; + } + + bool IUserType.Equals(object x, object y) + { + return (x == y); + } + + #endregion + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/GeneratedBinaryVersionFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/GeneratedBinaryVersionFixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/GeneratedBinaryVersionFixture.cs 2009-02-21 17:08:24 UTC (rev 4096) @@ -0,0 +1,46 @@ +using System.Collections; +using NHibernate.Dialect; +using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; + +namespace NHibernate.Test.VersionTest.Db.MsSQL +{ + // related issues NH-1687, NH-1685 + + [TestFixture, Ignore("Not fixed yet.")] + public class GeneratedBinaryVersionFixture : TestCase + { + protected override IList Mappings + { + get { return new[] { "VersionTest.Db.MsSQL.SimpleVersioned.hbm.xml" }; } + } + + protected override string MappingsAssembly + { + get { return "NHibernate.Test"; } + } + + protected override bool AppliesTo(Dialect.Dialect dialect) + { + return dialect is MsSql2000Dialect; + } + + [Test] + public void ShouldRetrieveVersionAfterFlush() + { + var e = new SimpleVersioned {Something = "something"}; + using (ISession s = OpenSession()) + { + using (ITransaction tx = s.BeginTransaction()) + { + Assert.That(e.LastModified, Is.Null); + s.Save(e); + s.Flush(); + Assert.That(e.LastModified, Is.Not.Null); + s.Delete(e); + tx.Commit(); + } + } + } + } +} \ No newline at end of file Property changes on: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/GeneratedBinaryVersionFixture.cs ___________________________________________________________________ Added: svn:mergeinfo + Added: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/SimpleVersioned.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/SimpleVersioned.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/SimpleVersioned.cs 2009-02-21 17:08:24 UTC (rev 4096) @@ -0,0 +1,9 @@ +namespace NHibernate.Test.VersionTest.Db.MsSQL +{ + public class SimpleVersioned + { + public virtual int Id { get; private set; } + public virtual byte[] LastModified { get; private set; } + public virtual string Something { get; set; } + } +} \ No newline at end of file Property changes on: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/SimpleVersioned.cs ___________________________________________________________________ Added: svn:mergeinfo + Added: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/SimpleVersioned.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/SimpleVersioned.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/SimpleVersioned.hbm.xml 2009-02-21 17:08:24 UTC (rev 4096) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + assembly="NHibernate.Test" + namespace="NHibernate.Test.VersionTest.Db.MsSQL"> + + <typedef name="ByteTimestamp" + class="NHibernate.Test.VersionTest.Db.MsSQL.BinaryTimestamp, NHibernate.Test"/> + + <class name="SimpleVersioned" table="GenVersion" optimistic-lock="version" > + <id name="Id" access="backfield"> + <generator class="native" /> + </id> + <version name="LastModified" type="ByteTimestamp" generated="always" unsaved-value="null" access="backfield"> + <column name="LastModified" not-null="false" sql-type="timestamp"/> + </version> + <property name="Something"/> + </class> + +</hibernate-mapping> \ No newline at end of file Property changes on: trunk/nhibernate/src/NHibernate.Test/VersionTest/Db/MsSQL/SimpleVersioned.hbm.xml ___________________________________________________________________ Added: svn:mergeinfo + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2009-02-21 04:12:51
|
Revision: 4095 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4095&view=rev Author: fabiomaulo Date: 2009-02-21 04:12:45 +0000 (Sat, 21 Feb 2009) Log Message: ----------- NH-1675 not an issue in trunk but probably a real bug with the old Dialect. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1675/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1675/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1675/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1675/Person.cs Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1675/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1675/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1675/Fixture.cs 2009-02-21 04:12:45 UTC (rev 4095) @@ -0,0 +1,37 @@ +using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; + +namespace NHibernate.Test.NHSpecificTest.NH1675 +{ + [TestFixture] + public class Fixture : BugTestCase + { + [Test] + public void ShouldWorkUsingDistinctAndLimits() + { + using (ISession s = OpenSession()) + using (ITransaction tx = s.BeginTransaction()) + { + for (int i = 0; i < 5; i++) + { + s.Save(new Person {FirstName = "Name" + i}); + } + tx.Commit(); + } + + using (ISession s = OpenSession()) + { + var q =s.CreateQuery("select distinct p from Person p").SetFirstResult(0).SetMaxResults(10); + Assert.That(q.List().Count, Is.EqualTo(5)); + } + + // clean up + using (ISession s = OpenSession()) + using (ITransaction tx = s.BeginTransaction()) + { + s.Delete("from Person"); + tx.Commit(); + } + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1675/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1675/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1675/Mappings.hbm.xml 2009-02-21 04:12:45 UTC (rev 4095) @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + namespace="NHibernate.Test.NHSpecificTest.NH1675" + assembly="NHibernate.Test"> + + <class name="Person"> + <id name="Id"> + <generator class="native" /> + </id> + <property name="FirstName"/> + </class> +</hibernate-mapping> \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1675/Person.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1675/Person.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1675/Person.cs 2009-02-21 04:12:45 UTC (rev 4095) @@ -0,0 +1,8 @@ +namespace NHibernate.Test.NHSpecificTest.NH1675 +{ + public class Person + { + public virtual int Id { get; set; } + public virtual string FirstName { 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 2009-02-21 03:59:26 UTC (rev 4094) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-02-21 04:12:45 UTC (rev 4095) @@ -627,6 +627,8 @@ <Compile Include="NHSpecificTest\NH1643\Fixture.cs" /> <Compile Include="NHSpecificTest\NH1654\Fixture.cs" /> <Compile Include="NHSpecificTest\NH1654\Employee.cs" /> + <Compile Include="NHSpecificTest\NH1675\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH1675\Person.cs" /> <Compile Include="NHSpecificTest\NH1677\Fixture.cs" /> <Compile Include="NHSpecificTest\NH1679\DomainClass.cs" /> <Compile Include="NHSpecificTest\NH1679\Fixture.cs" /> @@ -1660,6 +1662,7 @@ <EmbeddedResource Include="Cascade\JobBatch.hbm.xml" /> <EmbeddedResource Include="Deletetransient\Person.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH1675\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1677\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1679\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\Evicting\Mappings.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |