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: <fab...@us...> - 2011-03-12 18:55:53
|
Revision: 5453 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5453&view=rev Author: fabiomaulo Date: 2011-03-12 18:55:47 +0000 (Sat, 12 Mar 2011) Log Message: ----------- nuget targets: NHibernate.ByteCode.Castle Modified Paths: -------------- trunk/nhibernate/default.build trunk/nhibernate/src/NHibernate.ByteCode.Castle/ByteCode.build trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.Castle.nuspec.template Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2011-03-12 18:33:53 UTC (rev 5452) +++ trunk/nhibernate/default.build 2011-03-12 18:55:47 UTC (rev 5453) @@ -381,6 +381,7 @@ <fileset id="nuspecfiles.all" basedir="src"> <include name="Iesi.Collections/Iesi.Collections.build" /> <include name="NHibernate/NHibernate.build" /> + <include name="NHibernate.ByteCode.Castle/ByteCode.build" /> </fileset> <target name="nuspec" description="Create nuspec files"> Modified: trunk/nhibernate/src/NHibernate.ByteCode.Castle/ByteCode.build =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Castle/ByteCode.build 2011-03-12 18:33:53 UTC (rev 5452) +++ trunk/nhibernate/src/NHibernate.ByteCode.Castle/ByteCode.build 2011-03-12 18:55:47 UTC (rev 5453) @@ -32,4 +32,15 @@ <target name="generate-assemblyinfo" depends="init common.generate-assemblyinfo" /> <target name="build" depends="init generate-assemblyinfo common.compile-dll" description="Build Castle ByteCode" /> + <target name="nuspec" depends="init" description="Create nuspec for NHibernate.ByteCode.Castle"> + <property name="nuspec.destination.file" value="${build.dir}/NHibernate.Castle.nuspec" /> + <copy file="NHibernate.Castle.nuspec.template" tofile="${nuspec.destination.file}"/> + <xmlpoke file="${nuspec.destination.file}" + xpath="/package/metadata/dependencies/dependency[@id = 'NHibernate']/@version" + value="[${project.version.numeric}]" /> + <xmlpoke file="${nuspec.destination.file}" + xpath="/package/metadata/version" + value="${project.version.numeric}" /> + </target> + </project> Modified: trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj 2011-03-12 18:33:53 UTC (rev 5452) +++ trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj 2011-03-12 18:55:47 UTC (rev 5453) @@ -82,6 +82,7 @@ </ItemGroup> <ItemGroup> <None Include="ByteCode.build" /> + <None Include="NHibernate.Castle.nuspec.template" /> </ItemGroup> <ItemGroup> <Folder Include="Properties\" /> Added: trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.Castle.nuspec.template =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.Castle.nuspec.template (rev 0) +++ trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.Castle.nuspec.template 2011-03-12 18:55:47 UTC (rev 5453) @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8" ?> +<package> + <metadata> + <id>NHibernate.Castle</id> + <version>x.y.z</version> + <authors>NHibernate community, Hibernate community</authors> + <description> + NHibernate is a mature, open source object-relational mapper for the .NET framework. It's actively developed , fully featured and used in thousands of successful projects. + + </description> + <language>en-US</language> + <tags>ORM, DataBase, DAL, Object Relational Mapping</tags> + <dependencies> + <dependency id="NHibernate" version="x.y.z" /> + <dependency id="Castle.Core" version="2.5.2" /> + </dependencies> + </metadata> + <files> + <file src="..\bin\net-3.5\NHibernate.ByteCode.Castle.dll" target="lib\Net35" /> + <file src="..\bin\net-3.5\NHibernate.ByteCode.Castle.xml" target="lib\Net35" /> + </files> +</package> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2011-03-12 18:34:00
|
Revision: 5452 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5452&view=rev Author: fabiomaulo Date: 2011-03-12 18:33:53 +0000 (Sat, 12 Mar 2011) Log Message: ----------- nuget targets: NHibernate Modified Paths: -------------- trunk/nhibernate/default.build trunk/nhibernate/src/NHibernate/NHibernate.build trunk/nhibernate/src/NHibernate/NHibernate.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate/NHibernate.nuspec.template Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2011-03-12 17:54:34 UTC (rev 5451) +++ trunk/nhibernate/default.build 2011-03-12 18:33:53 UTC (rev 5452) @@ -380,6 +380,7 @@ <fileset id="nuspecfiles.all" basedir="src"> <include name="Iesi.Collections/Iesi.Collections.build" /> + <include name="NHibernate/NHibernate.build" /> </fileset> <target name="nuspec" description="Create nuspec files"> Modified: trunk/nhibernate/src/NHibernate/NHibernate.build =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.build 2011-03-12 17:54:34 UTC (rev 5451) +++ trunk/nhibernate/src/NHibernate/NHibernate.build 2011-03-12 18:33:53 UTC (rev 5452) @@ -76,4 +76,15 @@ <copy file="${bin.dir}/NHibernate.dll" tofile="${root.dir}/${lib.framework.dir}/NHibernate.dll"/> </target> + <target name="nuspec" depends="init" description="Create nuspec for Iesi.Collections"> + <property name="nuspec.destination.file" value="${build.dir}/NHibernate.nuspec" /> + <copy file="NHibernate.nuspec.template" tofile="${nuspec.destination.file}"/> + <xmlpoke file="${nuspec.destination.file}" + xpath="/package/metadata/dependencies/dependency[@id = 'Iesi.Collections']/@version" + value="${project.version.numeric}" /> + <xmlpoke file="${nuspec.destination.file}" + xpath="/package/metadata/version" + value="${project.version.numeric}" /> + </target> + </project> Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2011-03-12 17:54:34 UTC (rev 5451) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2011-03-12 18:33:53 UTC (rev 5452) @@ -1577,6 +1577,7 @@ <None Include="Hql\Ast\ANTLR\HqlSqlWalker.g" /> <None Include="Hql\Ast\ANTLR\SqlGenerator.g" /> <None Include="NHibernate.build" /> + <None Include="NHibernate.nuspec.template" /> <None Include="Type\IType.cs.xmldoc" /> </ItemGroup> <ItemGroup> Added: trunk/nhibernate/src/NHibernate/NHibernate.nuspec.template =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.nuspec.template (rev 0) +++ trunk/nhibernate/src/NHibernate/NHibernate.nuspec.template 2011-03-12 18:33:53 UTC (rev 5452) @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8" ?> +<package> + <metadata> + <id>NHibernate</id> + <version>x.y.z</version> + <authors>NHibernate community, Hibernate community</authors> + <description> + DONT INSTALL IT DIRECTLY + Only as reference for others frameworks. + + NHibernate is a mature, open source object-relational mapper for the .NET framework. It's actively developed , fully featured and used in thousands of successful projects. + </description> + <language>en-US</language> + <tags>ORM, DataBase, DAL, Object Relational Mapping</tags> + <dependencies> + <dependency id="Iesi.Collections" version="x.y.z" /> + </dependencies> + </metadata> + <files> + <file src="..\bin\net-3.5\NHibernate.dll" target="lib\Net35" /> + </files> +</package> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2011-03-12 17:54:40
|
Revision: 5451 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5451&view=rev Author: fabiomaulo Date: 2011-03-12 17:54:34 +0000 (Sat, 12 Mar 2011) Log Message: ----------- Starting nuget targets Modified Paths: -------------- trunk/nhibernate/default.build trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.build trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.csproj Added Paths: ----------- trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.nuspec.template Modified: trunk/nhibernate/default.build =================================================================== --- trunk/nhibernate/default.build 2011-03-12 17:53:54 UTC (rev 5450) +++ trunk/nhibernate/default.build 2011-03-12 17:54:34 UTC (rev 5451) @@ -378,4 +378,14 @@ </target> + <fileset id="nuspecfiles.all" basedir="src"> + <include name="Iesi.Collections/Iesi.Collections.build" /> + </fileset> + + <target name="nuspec" description="Create nuspec files"> + <nant target="nuspec"> + <buildfiles refid="nuspecfiles.all" /> + </nant> + </target> + </project> Modified: trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.build =================================================================== --- trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.build 2011-03-12 17:53:54 UTC (rev 5450) +++ trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.build 2011-03-12 17:54:34 UTC (rev 5451) @@ -34,4 +34,11 @@ <target name="generate-assemblyinfo" depends="init common.generate-assemblyinfo" /> <target name="build" depends="init generate-assemblyinfo common.compile-dll" description="Build Iesi.Collections" /> + <target name="nuspec" depends="init" description="Create nuspec for Iesi.Collections"> + <property name="nuspec.destination.file" value="${build.dir}/Iesi.Collections.nuspec" /> + <copy file="Iesi.Collections.nuspec.template" tofile="${nuspec.destination.file}"/> + <xmlpoke file="${nuspec.destination.file}" + xpath="/package/metadata/version" + value="${project.version.numeric}" /> + </target> </project> Modified: trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.csproj =================================================================== --- trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.csproj 2011-03-12 17:53:54 UTC (rev 5450) +++ trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.csproj 2011-03-12 17:54:34 UTC (rev 5451) @@ -83,6 +83,7 @@ </ItemGroup> <ItemGroup> <Content Include="NamespaceSummary.xml" /> + <None Include="Iesi.Collections.nuspec.template" /> </ItemGroup> <ItemGroup> <Service Include="{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}" /> Added: trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.nuspec.template =================================================================== --- trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.nuspec.template (rev 0) +++ trunk/nhibernate/src/Iesi.Collections/Iesi.Collections.nuspec.template 2011-03-12 17:54:34 UTC (rev 5451) @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<package> + <metadata> + <id>Iesi.Collections</id> + <version>x.y.z</version> + <authors>Aidant Systems, Jason Smith, NHibernate community</authors> + <description> + The System.Collections namespace in the .NET Framework provides a number of collection + types that are extremely useful for manipulating data in memory. However, there is one + type of collection that is conspicuously missing from System.Collections: the Set. + </description> + <language>en-US</language> + <tags>Collections</tags> + </metadata> + <files> + <file src="..\bin\net-3.5\Iesi.Collections.dll" target="lib\Net35" /> + <file src="..\bin\net-3.5\Iesi.Collections.pdb" target="lib\Net35" /> + <file src="..\bin\net-3.5\Iesi.Collections.license.txt" target="lib\Net35" /> + </files> +</package> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2011-03-12 17:54:00
|
Revision: 5450 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5450&view=rev Author: fabiomaulo Date: 2011-03-12 17:53:54 +0000 (Sat, 12 Mar 2011) Log Message: ----------- Fixed namespace Modified Paths: -------------- trunk/nhibernate/build-common/common-project.xml Modified: trunk/nhibernate/build-common/common-project.xml =================================================================== --- trunk/nhibernate/build-common/common-project.xml 2011-03-09 17:07:09 UTC (rev 5449) +++ trunk/nhibernate/build-common/common-project.xml 2011-03-12 17:53:54 UTC (rev 5450) @@ -1,7 +1,7 @@ <?xml version="1.0" ?> -<project xmlns="http://nant.sf.net/release/0.90/nant.xsd" xsi:schemaLocation="http://nant.sf.net/release/0.90/nant.xsd ..\Tools\nant\schema\nant.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<project xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd"> - <description> + <description> <![CDATA[ This file contains common tasks tailored specifically for the NHibernate build process. The goal was to define all the actions in this file, so This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ric...@us...> - 2011-03-09 17:07:15
|
Revision: 5449 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5449&view=rev Author: ricbrown Date: 2011-03-09 17:07:09 +0000 (Wed, 09 Mar 2011) Log Message: ----------- Escaped column names for tests failing on Firebird. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Join/Person.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH750/Mappings.hbm.xml Modified: trunk/nhibernate/src/NHibernate.Test/Join/Person.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Join/Person.hbm.xml 2011-03-09 12:24:56 UTC (rev 5448) +++ trunk/nhibernate/src/NHibernate.Test/Join/Person.hbm.xml 2011-03-09 17:07:09 UTC (rev 5449) @@ -66,7 +66,7 @@ </join> <join table="t_silly" fetch="select" optional="true"> <key column="person_id"/> - <property name="_Silly" access="field"/> + <property name="_Silly" column="`_Silly`" access="field"/> </join> </subclass> </class> Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH750/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH750/Mappings.hbm.xml 2011-03-09 12:24:56 UTC (rev 5448) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH750/Mappings.hbm.xml 2011-03-09 17:07:09 UTC (rev 5449) @@ -5,7 +5,7 @@ default-access="field.camelcase-underscore" default-lazy="false"> <class name="Device"> - <id name="_id" type="Int32" access="field"> + <id name="_id" column="`_id`" type="Int32" access="field"> <generator class="native"/> </id> <property name="Manifacturer"/> @@ -16,7 +16,7 @@ </class> <class name="Drive"> - <id name="_id" type="Int32" access="field"> + <id name="_id" column="`_id`" type="Int32" access="field"> <generator class="native"/> </id> <property name="ClassFullName"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2011-03-09 12:25:02
|
Revision: 5448 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5448&view=rev Author: fabiomaulo Date: 2011-03-09 12:24:56 +0000 (Wed, 09 Mar 2011) Log Message: ----------- Fix NH-2565 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Event/Default/DefaultPersistEventListener.cs trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2565/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2565/Domain.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2565/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2565/Mappings.hbm.xml Modified: trunk/nhibernate/src/NHibernate/Event/Default/DefaultPersistEventListener.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Event/Default/DefaultPersistEventListener.cs 2011-03-09 05:46:42 UTC (rev 5447) +++ trunk/nhibernate/src/NHibernate/Event/Default/DefaultPersistEventListener.cs 2011-03-09 12:24:56 UTC (rev 5448) @@ -83,6 +83,15 @@ //TODO: check that entry.getIdentifier().equals(requestedId) object entity = source.PersistenceContext.Unproxy(@event.Entity); + /* NH-2565: the UnProxy may return a "field interceptor proxy". When EntityName is null the session.GetEntityPersister will try to guess it. + * Instead change a session's method I'll try to guess the EntityName here. + * Because I'm using a session's method perhaps could be better if each session's method, which implementation forward to a method having the EntityName as parameter, + * use the BestGuessEntityName directly instead do "70 turns" before call it. + */ + if (@event.EntityName == null) + { + @event.EntityName = source.BestGuessEntityName(entity); + } IEntityPersister persister = source.GetEntityPersister(@event.EntityName, entity); object tempObject; Modified: trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs 2011-03-09 05:46:42 UTC (rev 5447) +++ trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs 2011-03-09 12:24:56 UTC (rev 5448) @@ -15,6 +15,7 @@ using NHibernate.Engine.Query.Sql; using NHibernate.Event; using NHibernate.Hql; +using NHibernate.Intercept; using NHibernate.Loader.Criteria; using NHibernate.Loader.Custom; using NHibernate.Loader.Custom.Sql; @@ -1043,8 +1044,8 @@ { if (entity.IsProxy()) { - INHibernateProxy proxy = entity as INHibernateProxy; - ILazyInitializer initializer = proxy.HibernateLazyInitializer; + INHibernateProxy proxy = entity as INHibernateProxy; + ILazyInitializer initializer = proxy.HibernateLazyInitializer; // it is possible for this method to be called during flush processing, // so make certain that we do not accidently initialize an uninitialized proxy @@ -1054,6 +1055,12 @@ } entity = initializer.GetImplementation(); } + if (FieldInterceptionHelper.IsInstrumented(entity)) + { + // NH: support of field-interceptor-proxy + IFieldInterceptor interceptor = FieldInterceptionHelper.ExtractFieldInterceptor(entity); + return interceptor.EntityName; + } EntityEntry entry = persistenceContext.GetEntry(entity); if (entry == null) { Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2565/Domain.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2565/Domain.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2565/Domain.cs 2011-03-09 12:24:56 UTC (rev 5448) @@ -0,0 +1,17 @@ +using System; + +namespace NHibernate.Test.NHSpecificTest.NH2565 +{ + public class Task + { + public virtual Guid Id { get; set; } + public virtual string Description { get; set; } + public virtual TaskActivity Activity { get; set; } + } + + public class TaskActivity + { + public virtual Guid Id { get; set; } + public virtual string Name { get; set; } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2565/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2565/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2565/Fixture.cs 2011-03-09 12:24:56 UTC (rev 5448) @@ -0,0 +1,83 @@ +using System; +using NUnit.Framework; +using SharpTestsEx; + +namespace NHibernate.Test.NHSpecificTest.NH2565 +{ + public class Fixture: BugTestCase + { + private class TaskSavedScenario: IDisposable + { + private readonly ISessionFactory factory; + private readonly Guid taskId; + + public TaskSavedScenario(ISessionFactory factory) + { + this.factory = factory; + var activity = new TaskActivity{Name="Say Hello!"}; + var task = new Task { Description = "Nice to do", Activity = activity }; + using (var s = factory.OpenSession()) + using (var tx = s.BeginTransaction()) + { + s.Persist(task); + taskId = task.Id; + tx.Commit(); + } + } + + public Guid TaskId + { + get { return taskId; } + } + + public void Dispose() + { + using (var s = factory.OpenSession()) + using (var tx = s.BeginTransaction()) + { + s.Delete(s.Get<Task>(taskId)); + tx.Commit(); + } + } + } + + protected override void Configure(Cfg.Configuration configuration) + { + configuration.SetProperty(Cfg.Environment.ProxyFactoryFactoryClass, + typeof(ByteCode.Castle.ProxyFactoryFactory).AssemblyQualifiedName); + } + + [Test] + public void WhenUseLoadThenCanUsePersistToModify() + { + using (var scenario = new TaskSavedScenario(Sfi)) + { + using (var s = OpenSession()) + using (var tx = s.BeginTransaction()) + { + var task = s.Load<Task>(scenario.TaskId); + task.Description = "Could be something nice"; + s.Persist(task); + s.Executing(session => session.Persist(task)).NotThrows(); + tx.Commit(); + } + } + } + + [Test] + public void WhenUseGetThenCanUsePersistToModify() + { + using (var scenario = new TaskSavedScenario(Sfi)) + { + using (var s = OpenSession()) + using (var tx = s.BeginTransaction()) + { + var task = s.Get<Task>(scenario.TaskId); + task.Description = "Could be something nice"; + s.Executing(session => session.Persist(task)).NotThrows(); + tx.Commit(); + } + } + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2565/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2565/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2565/Mappings.hbm.xml 2011-03-09 12:24:56 UTC (rev 5448) @@ -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.NHSpecificTest.NH2565"> + + <class name="Task"> + <id name="Id"> + <generator class="guid" /> + </id> + <property name="Description"/> + <many-to-one name="Activity" class="TaskActivity" cascade="all" lazy="no-proxy"/> + </class> + <class name="TaskActivity"> + <id name="Id"> + <generator class="guid" /> + </id> + <property name="Name"/> + </class> +</hibernate-mapping> Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2011-03-09 05:46:42 UTC (rev 5447) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2011-03-09 12:24:56 UTC (rev 5448) @@ -645,6 +645,8 @@ <Compile Include="NHSpecificTest\NH2484\Model.cs" /> <Compile Include="NHSpecificTest\NH2507\Animal.cs" /> <Compile Include="NHSpecificTest\NH2507\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2565\Domain.cs" /> + <Compile Include="NHSpecificTest\NH2565\Fixture.cs" /> <Compile Include="NHSpecificTest\Properties\CompositePropertyRefTest.cs" /> <Compile Include="NHSpecificTest\Properties\DynamicEntityTest.cs" /> <Compile Include="NHSpecificTest\Properties\Model.cs" /> @@ -2475,6 +2477,7 @@ <EmbeddedResource Include="NHSpecificTest\NH1291AnonExample\Mappings.hbm.xml" /> </ItemGroup> <ItemGroup> + <EmbeddedResource Include="NHSpecificTest\NH2565\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\AccessAndCorrectPropertyName\DogMapping.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\AccessAndCorrectPropertyName\PersonMapping.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2507\Mappings.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-09 05:46:48
|
Revision: 5447 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5447&view=rev Author: patearl Date: 2011-03-09 05:46:42 +0000 (Wed, 09 Mar 2011) Log Message: ----------- Revert two most recent commits. They weren't making any progress. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs trunk/nhibernate/src/NHibernate.Test/TestCase.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-09 04:20:13 UTC (rev 5446) +++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-09 05:46:42 UTC (rev 5447) @@ -67,13 +67,6 @@ RegisterFunction("mod", new SQLFunctionTemplate(NHibernateUtil.Int32, "((?1) % (?2))")); RegisterFunction("iif", new SQLFunctionTemplate(null, "case when ?1 then ?2 else ?3 end")); - - // Casting in SQLite is unnecessary since SQLite is essentially typeless. - // String operators can be performed on integers, integer ops on strings, etc. - // For some reason, doing cast('2001-02-03 04:05:06' as datetime) returns 2001. - // In fact, casting to even a type named as a string of garbage returns the same thing. - // Therefore, it's better to avoid the cast function entirely. - RegisterFunction("cast", new SQLFunctionTemplate(null, "(?1)")); } public override Schema.IDataBaseSchema GetDataBaseSchema(DbConnection connection) Modified: trunk/nhibernate/src/NHibernate.Test/TestCase.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TestCase.cs 2011-03-09 04:20:13 UTC (rev 5446) +++ trunk/nhibernate/src/NHibernate.Test/TestCase.cs 2011-03-09 05:46:42 UTC (rev 5447) @@ -103,8 +103,6 @@ } catch (Exception e) { - // This line just added as a test, since there is no logged output on build server. - Console.WriteLine("Text Fixture Setup Exception: " + e); log.Error("Error while setting up the test fixture", e); throw; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-09 04:20:19
|
Revision: 5446 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5446&view=rev Author: patearl Date: 2011-03-09 04:20:13 +0000 (Wed, 09 Mar 2011) Log Message: ----------- SQLite: Avoid the problematic cast function. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-09 03:42:40 UTC (rev 5445) +++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-09 04:20:13 UTC (rev 5446) @@ -67,6 +67,13 @@ RegisterFunction("mod", new SQLFunctionTemplate(NHibernateUtil.Int32, "((?1) % (?2))")); RegisterFunction("iif", new SQLFunctionTemplate(null, "case when ?1 then ?2 else ?3 end")); + + // Casting in SQLite is unnecessary since SQLite is essentially typeless. + // String operators can be performed on integers, integer ops on strings, etc. + // For some reason, doing cast('2001-02-03 04:05:06' as datetime) returns 2001. + // In fact, casting to even a type named as a string of garbage returns the same thing. + // Therefore, it's better to avoid the cast function entirely. + RegisterFunction("cast", new SQLFunctionTemplate(null, "(?1)")); } public override Schema.IDataBaseSchema GetDataBaseSchema(DbConnection connection) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-09 03:42:46
|
Revision: 5445 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5445&view=rev Author: patearl Date: 2011-03-09 03:42:40 +0000 (Wed, 09 Mar 2011) Log Message: ----------- Tests: Added a debug line to help resolve a build server problem. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/TestCase.cs Modified: trunk/nhibernate/src/NHibernate.Test/TestCase.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TestCase.cs 2011-03-08 19:27:30 UTC (rev 5444) +++ trunk/nhibernate/src/NHibernate.Test/TestCase.cs 2011-03-09 03:42:40 UTC (rev 5445) @@ -103,6 +103,8 @@ } catch (Exception e) { + // This line just added as a test, since there is no logged output on build server. + Console.WriteLine("Text Fixture Setup Exception: " + e); log.Error("Error while setting up the test fixture", e); throw; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2011-03-08 19:27:36
|
Revision: 5444 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5444&view=rev Author: fabiomaulo Date: 2011-03-08 19:27:30 +0000 (Tue, 08 Mar 2011) Log Message: ----------- Fix NH-2480 Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Linq/LinqTestCase.cs Modified: trunk/nhibernate/src/NHibernate.Test/Linq/LinqTestCase.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/LinqTestCase.cs 2011-03-07 06:03:44 UTC (rev 5443) +++ trunk/nhibernate/src/NHibernate.Test/Linq/LinqTestCase.cs 2011-03-08 19:27:30 UTC (rev 5444) @@ -1,8 +1,10 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Linq; using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; +using SharpTestsEx; namespace NHibernate.Test.Linq { @@ -63,15 +65,9 @@ } } - public void AssertByIds<T, K>(IEnumerable<T> q, K[] ids, Converter<T, K> getId) + public void AssertByIds<TEntity, TId>(IEnumerable<TEntity> entities, TId[] expectedIds, Converter<TEntity, TId> entityIdGetter) { - int current = 0; - foreach (T customer in q) - { - Assert.AreEqual(ids[current], getId(customer)); - current += 1; - } - Assert.AreEqual(current, ids.Length); + entities.Select(x => entityIdGetter(x)).Should().Have.SameValuesAs(expectedIds); } } } \ 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: <pa...@us...> - 2011-03-07 06:03:50
|
Revision: 5443 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5443&view=rev Author: patearl Date: 2011-03-07 06:03:44 +0000 (Mon, 07 Mar 2011) Log Message: ----------- SQLite: Use a more successful datetime string for the date() function. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 22:46:09 UTC (rev 5442) +++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-07 06:03:44 UTC (rev 5443) @@ -55,6 +55,11 @@ RegisterFunction("year", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%Y', ?1)")); // Uses local time like MSSQL and PostgreSQL. RegisterFunction("current_timestamp", new SQLFunctionTemplate(NHibernateUtil.DateTime, "datetime(current_timestamp, 'localtime')")); + // The System.Data.SQLite driver stores both Date and DateTime as 'YYYY-MM-DD HH:MM:SS' + // The SQLite date() function returns YYYY-MM-DD, which unfortunately SQLite does not consider + // as equal to 'YYYY-MM-DD 00:00:00'. Because of this, it is best to return the + // 'YYYY-MM-DD 00:00:00' format for the date function. + RegisterFunction("date", new SQLFunctionTemplate(NHibernateUtil.Date, "datetime(date(?1))")); RegisterFunction("substring", new StandardSQLFunction("substr", NHibernateUtil.String)); RegisterFunction("trim", new AnsiTrimEmulationFunction()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-06 22:46:15
|
Revision: 5442 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5442&view=rev Author: patearl Date: 2011-03-06 22:46:09 +0000 (Sun, 06 Mar 2011) Log Message: ----------- SQLite: Indicate that SQLite does not support locate function. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs Modified: trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs 2011-03-06 21:22:34 UTC (rev 5441) +++ trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs 2011-03-06 22:46:09 UTC (rev 5442) @@ -16,5 +16,10 @@ { get { return false; } } + + public override bool SupportsLocate + { + get { return false; } + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-06 21:22:40
|
Revision: 5441 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5441&view=rev Author: patearl Date: 2011-03-06 21:22:34 +0000 (Sun, 06 Mar 2011) Log Message: ----------- SQLite: Fixed guid generation function. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 21:13:30 UTC (rev 5440) +++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 21:22:34 UTC (rev 5441) @@ -245,7 +245,7 @@ public override string SelectGUIDString { - get { return "randomblob(16)"; } + get { return "select randomblob(16)"; } } } } \ 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: <pa...@us...> - 2011-03-06 21:13:36
|
Revision: 5440 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5440&view=rev Author: patearl Date: 2011-03-06 21:13:30 +0000 (Sun, 06 Mar 2011) Log Message: ----------- Ignore tests relying on locate when locate function is not available. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Linq/FunctionTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/ReadonlyTestCase.cs trunk/nhibernate/src/NHibernate.Test/TestDialect.cs Modified: trunk/nhibernate/src/NHibernate.Test/Linq/FunctionTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/FunctionTests.cs 2011-03-06 20:46:10 UTC (rev 5439) +++ trunk/nhibernate/src/NHibernate.Test/Linq/FunctionTests.cs 2011-03-06 21:13:30 UTC (rev 5440) @@ -45,6 +45,9 @@ [Test] public void CharIndexFunction() { + if (!TestDialect.SupportsLocate) + Assert.Ignore("Locate function not supported."); + var query = from e in db.Employees where e.FirstName.IndexOf('A') == 1 select e.FirstName; @@ -55,6 +58,9 @@ [Test] public void IndexOfFunctionExpression() { + if (!TestDialect.SupportsLocate) + Assert.Ignore("Locate function not supported."); + var query = from e in db.Employees where e.FirstName.IndexOf("An") == 1 select e.FirstName; @@ -75,7 +81,10 @@ [Test] public void TwoFunctionExpression() { - var query = from e in db.Employees + if (!TestDialect.SupportsLocate) + Assert.Ignore("Locate function not supported."); + + var query = from e in db.Employees where e.FirstName.IndexOf("A") == e.BirthDate.Value.Month select e.FirstName; Modified: trunk/nhibernate/src/NHibernate.Test/Linq/ReadonlyTestCase.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/ReadonlyTestCase.cs 2011-03-06 20:46:10 UTC (rev 5439) +++ trunk/nhibernate/src/NHibernate.Test/Linq/ReadonlyTestCase.cs 2011-03-06 21:13:30 UTC (rev 5440) @@ -23,6 +23,11 @@ get { return NHibernate.Dialect.Dialect.GetDialect(_cfg.Properties); } } + protected TestDialect TestDialect + { + get { return TestDialect.GetTestDialect(Dialect); } + } + /// <summary> /// To use in in-line test /// </summary> Modified: trunk/nhibernate/src/NHibernate.Test/TestDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TestDialect.cs 2011-03-06 20:46:10 UTC (rev 5439) +++ trunk/nhibernate/src/NHibernate.Test/TestDialect.cs 2011-03-06 21:13:30 UTC (rev 5440) @@ -23,5 +23,6 @@ public virtual bool SupportsOperatorAll { get { return true; } } public virtual bool SupportsOperatorSome { get { return true; } } + public virtual bool SupportsLocate { get { return true; } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-06 20:46:17
|
Revision: 5439 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5439&view=rev Author: patearl Date: 2011-03-06 20:46:10 +0000 (Sun, 06 Mar 2011) Log Message: ----------- Tests: Added test dialect indicator for "= some (subquery)". Don't test for it when it's not supported. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs trunk/nhibernate/src/NHibernate.Test/Legacy/SQLFunctionsTest.cs trunk/nhibernate/src/NHibernate.Test/TestDialect.cs trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs Modified: trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs 2011-03-06 20:39:29 UTC (rev 5438) +++ trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs 2011-03-06 20:46:10 UTC (rev 5439) @@ -510,7 +510,7 @@ foo.TheFoo.TheFoo = foo; foo.String = "fizard"; - if (Dialect.SupportsSubSelects) + if (Dialect.SupportsSubSelects && TestDialect.SupportsOperatorSome) { if (!(Dialect is FirebirdDialect)) { Modified: trunk/nhibernate/src/NHibernate.Test/Legacy/SQLFunctionsTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Legacy/SQLFunctionsTest.cs 2011-03-06 20:39:29 UTC (rev 5438) +++ trunk/nhibernate/src/NHibernate.Test/Legacy/SQLFunctionsTest.cs 2011-03-06 20:46:10 UTC (rev 5439) @@ -478,7 +478,7 @@ s.Save(min, (long) 30); - if (Dialect.SupportsSubSelects) + if (Dialect.SupportsSubSelects && TestDialect.SupportsOperatorSome) { Assert.AreEqual(2, s.CreateQuery( Modified: trunk/nhibernate/src/NHibernate.Test/TestDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TestDialect.cs 2011-03-06 20:39:29 UTC (rev 5438) +++ trunk/nhibernate/src/NHibernate.Test/TestDialect.cs 2011-03-06 20:46:10 UTC (rev 5439) @@ -22,5 +22,6 @@ } public virtual bool SupportsOperatorAll { get { return true; } } + public virtual bool SupportsOperatorSome { get { return true; } } } } Modified: trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs 2011-03-06 20:39:29 UTC (rev 5438) +++ trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs 2011-03-06 20:46:10 UTC (rev 5439) @@ -11,5 +11,10 @@ { get { return false; } } + + public override bool SupportsOperatorSome + { + get { return false; } + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-06 20:39:35
|
Revision: 5438 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5438&view=rev Author: patearl Date: 2011-03-06 20:39:29 +0000 (Sun, 06 Mar 2011) Log Message: ----------- SQLite: Added "iff" function. Ignore some unsupported tests. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/SQLExceptionConversionTest.cs trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 20:03:56 UTC (rev 5437) +++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 20:39:29 UTC (rev 5438) @@ -60,6 +60,8 @@ RegisterFunction("trim", new AnsiTrimEmulationFunction()); RegisterFunction("mod", new SQLFunctionTemplate(NHibernateUtil.Int32, "((?1) % (?2))")); + + RegisterFunction("iif", new SQLFunctionTemplate(null, "case when ?1 then ?2 else ?3 end")); } public override Schema.IDataBaseSchema GetDataBaseSchema(DbConnection connection) Modified: trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/SQLExceptionConversionTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/SQLExceptionConversionTest.cs 2011-03-06 20:03:56 UTC (rev 5437) +++ trunk/nhibernate/src/NHibernate.Test/ExceptionsTest/SQLExceptionConversionTest.cs 2011-03-06 20:39:29 UTC (rev 5438) @@ -44,6 +44,9 @@ [Test] public void IntegrityViolation() { + if (Dialect is SQLiteDialect) + Assert.Ignore("Example exception converter not implemented."); + //ISQLExceptionConverter converter = Dialect.BuildSQLExceptionConverter(); ISQLExceptionConverter converter = sessions.Settings.SqlExceptionConverter; @@ -107,6 +110,9 @@ [Test] public void BadGrammar() { + if (Dialect is SQLiteDialect) + Assert.Ignore("Example exception converter not implemented."); + //ISQLExceptionConverter converter = Dialect.BuildSQLExceptionConverter(); ISQLExceptionConverter converter = sessions.Settings.SqlExceptionConverter; Modified: trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs 2011-03-06 20:03:56 UTC (rev 5437) +++ trunk/nhibernate/src/NHibernate.Test/Legacy/FooBarTest.cs 2011-03-06 20:39:29 UTC (rev 5438) @@ -2737,7 +2737,7 @@ IList list; // disable this for dbs with no subselects - if (Dialect.SupportsSubSelects) + if (Dialect.SupportsSubSelects && TestDialect.SupportsOperatorAll) { if (IsClassicParser) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-06 20:04:03
|
Revision: 5437 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5437&view=rev Author: patearl Date: 2011-03-06 20:03:56 +0000 (Sun, 06 Mar 2011) Log Message: ----------- Support "mod" function for PostgreSQL and SQLite. Support GUID generation for SQLite. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/PostgreSQLDialect.cs trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/PostgreSQLDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/PostgreSQLDialect.cs 2011-03-06 16:29:29 UTC (rev 5436) +++ trunk/nhibernate/src/NHibernate/Dialect/PostgreSQLDialect.cs 2011-03-06 20:03:56 UTC (rev 5437) @@ -67,6 +67,8 @@ RegisterFunction("substring", new AnsiSubstringFunction()); RegisterFunction("replace", new StandardSQLFunction("replace", NHibernateUtil.String)); + RegisterFunction("mod", new SQLFunctionTemplate(NHibernateUtil.Int32, "((?1) % (?2))")); + DefaultProperties[Environment.ConnectionDriver] = "NHibernate.Driver.NpgsqlDriver"; } Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 16:29:29 UTC (rev 5436) +++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 20:03:56 UTC (rev 5437) @@ -53,12 +53,13 @@ RegisterFunction("day", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%d', ?1)")); RegisterFunction("month", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%m', ?1)")); RegisterFunction("year", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%Y', ?1)")); - // Uses local time like MSSQL and PostgreSQL. RegisterFunction("current_timestamp", new SQLFunctionTemplate(NHibernateUtil.DateTime, "datetime(current_timestamp, 'localtime')")); RegisterFunction("substring", new StandardSQLFunction("substr", NHibernateUtil.String)); RegisterFunction("trim", new AnsiTrimEmulationFunction()); + + RegisterFunction("mod", new SQLFunctionTemplate(NHibernateUtil.Int32, "((?1) % (?2))")); } public override Schema.IDataBaseSchema GetDataBaseSchema(DbConnection connection) @@ -239,5 +240,10 @@ { return true; } + + public override string SelectGUIDString + { + get { return "randomblob(16)"; } + } } } \ 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: <pa...@us...> - 2011-03-06 16:29:36
|
Revision: 5436 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5436&view=rev Author: patearl Date: 2011-03-06 16:29:29 +0000 (Sun, 06 Mar 2011) Log Message: ----------- SQLite: Change current_timestamp to return local time like other DBs. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 07:17:04 UTC (rev 5435) +++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 16:29:29 UTC (rev 5436) @@ -53,7 +53,10 @@ RegisterFunction("day", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%d', ?1)")); RegisterFunction("month", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%m', ?1)")); RegisterFunction("year", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%Y', ?1)")); - RegisterFunction("current_timestamp", new NoArgSQLFunction("current_timestamp", NHibernateUtil.DateTime, false)); + + // Uses local time like MSSQL and PostgreSQL. + RegisterFunction("current_timestamp", new SQLFunctionTemplate(NHibernateUtil.DateTime, "datetime(current_timestamp, 'localtime')")); + RegisterFunction("substring", new StandardSQLFunction("substr", NHibernateUtil.String)); RegisterFunction("trim", new AnsiTrimEmulationFunction()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-06 07:17:10
|
Revision: 5435 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5435&view=rev Author: patearl Date: 2011-03-06 07:17:04 +0000 (Sun, 06 Mar 2011) Log Message: ----------- SQLite: Support for current_timestamp() function. Returns UTC with SQLite. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 06:53:56 UTC (rev 5434) +++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 07:17:04 UTC (rev 5435) @@ -53,6 +53,7 @@ RegisterFunction("day", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%d', ?1)")); RegisterFunction("month", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%m', ?1)")); RegisterFunction("year", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%Y', ?1)")); + RegisterFunction("current_timestamp", new NoArgSQLFunction("current_timestamp", NHibernateUtil.DateTime, false)); RegisterFunction("substring", new StandardSQLFunction("substr", NHibernateUtil.String)); RegisterFunction("trim", new AnsiTrimEmulationFunction()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-06 06:54:02
|
Revision: 5434 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5434&view=rev Author: patearl Date: 2011-03-06 06:53:56 +0000 (Sun, 06 Mar 2011) Log Message: ----------- Handle databases with unsupported "All" operator in criteria query tests. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Criteria/CriteriaQueryTest.cs Modified: trunk/nhibernate/src/NHibernate.Test/Criteria/CriteriaQueryTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Criteria/CriteriaQueryTest.cs 2011-03-06 06:52:05 UTC (rev 5433) +++ trunk/nhibernate/src/NHibernate.Test/Criteria/CriteriaQueryTest.cs 2011-03-06 06:53:56 UTC (rev 5434) @@ -121,7 +121,7 @@ .SetProjection(Property.ForName("Name")); session.CreateCriteria(typeof(Student)) - .Add(Subqueries.PropertyEqAll("Name", dc)) + .Add(Subqueries.PropertyEq("Name", dc)) .List(); } } @@ -183,17 +183,23 @@ .Add(Property.ForName("StudentNumber").Eq(232L)) .SetProjection(Property.ForName("Name")); - session.CreateCriteria(typeof(Student)) - .Add(Subqueries.PropertyEqAll("Name", dc)) - .List(); + if (TestDialect.SupportsOperatorAll) + { + session.CreateCriteria(typeof (Student)) + .Add(Subqueries.PropertyEqAll("Name", dc)) + .List(); + } session.CreateCriteria(typeof(Student)) .Add(Subqueries.Exists(dc)) .List(); - session.CreateCriteria(typeof(Student)) - .Add(Property.ForName("Name").EqAll(dc)) - .List(); + if (TestDialect.SupportsOperatorAll) + { + session.CreateCriteria(typeof (Student)) + .Add(Property.ForName("Name").EqAll(dc)) + .List(); + } session.CreateCriteria(typeof(Student)) .Add(Subqueries.In("Gavin King", dc)) @@ -284,46 +290,52 @@ t.Commit(); } - - using (ISession session = OpenSession()) - using (ITransaction t = session.BeginTransaction()) + + if (TestDialect.SupportsOperatorAll) { - try + using (ISession session = OpenSession()) + using (ITransaction t = session.BeginTransaction()) { - session.CreateCriteria<Student>() - .Add(Subqueries.PropertyEqAll("CityState", dc)) - .List(); - - Assert.Fail("should have failed because cannot compare subquery results with multiple columns"); + try + { + session.CreateCriteria<Student>() + .Add(Subqueries.PropertyEqAll("CityState", dc)) + .List(); + + Assert.Fail("should have failed because cannot compare subquery results with multiple columns"); + } + catch (QueryException ex) + { + // expected + } + t.Rollback(); } - catch (QueryException ex) - { - // expected - } - t.Rollback(); } - - using (ISession session = OpenSession()) - using (ITransaction t = session.BeginTransaction()) + + if (TestDialect.SupportsOperatorAll) { - try + using (ISession session = OpenSession()) + using (ITransaction t = session.BeginTransaction()) { - session.CreateCriteria<Student>() - .Add(Property.ForName("CityState").EqAll(dc)) - .List(); - - Assert.Fail("should have failed because cannot compare subquery results with multiple columns"); + try + { + session.CreateCriteria<Student>() + .Add(Property.ForName("CityState").EqAll(dc)) + .List(); + + Assert.Fail("should have failed because cannot compare subquery results with multiple columns"); + } + catch (QueryException ex) + { + // expected + } + finally + { + t.Rollback(); + } } - catch (QueryException ex) - { - // expected - } - finally - { - t.Rollback(); - } } - + using (ISession session = OpenSession()) using (ITransaction t = session.BeginTransaction()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-06 06:52:11
|
Revision: 5433 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5433&view=rev Author: patearl Date: 2011-03-06 06:52:05 +0000 (Sun, 06 Mar 2011) Log Message: ----------- Forgot to commit a file last time. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2011-03-06 06:49:45 UTC (rev 5432) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2011-03-06 06:52:05 UTC (rev 5433) @@ -669,6 +669,8 @@ <Compile Include="ReadOnly\StudentDto.cs" /> <Compile Include="ReadOnly\TextHolder.cs" /> <Compile Include="ReadOnly\VersionedNode.cs" /> + <Compile Include="TestDialect.cs" /> + <Compile Include="TestDialects\SQLiteTestDialect.cs" /> <Compile Include="TypesTest\CharClass.cs" /> <Compile Include="TypesTest\CharClassFixture.cs" /> <Compile Include="TypesTest\DateTimeClass.cs" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-06 06:49:51
|
Revision: 5432 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5432&view=rev Author: patearl Date: 2011-03-06 06:49:45 +0000 (Sun, 06 Mar 2011) Log Message: ----------- NHibernate.Test: Added TestDialect to help unit test different databases. This is used for cases that don't need to be in the regular NHibernate Dialect, since NHibernate doesn't use that information itself. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/TestCase.cs Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/TestDialect.cs trunk/nhibernate/src/NHibernate.Test/TestDialects/ trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs Modified: trunk/nhibernate/src/NHibernate.Test/TestCase.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TestCase.cs 2011-03-06 04:49:38 UTC (rev 5431) +++ trunk/nhibernate/src/NHibernate.Test/TestCase.cs 2011-03-06 06:49:45 UTC (rev 5432) @@ -29,6 +29,11 @@ get { return NHibernate.Dialect.Dialect.GetDialect(cfg.Properties); } } + protected TestDialect TestDialect + { + get { return TestDialect.GetTestDialect(Dialect); } + } + /// <summary> /// To use in in-line test /// </summary> Added: trunk/nhibernate/src/NHibernate.Test/TestDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TestDialect.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/TestDialect.cs 2011-03-06 06:49:45 UTC (rev 5432) @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NHibernate.Test +{ + /// <summary> + /// Like NHibernate's Dialect class, but for differences only important during testing. + /// Defaults to true for all support. Users of different dialects can turn support + /// off if the unit tests fail. + /// </summary> + public class TestDialect + { + public static TestDialect GetTestDialect(Dialect.Dialect dialect) + { + string testDialectTypeName = "NHibernate.Test.TestDialects." + dialect.GetType().Name.Replace("Dialect", "TestDialect"); + System.Type testDialectType = System.Type.GetType(testDialectTypeName); + if (testDialectType != null) + return (TestDialect)Activator.CreateInstance(testDialectType); + return new TestDialect(); + } + + public virtual bool SupportsOperatorAll { get { return true; } } + } +} Added: trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/TestDialects/SQLiteTestDialect.cs 2011-03-06 06:49:45 UTC (rev 5432) @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NHibernate.Test.TestDialects +{ + public class SQLiteTestDialect : TestDialect + { + public override bool SupportsOperatorAll + { + get { return false; } + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-06 04:49:44
|
Revision: 5431 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5431&view=rev Author: patearl Date: 2011-03-06 04:49:38 +0000 (Sun, 06 Mar 2011) Log Message: ----------- Ignore bit_length function for SQLite. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs Modified: trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs 2011-03-06 03:59:45 UTC (rev 5430) +++ trunk/nhibernate/src/NHibernate.Test/HQL/HQLFunctions.cs 2011-03-06 04:49:38 UTC (rev 5431) @@ -20,11 +20,11 @@ notSupportedStandardFunction.Add("locate", new[] { typeof(FirebirdDialect), typeof(PostgreSQLDialect), typeof(SQLiteDialect) }); notSupportedStandardFunction.Add("bit_length", - new[] { typeof(MsSql2000Dialect), typeof(MsSql2005Dialect), typeof(MsSql2008Dialect), typeof(Oracle8iDialect), typeof(Oracle9iDialect), typeof(Oracle10gDialect) }); + new[] { typeof(MsSql2000Dialect), typeof(MsSql2005Dialect), typeof(MsSql2008Dialect), typeof(Oracle8iDialect), typeof(Oracle9iDialect), typeof(Oracle10gDialect), typeof(SQLiteDialect) }); notSupportedStandardFunction.Add("extract", new[] { typeof(MsSql2000Dialect), typeof(MsSql2005Dialect), typeof(MsSql2008Dialect), typeof(SQLiteDialect) }); notSupportedStandardFunction.Add("nullif", - new[] { typeof(Oracle8iDialect)}); + new[] { typeof(Oracle8iDialect)}); } private bool IsOracleDialect() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-06 03:59:51
|
Revision: 5430 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5430&view=rev Author: patearl Date: 2011-03-06 03:59:45 +0000 (Sun, 06 Mar 2011) Log Message: ----------- SQLite: Added trim emulation function. SQLite: Improved quoting on date extraction functions. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 03:58:22 UTC (rev 5429) +++ trunk/nhibernate/src/NHibernate/Dialect/SQLiteDialect.cs 2011-03-06 03:59:45 UTC (rev 5430) @@ -47,13 +47,14 @@ RegisterColumnType(DbType.Boolean, "INTEGER"); RegisterColumnType(DbType.Guid, "UNIQUEIDENTIFIER"); - RegisterFunction("second", new SQLFunctionTemplate(NHibernateUtil.String, "strftime(\"%S\", ?1)")); - RegisterFunction("minute", new SQLFunctionTemplate(NHibernateUtil.String, "strftime(\"%M\", ?1)")); - RegisterFunction("hour", new SQLFunctionTemplate(NHibernateUtil.String, "strftime(\"%H\", ?1)")); - RegisterFunction("day", new SQLFunctionTemplate(NHibernateUtil.String, "strftime(\"%d\", ?1)")); - RegisterFunction("month", new SQLFunctionTemplate(NHibernateUtil.String, "strftime(\"%m\", ?1)")); - RegisterFunction("year", new SQLFunctionTemplate(NHibernateUtil.String, "strftime(\"%Y\", ?1)")); + RegisterFunction("second", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%S', ?1)")); + RegisterFunction("minute", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%M', ?1)")); + RegisterFunction("hour", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%H', ?1)")); + RegisterFunction("day", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%d', ?1)")); + RegisterFunction("month", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%m', ?1)")); + RegisterFunction("year", new SQLFunctionTemplate(NHibernateUtil.String, "strftime('%Y', ?1)")); RegisterFunction("substring", new StandardSQLFunction("substr", NHibernateUtil.String)); + RegisterFunction("trim", new AnsiTrimEmulationFunction()); } public override Schema.IDataBaseSchema GetDataBaseSchema(DbConnection connection) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2011-03-06 03:58:28
|
Revision: 5429 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5429&view=rev Author: patearl Date: 2011-03-06 03:58:22 +0000 (Sun, 06 Mar 2011) Log Message: ----------- TestCase: Added convenience method for running a SQL statement. Join Tests: Prevent SQLite locking problems by reusing the same transaction. Fixed cleanup bug in join tests that started manifesting itself with a different id generation algorithm. Avoid dependence on cascade delete to clean up. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Join/JoinTest.cs trunk/nhibernate/src/NHibernate.Test/Join/Person.hbm.xml trunk/nhibernate/src/NHibernate.Test/TestCase.cs Modified: trunk/nhibernate/src/NHibernate.Test/Join/JoinTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Join/JoinTest.cs 2011-03-05 17:57:59 UTC (rev 5428) +++ trunk/nhibernate/src/NHibernate.Test/Join/JoinTest.cs 2011-03-06 03:58:22 UTC (rev 5429) @@ -133,7 +133,7 @@ s.Clear(); // Remove the optional row from the join table and requery the User obj - ExecuteStatement("delete from t_user"); + ExecuteStatement(s, tx, "delete from t_user"); s.Clear(); // Clean up the test data @@ -171,7 +171,7 @@ } } - private Person PreparePersonWithInverseJoin(ISession s, string name, string stuffName) + private Person PreparePersonWithInverseJoin(ISession s, ITransaction tx, string name, string stuffName) { Person p = CreatePerson(name); @@ -181,7 +181,7 @@ if (stuffName != null) { - int count = ExecuteStatement( + int count = ExecuteStatement(s, tx, string.Format("insert into inversed_stuff (stuff_id, StuffName) values ({0}, '{1}')", p.Id, stuffName)); Assert.AreEqual(1, count, "Insert statement failed."); @@ -197,12 +197,14 @@ using (ITransaction tx = s.BeginTransaction()) { string stuffName = "name of the stuff"; - Person p = PreparePersonWithInverseJoin(s, "John", stuffName); + Person p = PreparePersonWithInverseJoin(s, tx, "John", stuffName); Person result = (Person) s.Get(typeof (Person), p.Id); Assert.IsNotNull(result); Assert.AreEqual(stuffName, result.StuffName); + ExecuteStatement(s, tx, "delete from inversed_stuff"); + tx.Commit(); } } @@ -215,7 +217,7 @@ { string stuffName = "name of the stuff"; - Person p = PreparePersonWithInverseJoin(s, "John", stuffName); + Person p = PreparePersonWithInverseJoin(s, tx, "John", stuffName); Person personToUpdate = (Person) s.Get(typeof (Person), p.Id); Assert.IsNotNull(personToUpdate); @@ -227,6 +229,8 @@ Person loaded = (Person) s.Get(typeof (Person), p.Id); Assert.AreEqual(stuffName, loaded.StuffName, "StuffName should not have been updated"); + ExecuteStatement(s, tx, "delete from inversed_stuff"); + tx.Commit(); } } @@ -259,7 +263,7 @@ using (ITransaction tx = s.BeginTransaction()) { string stuffName = "stuff not deleted"; - Person p = PreparePersonWithInverseJoin(s, "John", stuffName); + Person p = PreparePersonWithInverseJoin(s, tx, "John", stuffName); long personId = p.Id; s.Delete(p); @@ -282,6 +286,8 @@ string retrievedStuffName = (string) cmd2.ExecuteScalar(); Assert.AreEqual(stuffName, retrievedStuffName, "Retrieved inverse <join> does not match"); + ExecuteStatement(s, tx, "delete from inversed_stuff"); + tx.Commit(); } } Modified: trunk/nhibernate/src/NHibernate.Test/Join/Person.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Join/Person.hbm.xml 2011-03-05 17:57:59 UTC (rev 5428) +++ trunk/nhibernate/src/NHibernate.Test/Join/Person.hbm.xml 2011-03-06 03:58:22 UTC (rev 5429) @@ -45,7 +45,7 @@ <property name="Salary"/> <many-to-one name="Manager"/> <bag name="Meetings" cascade="all" inverse="true" access="property"> - <key column="person_id" on-delete="cascade"/> + <key column="person_id"/> <one-to-many class="Meeting"/> </bag> </join> Modified: trunk/nhibernate/src/NHibernate.Test/TestCase.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/TestCase.cs 2011-03-05 17:57:59 UTC (rev 5428) +++ trunk/nhibernate/src/NHibernate.Test/TestCase.cs 2011-03-06 03:58:22 UTC (rev 5429) @@ -285,6 +285,17 @@ } } + public int ExecuteStatement(ISession session, ITransaction transaction, string sql) + { + using (IDbCommand cmd = session.Connection.CreateCommand()) + { + cmd.CommandText = sql; + if (transaction != null) + transaction.Enlist(cmd); + return cmd.ExecuteNonQuery(); + } + } + protected ISessionFactoryImplementor Sfi { get { return sessions; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |