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...> - 2010-09-03 05:07:53
|
Revision: 5179 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5179&view=rev Author: fabiomaulo Date: 2010-09-03 05:07:46 +0000 (Fri, 03 Sep 2010) Log Message: ----------- Added CurrentSessionContext to configuration through lambdas Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/Loquacious/ConfigurationExtensions.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/Loquacious/ConfigurationExtensions.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/Loquacious/ConfigurationExtensions.cs 2010-09-02 14:45:56 UTC (rev 5178) +++ trunk/nhibernate/src/NHibernate/Cfg/Loquacious/ConfigurationExtensions.cs 2010-09-03 05:07:46 UTC (rev 5179) @@ -1,4 +1,5 @@ using System; +using NHibernate.Context; using NHibernate.Hql; using NHibernate.Linq.Functions; using NHibernate.Util; @@ -49,6 +50,12 @@ return configuration; } + public static Configuration CurrentSessionContext<TCurrentSessionContext>(this Configuration configuration) where TCurrentSessionContext : ICurrentSessionContext + { + configuration.SetProperty(Environment.CurrentSessionContextClass, typeof(TCurrentSessionContext).AssemblyQualifiedName); + return configuration; + } + public static Configuration Mappings(this Configuration configuration, Action<IMappingsConfigurationProperties> mappingsProperties) { mappingsProperties(new MappingsConfigurationProperties(configuration)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jul...@us...> - 2010-09-02 14:46:03
|
Revision: 5178 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5178&view=rev Author: julian-maughan Date: 2010-09-02 14:45:56 +0000 (Thu, 02 Sep 2010) Log Message: ----------- Adding test to demonstrate null SyncRoot on lazy loaded PersistentIdentifierBag collection (ref. NH-2111) Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2111/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2111/A.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2111/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2111/Mappings.hbm.xml Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2111/A.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2111/A.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2111/A.cs 2010-09-02 14:45:56 UTC (rev 5178) @@ -0,0 +1,30 @@ +using System; +using System.Collections; + +namespace NHibernate.Test.NHSpecificTest.NH2111 +{ + public class A + { + private int? _id; + private string _name; + private IList _lazyItems; + + public int? Id + { + get { return _id; } + set { _id = value; } + } + + public string Name + { + get { return _name; } + set { _name = value; } + } + + public IList LazyItems + { + get { return _lazyItems; } + set { _lazyItems = value; } + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2111/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2111/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2111/Fixture.cs 2010-09-02 14:45:56 UTC (rev 5178) @@ -0,0 +1,47 @@ +using System; +using System.Collections; + +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.NH2111 +{ + [TestFixture] + public class Fixture : BugTestCase + { + protected override void OnTearDown() + { + using( ISession s = sessions.OpenSession() ) + { + s.Delete( "from A" ); + s.Flush(); + } + } + + [Test] + public void SyncRootOnLazyLoad() + { + A a = new A(); + a.Name = "first generic type"; + a.LazyItems = new ArrayList(); + a.LazyItems.Add("first string"); + a.LazyItems.Add("second string"); + a.LazyItems.Add("third string"); + + ISession s = OpenSession(); + s.SaveOrUpdate(a); + s.Flush(); + s.Close(); + + Assert.IsNotNull(a.LazyItems.SyncRoot); + Assert.AreEqual("first string", a.LazyItems[0]); + + s = OpenSession(); + a = (A)s.Load(typeof(A), a.Id); + + Assert.IsNotNull(a.LazyItems.SyncRoot); + Assert.AreEqual("first string", a.LazyItems[0]); + + s.Close(); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2111/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2111/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2111/Mappings.hbm.xml 2010-09-02 14:45:56 UTC (rev 5178) @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping + xmlns="urn:nhibernate-mapping-2.2" + assembly="NHibernate.Test" + namespace="NHibernate.Test.NHSpecificTest.NH2111"> + + <class name="A" table="a" lazy="false"> + + <id name="Id" column="id" unsaved-value="null"> + <generator class="native" /> + </id> + + <property name="Name" column="aname" /> + + <idbag name="LazyItems" cascade="all-delete-orphan" lazy="true"> + <collection-id type="Int32" column="item_id"> + <generator class="increment" /> + </collection-id> + <key column="a_id" /> + <element type="string" /> + </idbag> + + </class> + +</hibernate-mapping> \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-09-01 18:39:43 UTC (rev 5177) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-09-02 14:45:56 UTC (rev 5178) @@ -455,6 +455,8 @@ <Compile Include="NHSpecificTest\NH1836\Entity.cs" /> <Compile Include="NHSpecificTest\NH1836\EntityDTO.cs" /> <Compile Include="NHSpecificTest\NH1836\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2111\A.cs" /> + <Compile Include="NHSpecificTest\NH2111\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2148\BugFixture.cs" /> <Compile Include="NHSpecificTest\NH2148\Domain.cs" /> <Compile Include="NHSpecificTest\NH2224\Domain.cs" /> @@ -1752,6 +1754,7 @@ </None> <EmbeddedResource Include="NHSpecificTest\NH2224\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2279\Mappings.hbm.xml" /> + <EmbeddedResource Include="NHSpecificTest\NH2111\Mappings.hbm.xml" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\NHibernate.ByteCode.Castle\NHibernate.ByteCode.Castle.csproj"> @@ -2596,6 +2599,7 @@ <EmbeddedResource Include="DynamicEntity\Tuplizer\Customer.hbm.xml" /> </ItemGroup> <ItemGroup> + <Folder Include="NHSpecificTest\NH2111" /> <Folder Include="NHSpecificTest\NH2279" /> <Folder Include="Properties\" /> </ItemGroup> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-09-01 18:39:50
|
Revision: 5177 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5177&view=rev Author: fabiomaulo Date: 2010-09-01 18:39:43 +0000 (Wed, 01 Sep 2010) Log Message: ----------- additional tests of NH-2029 (does not fail) Modified Paths: -------------- trunk/nhibernate/doc/reference/modules/filters.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Model.cs Modified: trunk/nhibernate/doc/reference/modules/filters.xml =================================================================== --- trunk/nhibernate/doc/reference/modules/filters.xml 2010-09-01 17:44:35 UTC (rev 5176) +++ trunk/nhibernate/doc/reference/modules/filters.xml 2010-09-01 18:39:43 UTC (rev 5177) @@ -124,6 +124,14 @@ the operator. </para> + <para> + Default all filter definitions are applied to <literal><many-to-one/></literal> and + <literal><one-to-one/></literal> elements. You can turn off this behaviour by + using <literal>use-many-to-one</literal> attribute on <literal><filter-def/></literal> + element. + </para> + <programlisting><![CDATA[<filter-def name="effectiveDate" use-many-to-one="false"/>]]></programlisting> + </sect1> </chapter> Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Fixture.cs 2010-09-01 17:44:35 UTC (rev 5176) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Fixture.cs 2010-09-01 18:39:43 UTC (rev 5177) @@ -16,12 +16,14 @@ private static IList<Parent> joinGraphUsingCriteria(ISession s) { - return s.CreateCriteria(typeof (Parent)).SetFetchMode("Child", FetchMode.Join).List<Parent>(); + return s.CreateCriteria(typeof(Parent)).SetFetchMode("Child", FetchMode.Join).List<Parent>(); } private static Parent createParent() { - return new Parent {Child = new Child()}; + var ret = new Parent { Child = new Child() }; + ret.Address = new Address { Parent = ret }; + return ret; } private static void enableFilters(ISession s) @@ -95,39 +97,125 @@ } } - [Test] - public void VerifyQueryWithWhereClause() - { - using (ISession s = OpenSession()) - { - using (ITransaction tx = s.BeginTransaction()) - { - var p = createParent(); - p.ParentString = "a"; - p.Child.ChildString = "b"; - s.Save(p); - tx.Commit(); - } - } - IList<Parent> resCriteria; - IList<Parent> resHql; - using (ISession s = OpenSession()) - { - enableFilters(s); - resCriteria = s.CreateCriteria(typeof(Parent), "p") - .CreateCriteria("Child", "c") - .SetFetchMode("Child", FetchMode.Join) - .Add(Restrictions.Eq("p.ParentString", "a")) - .Add(Restrictions.Eq("c.ChildString", "b")) - .List<Parent>(); - resHql = s.CreateQuery(@"select p from Parent p + [Test] + public void VerifyQueryWithWhereClause() + { + using (ISession s = OpenSession()) + { + using (ITransaction tx = s.BeginTransaction()) + { + var p = createParent(); + p.ParentString = "a"; + p.Child.ChildString = "b"; + s.Save(p); + tx.Commit(); + } + } + IList<Parent> resCriteria; + IList<Parent> resHql; + using (ISession s = OpenSession()) + { + enableFilters(s); + resCriteria = s.CreateCriteria(typeof(Parent), "p") + .CreateCriteria("Child", "c") + .SetFetchMode("Child", FetchMode.Join) + .Add(Restrictions.Eq("p.ParentString", "a")) + .Add(Restrictions.Eq("c.ChildString", "b")) + .List<Parent>(); + resHql = s.CreateQuery(@"select p from Parent p join fetch p.Child c where p.ParentString='a' and c.ChildString='b'").List<Parent>(); - } - Assert.AreEqual(1, resCriteria.Count); - Assert.IsNotNull(resCriteria[0].Child); - Assert.AreEqual(1, resHql.Count); - Assert.IsNotNull(resHql[0].Child); - } + } + Assert.AreEqual(1, resCriteria.Count); + Assert.IsNotNull(resCriteria[0].Child); + Assert.AreEqual(1, resHql.Count); + Assert.IsNotNull(resHql[0].Child); + } + + [Test] + public void VerifyAlwaysFiltersOnPropertyRef() + { + using (ISession s = OpenSession()) + { + using (ITransaction tx = s.BeginTransaction()) + { + Parent p = createParent(); + s.Save(p); + tx.Commit(); + } + } + + using (ISession s = OpenSession()) + { + enableFilters(s); + IList<Parent> resCriteria = joinGraphUsingCriteria(s); + IList<Parent> resHql = joinGraphUsingHql(s); + + Assert.IsNotNull(resCriteria[0].Address); + Assert.IsNotNull(resHql[0].Address); + } + } + + [Test] + public void ExplicitFiltersOnCollectionsShouldBeActive() + { + using (ISession s = OpenSession()) + { + using (ITransaction tx = s.BeginTransaction()) + { + Parent p = createParent(); + p.Children = new List<Child> + { + new Child {IsActive = true}, + new Child {IsActive = false}, + new Child {IsActive = true} + }; + s.Save(p); + tx.Commit(); + } + } + + using (ISession s = OpenSession()) + { + IFilter f = s.EnableFilter("active"); + f.SetParameter("active", 1); + IList<Parent> resCriteria = joinGraphUsingCriteria(s); + IList<Parent> resHql = joinGraphUsingHql(s); + + Assert.AreEqual(2, resCriteria[0].Children.Count); + Assert.AreEqual(2, resHql[0].Children.Count); + } + } + + [Test] + public void ExplicitFiltersOnCollectionsShouldBeActiveWithEagerLoad() + { + using (ISession s = OpenSession()) + { + using (ITransaction tx = s.BeginTransaction()) + { + Parent p = createParent(); + p.Children = new List<Child> + { + new Child {IsActive = true}, + new Child {IsActive = false}, + new Child {IsActive = true} + }; + s.Save(p); + tx.Commit(); + } + } + + using (ISession s = OpenSession()) + { + IFilter f = s.EnableFilter("active"); + f.SetParameter("active", 1); + IList<Parent> resCriteria = s.CreateCriteria(typeof(Parent)).SetFetchMode("Children", FetchMode.Join).List<Parent>(); + IList<Parent> resHql = s.CreateQuery("select p from Parent p join fetch p.Children").List<Parent>(); + + Assert.AreEqual(2, resCriteria[0].Children.Count); + Assert.AreEqual(2, resHql[0].Children.Count); + } + } } } Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Mappings.hbm.xml 2010-09-01 17:44:35 UTC (rev 5176) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Mappings.hbm.xml 2010-09-01 18:39:43 UTC (rev 5177) @@ -10,6 +10,12 @@ <many-to-one name="Child" class="Child" cascade="all" not-null="true"/> <property name="ParentString"/> + <one-to-one name="Address" property-ref="Parent" cascade="all"/> + <bag name="Children" cascade="all"> + <key column="Parent" /> + <one-to-many class="Child"/> + <filter name="active" condition=":active = IsActive"/> + </bag> </class> <class name="Child"> @@ -20,13 +26,28 @@ <property name="Always"/> <property name="ChildString"/> <filter name="activeChild" condition=":active = IsActive" /> + <filter name="active" condition=":active = IsActive" /> <filter name="alwaysValid" condition=":always = Always" /> </class> + + <class name="Address"> + <id name="Id"> + <generator class="guid.comb"/> + </id> + <property name="IsActive"/> + <many-to-one name="Parent" /> + <filter name="active" condition=":active = IsActive" /> + </class> + <filter-def name="activeChild" use-many-to-one="false"> <filter-param name="active" type="int"/> </filter-def> + <filter-def name="active" use-many-to-one="false"> + <filter-param name="active" type="int"/> + </filter-def> + <filter-def name="alwaysValid"> <filter-param name="always" type="int"/> </filter-def> Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Model.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Model.cs 2010-09-01 17:44:35 UTC (rev 5176) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Model.cs 2010-09-01 18:39:43 UTC (rev 5177) @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; namespace NHibernate.Test.NHSpecificTest.ManyToOneFilters20Behaviour { @@ -6,7 +7,9 @@ { public virtual Guid Id { get; set; } public virtual Child Child { get; set; } - public virtual string ParentString { get; set; } + public virtual Address Address { get; set; } + public virtual IList<Child> Children { get; set; } + public virtual string ParentString { get; set; } } public class Child @@ -19,6 +22,13 @@ public virtual Guid Id { get; set; } public virtual bool IsActive { get; set; } public virtual bool Always { get; set; } - public virtual string ChildString { get; set; } + public virtual string ChildString { get; set; } } + + public class Address + { + public virtual Guid Id { get; set; } + public virtual Parent Parent { get; set; } + public virtual bool IsActive { get; set; } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-09-01 17:44:42
|
Revision: 5176 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5176&view=rev Author: fabiomaulo Date: 2010-09-01 17:44:35 +0000 (Wed, 01 Sep 2010) Log Message: ----------- Apply NH-2006 Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Model.cs Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Fixture.cs 2010-09-01 17:24:19 UTC (rev 5175) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Fixture.cs 2010-09-01 17:44:35 UTC (rev 5176) @@ -1,4 +1,5 @@ using System.Collections.Generic; +using NHibernate.Criterion; using NUnit.Framework; namespace NHibernate.Test.NHSpecificTest.ManyToOneFilters20Behaviour @@ -93,5 +94,40 @@ Assert.IsNotNull(resHql[0].Child); } } + + [Test] + public void VerifyQueryWithWhereClause() + { + using (ISession s = OpenSession()) + { + using (ITransaction tx = s.BeginTransaction()) + { + var p = createParent(); + p.ParentString = "a"; + p.Child.ChildString = "b"; + s.Save(p); + tx.Commit(); + } + } + IList<Parent> resCriteria; + IList<Parent> resHql; + using (ISession s = OpenSession()) + { + enableFilters(s); + resCriteria = s.CreateCriteria(typeof(Parent), "p") + .CreateCriteria("Child", "c") + .SetFetchMode("Child", FetchMode.Join) + .Add(Restrictions.Eq("p.ParentString", "a")) + .Add(Restrictions.Eq("c.ChildString", "b")) + .List<Parent>(); + resHql = s.CreateQuery(@"select p from Parent p + join fetch p.Child c + where p.ParentString='a' and c.ChildString='b'").List<Parent>(); + } + Assert.AreEqual(1, resCriteria.Count); + Assert.IsNotNull(resCriteria[0].Child); + Assert.AreEqual(1, resHql.Count); + Assert.IsNotNull(resHql[0].Child); + } } } Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Mappings.hbm.xml 2010-09-01 17:24:19 UTC (rev 5175) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Mappings.hbm.xml 2010-09-01 17:44:35 UTC (rev 5176) @@ -9,6 +9,7 @@ </id> <many-to-one name="Child" class="Child" cascade="all" not-null="true"/> + <property name="ParentString"/> </class> <class name="Child"> @@ -17,6 +18,7 @@ </id> <property name="IsActive"/> <property name="Always"/> + <property name="ChildString"/> <filter name="activeChild" condition=":active = IsActive" /> <filter name="alwaysValid" condition=":always = Always" /> </class> Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Model.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Model.cs 2010-09-01 17:24:19 UTC (rev 5175) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/ManyToOneFilters20Behaviour/Model.cs 2010-09-01 17:44:35 UTC (rev 5176) @@ -6,6 +6,7 @@ { public virtual Guid Id { get; set; } public virtual Child Child { get; set; } + public virtual string ParentString { get; set; } } public class Child @@ -18,5 +19,6 @@ public virtual Guid Id { get; set; } public virtual bool IsActive { get; set; } public virtual bool Always { get; set; } + public virtual string ChildString { get; set; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jul...@us...> - 2010-09-01 17:24:25
|
Revision: 5175 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5175&view=rev Author: julian-maughan Date: 2010-09-01 17:24:19 +0000 (Wed, 01 Sep 2010) Log Message: ----------- Adding file missing from rev. 5173 commit Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/A.cs Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/A.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/A.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/A.cs 2010-09-01 17:24:19 UTC (rev 5175) @@ -0,0 +1,47 @@ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace NHibernate.Test.NHSpecificTest.NH2279 +{ + public class A + { + private int? _id; + private string _name; + private IList<string> _items = new List<string>(); + private IList<B> _bs = new List<B>(); + + public A() + { + } + + public A(string name) + { + Name = name; + } + + public int? Id + { + get { return _id; } + set { _id = value; } + } + + public string Name + { + get { return _name; } + set { _name = value; } + } + + public IList<string> Items + { + get { return _items; } + set { _items = value; } + } + + public IList<B> Bs + { + get { return _bs; } + set { _bs = value; } + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-09-01 17:17:19
|
Revision: 5174 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5174&view=rev Author: fabiomaulo Date: 2010-09-01 17:17:12 +0000 (Wed, 01 Sep 2010) Log Message: ----------- Fix NH-2302 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs trunk/nhibernate/src/NHibernate/Driver/SqlClientDriver.cs trunk/nhibernate/src/NHibernate/SqlTypes/StringClobSqlType.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj trunk/nhibernate/src/NHibernate.sln Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2302/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2302/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2302/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2302/StringLengthEntity.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs 2010-09-01 17:08:11 UTC (rev 5173) +++ trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs 2010-09-01 17:17:12 UTC (rev 5174) @@ -40,6 +40,7 @@ /// </remarks> public class MsSql2000Dialect : Dialect { + public const int MaxSizeForLengthLimitedStrings = 4000; /// <summary></summary> public MsSql2000Dialect() { @@ -65,9 +66,9 @@ RegisterColumnType(DbType.Int64, "BIGINT"); RegisterColumnType(DbType.Single, "REAL"); //synonym for FLOAT(24) RegisterColumnType(DbType.StringFixedLength, "NCHAR(255)"); - RegisterColumnType(DbType.StringFixedLength, 4000, "NCHAR($l)"); + RegisterColumnType(DbType.StringFixedLength, MaxSizeForLengthLimitedStrings, "NCHAR($l)"); RegisterColumnType(DbType.String, "NVARCHAR(255)"); - RegisterColumnType(DbType.String, 4000, "NVARCHAR($l)"); + RegisterColumnType(DbType.String, MaxSizeForLengthLimitedStrings, "NVARCHAR($l)"); RegisterColumnType(DbType.String, 1073741823, "NTEXT"); RegisterColumnType(DbType.Time, "DATETIME"); Modified: trunk/nhibernate/src/NHibernate/Driver/SqlClientDriver.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Driver/SqlClientDriver.cs 2010-09-01 17:08:11 UTC (rev 5173) +++ trunk/nhibernate/src/NHibernate/Driver/SqlClientDriver.cs 2010-09-01 17:17:12 UTC (rev 5174) @@ -1,6 +1,7 @@ using System.Data; using System.Data.SqlClient; using NHibernate.AdoNet; +using NHibernate.Dialect; using NHibernate.SqlCommand; using NHibernate.SqlTypes; @@ -123,14 +124,7 @@ break; case DbType.String: case DbType.StringFixedLength: - if (sqlType is StringClobSqlType) - { - dbParam.Size = MaxStringClobSize; - } - else - { - dbParam.Size = MaxStringSize; - } + dbParam.Size = IsText(dbParam, sqlType) ? MaxStringClobSize : MaxStringSize; break; case DbType.DateTime2: dbParam.Size = MaxDateTime2; @@ -141,12 +135,18 @@ } } + private static bool IsText(IDbDataParameter dbParam, SqlType sqlType) + { + return (sqlType is StringClobSqlType) || (sqlType.LengthDefined && sqlType.Length > MsSql2000Dialect.MaxSizeForLengthLimitedStrings && + (DbType.String == dbParam.DbType || DbType.StringFixedLength == dbParam.DbType)); + } + private static void SetVariableLengthParameterSize(IDbDataParameter dbParam, SqlType sqlType) { SetDefaultParameterSize(dbParam, sqlType); // Override the defaults using data from SqlType. - if (sqlType.LengthDefined) + if (sqlType.LengthDefined && !IsText(dbParam, sqlType)) { dbParam.Size = sqlType.Length; } Modified: trunk/nhibernate/src/NHibernate/SqlTypes/StringClobSqlType.cs =================================================================== --- trunk/nhibernate/src/NHibernate/SqlTypes/StringClobSqlType.cs 2010-09-01 17:08:11 UTC (rev 5173) +++ trunk/nhibernate/src/NHibernate/SqlTypes/StringClobSqlType.cs 2010-09-01 17:17:12 UTC (rev 5174) @@ -26,7 +26,8 @@ /// <summary> /// Initializes a new instance of the <see cref="StringClobSqlType"/> class. /// </summary> - public StringClobSqlType() : base() + public StringClobSqlType() + : base(int.MaxValue / 2) { } Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2302/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2302/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2302/Fixture.cs 2010-09-01 17:17:12 UTC (rev 5174) @@ -0,0 +1,176 @@ +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.NH2302 +{ + [TestFixture] + public class Fixture : BugTestCase + { + protected override void OnTearDown() + { + CleanUp(); + + base.OnTearDown(); + } + + [Test] + public void StringHugeLength() + { + int id; + // buildup a string the exceed the mapping + string str = GetFixedLengthString12000(); + + using (ISession sess = OpenSession()) + using (ITransaction tx = sess.BeginTransaction()) + { + // create and save the entity + StringLengthEntity entity = new StringLengthEntity(); + entity.StringHugeLength = str; + sess.Save(entity); + tx.Commit(); + id = entity.ID; + } + + using (ISession sess = OpenSession()) + using (ITransaction tx = sess.BeginTransaction()) + { + StringLengthEntity loaded = sess.Get<StringLengthEntity>(id); + Assert.IsNotNull(loaded); + Assert.AreEqual(12000, loaded.StringHugeLength.Length); + Assert.AreEqual(str, loaded.StringHugeLength); + tx.Commit(); + } + } + + [Test, Ignore("Not supported without specify the string length.")] + public void StringSqlType() + { + int id; + // buildup a string the exceed the mapping + string str = GetFixedLengthString12000(); + + using (ISession sess = OpenSession()) + using (ITransaction tx = sess.BeginTransaction()) + { + // create and save the entity + StringLengthEntity entity = new StringLengthEntity(); + entity.StringSqlType = str; + sess.Save(entity); + tx.Commit(); + id = entity.ID; + } + + using (ISession sess = OpenSession()) + using (ITransaction tx = sess.BeginTransaction()) + { + StringLengthEntity loaded = sess.Get<StringLengthEntity>(id); + Assert.IsNotNull(loaded); + Assert.AreEqual(12000, loaded.StringSqlType.Length); + Assert.AreEqual(str, loaded.StringSqlType); + tx.Commit(); + } + } + + [Test] + public void BlobSqlType() + { + int id; + // buildup a string the exceed the mapping + string str = GetFixedLengthString12000(); + + using (ISession sess = OpenSession()) + using (ITransaction tx = sess.BeginTransaction()) + { + // create and save the entity + StringLengthEntity entity = new StringLengthEntity(); + entity.BlobSqlType = str; + sess.Save(entity); + tx.Commit(); + id = entity.ID; + } + + using (ISession sess = OpenSession()) + using (ITransaction tx = sess.BeginTransaction()) + { + StringLengthEntity loaded = sess.Get<StringLengthEntity>(id); + Assert.IsNotNull(loaded); + Assert.AreEqual(12000, loaded.BlobSqlType.Length); + Assert.AreEqual(str, loaded.BlobSqlType); + tx.Commit(); + } + } + + [Test] + public void BlobWithLength() + { + int id; + // buildup a string the exceed the mapping + string str = GetFixedLengthString12000(); + + using (ISession sess = OpenSession()) + using (ITransaction tx = sess.BeginTransaction()) + { + // create and save the entity + StringLengthEntity entity = new StringLengthEntity(); + entity.BlobLength = str; + sess.Save(entity); + tx.Commit(); + id = entity.ID; + } + + using (ISession sess = OpenSession()) + using (ITransaction tx = sess.BeginTransaction()) + { + StringLengthEntity loaded = sess.Get<StringLengthEntity>(id); + Assert.IsNotNull(loaded); + Assert.AreEqual(12000, loaded.BlobLength.Length); + Assert.AreEqual(str, loaded.BlobLength); + tx.Commit(); + } + } + + [Test] + public void BlobWithoutLength() + { + int id; + // buildup a string the exceed the mapping + string str = GetFixedLengthString12000(); + + using (ISession sess = OpenSession()) + using (ITransaction tx = sess.BeginTransaction()) + { + // create and save the entity + StringLengthEntity entity = new StringLengthEntity(); + entity.Blob = str; + sess.Save(entity); + tx.Commit(); + id = entity.ID; + } + + using (ISession sess = OpenSession()) + using (ITransaction tx = sess.BeginTransaction()) + { + StringLengthEntity loaded = sess.Get<StringLengthEntity>(id); + Assert.IsNotNull(loaded); + Assert.AreEqual(12000, loaded.Blob.Length); + Assert.AreEqual(str, loaded.Blob); + tx.Commit(); + } + } + + private void CleanUp() + { + using (ISession session = OpenSession()) + using (ITransaction tx = session.BeginTransaction()) + { + session.Delete("from StringLengthEntity"); + tx.Commit(); + } + } + + private static string GetFixedLengthString12000() + { + return new string('a', 12000); + } + + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2302/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2302/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2302/Mappings.hbm.xml 2010-09-01 17:17:12 UTC (rev 5174) @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false" default-cascade="all-delete-orphan"> + <class name="NHibernate.Test.NHSpecificTest.NH2302.StringLengthEntity, NHibernate.Test" table="StringLengthEntity" + lazy="false"> + <id name="ID" access="nosetter.pascalcase-m" column="ID" type="Int32" > + <generator class="native" /> + </id> + <!-- this generates an nvarchar(255) --> + <property name="StringDefault" column="StringDefault" type="string" /> + <!-- this generates an nvarchar(50) --> + <property name="StringFixedLength" column="StringFixedLength" type="string" length="50" /> + <!-- this generates an nvarchar(max) but it operate a truncation on reading and writing, in NHib 2.1 this was --> + <property name="StringHugeLength" column="StringHugeLength" type="string" length="10000" /> + <!-- this generates an nvarchar(max) but it operate a truncation reading and writing to the default string length (4000) --> + <property name="StringSqlType" type="string"> + <column name="StringSqlType" sql-type="nvarchar(max)" /> + </property> + <!-- this generates an nvarchar(255) otherwise reading and writing seem to be ok --> + <property name="Blob" column="Blob" type="StringClob" /> + <!-- this generates an nvarchar(max) but it operate a truncation on reading and writing (same as StringHugeLength) --> + <property name="BlobLength" column="BlobLength" type="StringClob" length="15000" /> + <!-- this mapping works! for generation, writing and reading --> + <property name="BlobSqlType" type="StringClob" > + <column name="BlobSqlType" sql-type="nvarchar(max)" /> + </property> + </class> +</hibernate-mapping> Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2302/StringLengthEntity.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2302/StringLengthEntity.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2302/StringLengthEntity.cs 2010-09-01 17:17:12 UTC (rev 5174) @@ -0,0 +1,25 @@ +namespace NHibernate.Test.NHSpecificTest.NH2302 +{ + public class StringLengthEntity + { + private int mID = 0; + public int ID + { + get { return mID; } + } + + public string StringDefault { get; set; } + + public string StringFixedLength { get; set; } + + public string StringHugeLength { get; set; } + + public string StringSqlType { get; set; } + + public string Blob { get; set; } + + public string BlobLength { get; set; } + + public string BlobSqlType { get; set; } + } +} Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-09-01 17:08:11 UTC (rev 5173) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-09-01 17:17:12 UTC (rev 5174) @@ -471,6 +471,8 @@ <Compile Include="NHSpecificTest\NH2287\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2293\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2294\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2302\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2302\StringLengthEntity.cs" /> <Compile Include="NHSpecificTest\NH2303\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2303\Model.cs" /> <Compile Include="TypesTest\CharClass.cs" /> @@ -2261,6 +2263,7 @@ <EmbeddedResource Include="CollectionTest\NullableValueTypeElementMapFixture.hbm.xml" /> <EmbeddedResource Include="DriverTest\EntityForMs2008.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH2302\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2303\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2287\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2266\Mappings.hbm.xml" /> Modified: trunk/nhibernate/src/NHibernate.sln =================================================================== --- trunk/nhibernate/src/NHibernate.sln 2010-09-01 17:08:11 UTC (rev 5173) +++ trunk/nhibernate/src/NHibernate.sln 2010-09-01 17:17:12 UTC (rev 5174) @@ -23,6 +23,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.TestDatabaseSetup", "NHibernate.TestDatabaseSetup\NHibernate.TestDatabaseSetup.csproj", "{BEEC1564-6FB6-49F7-BBE5-8EBD2F0F6E8A}" EndProject Global + GlobalSection(TestCaseManagementSettings) = postSolution + CategoryFile = NHibernate.vsmdi + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jul...@us...> - 2010-09-01 17:08:18
|
Revision: 5173 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5173&view=rev Author: julian-maughan Date: 2010-09-01 17:08:11 +0000 (Wed, 01 Sep 2010) Log Message: ----------- Fixes incorrect tracking of identifiers when performing add/insert/remove operations on PersistentIdentifierBag collection. Thanks go to Patrick Earl for this one (ref. NH2279, NH2111) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Collection/Generic/PersistentGenericIdentifierBag.cs trunk/nhibernate/src/NHibernate/Collection/PersistentIdentifierBag.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/B.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/C.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/Mappings.hbm.xml Modified: trunk/nhibernate/src/NHibernate/Collection/Generic/PersistentGenericIdentifierBag.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Collection/Generic/PersistentGenericIdentifierBag.cs 2010-08-31 18:08:13 UTC (rev 5172) +++ trunk/nhibernate/src/NHibernate/Collection/Generic/PersistentGenericIdentifierBag.cs 2010-09-01 17:08:11 UTC (rev 5173) @@ -78,7 +78,7 @@ void IList<T>.Insert(int index, T item) { Write(); - BeforeAdd(index); + BeforeInsert(index); gvalues.Insert(index, item); } Modified: trunk/nhibernate/src/NHibernate/Collection/PersistentIdentifierBag.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Collection/PersistentIdentifierBag.cs 2010-08-31 18:08:13 UTC (rev 5172) +++ trunk/nhibernate/src/NHibernate/Collection/PersistentIdentifierBag.cs 2010-09-01 17:08:11 UTC (rev 5173) @@ -77,7 +77,7 @@ private object GetIdentifier(int index) { // NH specific : To emulate IDictionary behavior but using Dictionary<int, object> (without boxing/unboxing for index) - object result; + object result = null; identifiers.TryGetValue(index, out result); return result; } @@ -217,16 +217,14 @@ return old != null && elemType.IsDirty(old, entry, Session); } - public override object ReadFrom(IDataReader reader, ICollectionPersister persister, ICollectionAliases descriptor, - object owner) + public override object ReadFrom(IDataReader reader, ICollectionPersister persister, ICollectionAliases descriptor, object owner) { object element = persister.ReadElement(reader, owner, descriptor.SuffixedElementAliases, Session); - object tempObject = GetIdentifier(values.Count); - identifiers[values.Count] = persister.ReadIdentifier(reader, descriptor.SuffixedIdentifierAlias, Session); - object old = tempObject; - if (old == null) + object id = persister.ReadIdentifier(reader, descriptor.SuffixedIdentifierAlias, Session); + if (!identifiers.ContainsValue(id)) { - values.Add(element); //maintain correct duplication if loaded in a cartesian product + identifiers[values.Count] = id; + values.Add(element); } return element; } @@ -290,11 +288,6 @@ protected void BeforeRemove(int index) { - if (!identifiers.ContainsKey(index)) - return; // index not previously persisted, nothing to do - - // Move the identifier being removed to the end of the list (i.e. it isn't actually removed). - object removedId = identifiers[index]; int last = values.Count - 1; for (int i = index; i < last; i++) { @@ -308,14 +301,22 @@ identifiers[i] = id; } } - identifiers[last] = removedId; + identifiers.Remove(last); } - protected void BeforeAdd(int index) + protected void BeforeInsert(int index) { - for (int i = index; i < values.Count; i++) + for (int i = values.Count - 1; i >= index; i--) { - identifiers[i + 1] = identifiers[i]; + object id = GetIdentifier(i); + if (id == null) + { + identifiers.Remove(i + 1); + } + else + { + identifiers[i + 1] = id; + } } identifiers.Remove(index); } @@ -354,6 +355,7 @@ set { Write(); + identifiers.Remove(index); values[index] = value; } } @@ -361,7 +363,7 @@ public void Insert(int index, object value) { Write(); - BeforeAdd(index); + BeforeInsert(index); values.Insert(index, value); } @@ -425,7 +427,7 @@ public object SyncRoot { - get { return values.SyncRoot; } + get { return this; } } #endregion Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/B.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/B.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/B.cs 2010-09-01 17:08:11 UTC (rev 5173) @@ -0,0 +1,40 @@ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace NHibernate.Test.NHSpecificTest.NH2279 +{ + public class B + { + private int? _id; + private string _name; + private IList<C> _cs = new List<C>(); + + public B() + { + } + + public B(string name) + { + Name = name; + } + + public int? Id + { + get { return _id; } + set { _id = value; } + } + + public string Name + { + get { return _name; } + set { _name = value; } + } + + public IList<C> Cs + { + get { return _cs; } + set { _cs = value; } + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/C.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/C.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/C.cs 2010-09-01 17:08:11 UTC (rev 5173) @@ -0,0 +1,32 @@ +using System; +using System.Collections; + +namespace NHibernate.Test.NHSpecificTest.NH2279 +{ + public class C + { + private int? _id; + private string _name; + + public C() + { + } + + public C(string name) + { + Name = name; + } + + public int? Id + { + get { return _id; } + set { _id = value; } + } + + public string Name + { + get { return _name; } + set { _name = value; } + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/Fixture.cs 2010-09-01 17:08:11 UTC (rev 5173) @@ -0,0 +1,159 @@ +using System.Collections.Generic; +using System.Linq; +using System.Collections; + +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.NH2279 +{ + [TestFixture] + public class Fixture : BugTestCase + { + protected override void OnTearDown() + { + using( ISession s = sessions.OpenSession() ) + { + s.Delete( "from A" ); + s.Flush(); + } + } + + [Test] + public void IdBagIndexTracking() + { + A a = new A("a"); + a.Name = "first generic type"; + a.Items.Add("a"); + a.Items.Add("b"); + a.Items.Add("c"); + + ISession s = OpenSession(); + s.SaveOrUpdate(a); + s.Flush(); + s.Close(); + + s = OpenSession(); + a = (A)s.Load(typeof(A), a.Id); + CollectionAssert.AreEquivalent(new[] {"a", "b", "c"}, a.Items); + + // Add and remove a "transient" item. + a.Items.Add("d"); + a.Items.Remove("d"); + + // Remove persisted items and then insert a transient item. + a.Items.Remove("b"); + a.Items.Remove("a"); + a.Items.Insert(0, "e"); + + // Add a couple transient items and insert another transient item between them. + a.Items.Add("f"); + a.Items.Add("g"); + a.Items.Insert(3, "h"); + + // Save and then see if we get what we expect. + s.SaveOrUpdate(a); + s.Flush(); + s.Close(); + + s = OpenSession(); + a = (A)s.Load(typeof(A), a.Id); + CollectionAssert.AreEquivalent(new [] {"c", "e", "f", "g", "h"}, a.Items); + + // Test changing a value by index directly. + a.Items[2] = "i"; + + string[] expected = a.Items.Cast<string>().ToArray(); + + s.SaveOrUpdate(a); + s.Flush(); + s.Close(); + + s = OpenSession(); + a = (A)s.Load(typeof(A), a.Id); + CollectionAssert.AreEquivalent(expected, a.Items); + + s.Flush(); + s.Close(); + } + + [Test] + public void CartesianProduct() + { + A a1 = new A("a1"); + A a2 = new A("a2"); + B b1 = new B("b1"); + B b2 = new B("b2"); + B b3 = new B("b3"); + B b4 = new B("b4"); + C c1 = new C("c1"); + C c2 = new C("c2"); + C c3 = new C("c3"); + C c4 = new C("c4"); + C c5 = new C("c5"); + C c6 = new C("c6"); + + a1.Bs.Add(b1); + a2.Bs.Add(b2); + a2.Bs.Add(b2); + + a1.Bs.Add(b3); + a2.Bs.Add(b3); + + a1.Bs.Add(b4); + a2.Bs.Add(b4); + a1.Bs.Add(b4); + a2.Bs.Add(b4); + + b1.Cs.Add(c1); + b2.Cs.Add(c2); + b2.Cs.Add(c2); + b3.Cs.Add(c3); + b3.Cs.Add(c3); + b3.Cs.Add(c3); + b4.Cs.Add(c4); + b4.Cs.Add(c4); + b4.Cs.Add(c4); + b4.Cs.Add(c4); + + b1.Cs.Add(c5); + b2.Cs.Add(c5); + b3.Cs.Add(c5); + b4.Cs.Add(c5); + + b1.Cs.Add(c6); + b2.Cs.Add(c6); + b3.Cs.Add(c6); + b4.Cs.Add(c6); + b1.Cs.Add(c6); + b2.Cs.Add(c6); + b3.Cs.Add(c6); + b4.Cs.Add(c6); + + ISession s = OpenSession(); + s.Save(a1); + s.Save(a2); + s.Flush(); + s.Close(); + + s = OpenSession(); + IList<A> results = s.CreateQuery("from A a join fetch a.Bs b join fetch b.Cs").List<A>().Distinct().ToList(); + + Assert.That(results, Has.Count.EqualTo(2)); + A ta1 = results.Single(a => a.Name == "a1"); + A ta2 = results.Single(a => a.Name == "a2"); + + Assert.That(ta1.Bs.Select(b => b.Name).ToArray(), Is.EquivalentTo(new[] { "b1", "b3", "b4", "b4" })); + Assert.That(ta2.Bs.Select(b => b.Name).ToArray(), Is.EquivalentTo(new[] { "b2", "b2", "b3", "b4", "b4" })); + B tb1 = ta1.Bs.First(b => b.Name == "b1"); + B tb2 = ta2.Bs.First(b => b.Name == "b2"); + B tb3 = ta1.Bs.First(b => b.Name == "b3"); + B tb4 = ta1.Bs.First(b => b.Name == "b4"); + + Assert.That(tb1.Cs.Select(c => c.Name).ToArray(), Is.EquivalentTo(new[] { "c1", "c5", "c6", "c6" })); + Assert.That(tb2.Cs.Select(c => c.Name).ToArray(), Is.EquivalentTo(new[] { "c2", "c2", "c5", "c6", "c6" })); + Assert.That(tb3.Cs.Select(c => c.Name).ToArray(), Is.EquivalentTo(new[] { "c3", "c3", "c3", "c5", "c6", "c6" })); + Assert.That(tb4.Cs.Select(c => c.Name).ToArray(), Is.EquivalentTo(new[] { "c4", "c4", "c4", "c4", "c5", "c6", "c6" })); + s.Close(); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2279/Mappings.hbm.xml 2010-09-01 17:08:11 UTC (rev 5173) @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping + xmlns="urn:nhibernate-mapping-2.2" + assembly="NHibernate.Test" + namespace="NHibernate.Test.NHSpecificTest.NH2279"> + + <class name="A" table="a" lazy="false"> + <id name="Id" column="id" unsaved-value="null"> + <generator class="native" /> + </id> + <property name="Name" column="name" /> + <idbag name="Items" cascade="all-delete-orphan"> + <collection-id type="Int32" column="item_id"> + <generator class="increment" /> + </collection-id> + <key column="a_id" /> + <element type="string" /> + </idbag> + <idbag name="Bs" cascade="all-delete-orphan"> + <collection-id type="Int32" column="item_id"> + <generator class="increment" /> + </collection-id> + <key column="a_id" /> + <many-to-many class="B" column="b_id" /> + </idbag> + </class> + + <class name="B" table="b" lazy="false"> + <id name="Id" column="id" unsaved-value="null"> + <generator class="native" /> + </id> + <property name="Name" column="name" /> + <idbag name="Cs" cascade="all-delete-orphan"> + <collection-id type="Int32" column="item_id"> + <generator class="increment" /> + </collection-id> + <key column="b_id" /> + <many-to-many class="C" column="c_id" /> + </idbag> + </class> + + <class name="C" table="c" lazy="false"> + <id name="Id" column="id" unsaved-value="null"> + <generator class="native" /> + </id> + <property name="Name" column="name" /> + </class> + +</hibernate-mapping> \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-08-31 18:08:13 UTC (rev 5172) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-09-01 17:08:11 UTC (rev 5173) @@ -463,6 +463,10 @@ <Compile Include="NHSpecificTest\NH2245\Model.cs" /> <Compile Include="NHSpecificTest\NH2266\Domain.cs" /> <Compile Include="NHSpecificTest\NH2266\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2279\A.cs" /> + <Compile Include="NHSpecificTest\NH2279\B.cs" /> + <Compile Include="NHSpecificTest\NH2279\C.cs" /> + <Compile Include="NHSpecificTest\NH2279\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2287\Domain.cs" /> <Compile Include="NHSpecificTest\NH2287\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2293\Fixture.cs" /> @@ -1745,6 +1749,7 @@ <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> <EmbeddedResource Include="NHSpecificTest\NH2224\Mappings.hbm.xml" /> + <EmbeddedResource Include="NHSpecificTest\NH2279\Mappings.hbm.xml" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\NHibernate.ByteCode.Castle\NHibernate.ByteCode.Castle.csproj"> @@ -2588,6 +2593,7 @@ <EmbeddedResource Include="DynamicEntity\Tuplizer\Customer.hbm.xml" /> </ItemGroup> <ItemGroup> + <Folder Include="NHSpecificTest\NH2279" /> <Folder Include="Properties\" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-08-31 18:08:19
|
Revision: 5172 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5172&view=rev Author: fabiomaulo Date: 2010-08-31 18:08:13 +0000 (Tue, 31 Aug 2010) Log Message: ----------- Fix NH-2303 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/ClassExtractor.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2303/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2303/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2303/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2303/Model.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/ClassExtractor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/ClassExtractor.cs 2010-08-31 16:30:50 UTC (rev 5171) +++ trunk/nhibernate/src/NHibernate/Cfg/ClassExtractor.cs 2010-08-31 18:08:13 UTC (rev 5172) @@ -1,5 +1,4 @@ using System.Xml; -using System.Linq; using NHibernate.Util; using System.Collections.Generic; using NHibernate.Cfg.MappingSchema; @@ -95,12 +94,77 @@ string assembly = document.assembly; string @namespace = document.@namespace; - classEntries.UnionWith(document.RootClasses.Select(c=> new ClassEntry(null, c.Name, c.EntityName, assembly, @namespace))); - classEntries.UnionWith(document.SubClasses.Select(c => new ClassEntry(c.extends, c.Name, c.EntityName, assembly, @namespace))); - classEntries.UnionWith(document.JoinedSubclasses.Select(c => new ClassEntry(c.extends, c.Name, c.EntityName, assembly, @namespace))); - classEntries.UnionWith(document.UnionSubclasses.Select(c => new ClassEntry(c.extends, c.Name, c.EntityName, assembly, @namespace))); + classEntries.UnionWith(GetRootClassesEntries(assembly, @namespace, document.RootClasses)); + classEntries.UnionWith(GetSubclassesEntries(assembly, @namespace, null, document.SubClasses)); + classEntries.UnionWith(GetJoinedSubclassesEntries(assembly, @namespace, null, document.JoinedSubclasses)); + classEntries.UnionWith(GetUnionSubclassesEntries(assembly, @namespace, null, document.UnionSubclasses)); return classEntries; } + + private static IEnumerable<ClassEntry> GetRootClassesEntries(string assembly, string @namespace,IEnumerable<HbmClass> rootClasses) + { + foreach (var rootClass in rootClasses) + { + string entityName = rootClass.EntityName; + yield return new ClassEntry(null, rootClass.Name, entityName, assembly, @namespace); + foreach (var classEntry in GetSubclassesEntries(assembly, @namespace, entityName, rootClass.Subclasses)) + { + yield return classEntry; + } + foreach (var classEntry in GetJoinedSubclassesEntries(assembly, @namespace, entityName, rootClass.JoinedSubclasses)) + { + yield return classEntry; + } + foreach (var classEntry in GetUnionSubclassesEntries(assembly, @namespace, entityName, rootClass.UnionSubclasses)) + { + yield return classEntry; + } + } + } + + private static IEnumerable<ClassEntry> GetSubclassesEntries(string assembly, string @namespace, string defaultExtends, + IEnumerable<HbmSubclass> hbmSubclasses) + { + foreach (HbmSubclass subclass in hbmSubclasses) + { + string extends = subclass.extends ?? defaultExtends; + yield return new ClassEntry(extends, subclass.Name, subclass.EntityName, assembly, @namespace); + foreach (ClassEntry classEntry in GetSubclassesEntries(assembly, @namespace, subclass.EntityName,subclass.Subclasses)) + { + yield return classEntry; + } + } + } + + private static IEnumerable<ClassEntry> GetJoinedSubclassesEntries(string assembly, string @namespace, + string defaultExtends, + IEnumerable<HbmJoinedSubclass> hbmJoinedSubclasses) + { + foreach (HbmJoinedSubclass subclass in hbmJoinedSubclasses) + { + string extends = subclass.extends ?? defaultExtends; + yield return new ClassEntry(extends, subclass.Name, subclass.EntityName, assembly, @namespace); + foreach (ClassEntry classEntry in GetJoinedSubclassesEntries(assembly, @namespace, subclass.EntityName, subclass.JoinedSubclasses)) + { + yield return classEntry; + } + } + } + + private static IEnumerable<ClassEntry> GetUnionSubclassesEntries(string assembly, string @namespace, + string defaultExtends, + IEnumerable<HbmUnionSubclass> hbmUnionSubclasses) + { + foreach (HbmUnionSubclass subclass in hbmUnionSubclasses) + { + string extends = subclass.extends ?? defaultExtends; + yield return new ClassEntry(extends, subclass.Name, subclass.EntityName, assembly, @namespace); + foreach (ClassEntry classEntry in GetUnionSubclassesEntries(assembly, @namespace, subclass.EntityName,subclass.UnionSubclasses)) + { + yield return classEntry; + } + } + } } } Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2303/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2303/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2303/Fixture.cs 2010-08-31 18:08:13 UTC (rev 5172) @@ -0,0 +1,19 @@ +using NHibernate.Cfg; +using NUnit.Framework; +using SharpTestsEx; + +namespace NHibernate.Test.NHSpecificTest.NH2303 +{ + public class Fixture + { + [Test] + public void IndependentSubclassElementCanExtendSubclass() + { + Configuration cfg = TestConfigurationHelper.GetDefaultConfiguration(); + cfg.Executing(c => c.AddResource("NHibernate.Test.NHSpecificTest.NH2303.Mappings.hbm.xml", GetType().Assembly)). + NotThrows(); + cfg.BuildSessionFactory(); + cfg.Executing(c => c.BuildSessionFactory()).NotThrows(); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2303/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2303/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2303/Mappings.hbm.xml 2010-08-31 18:08:13 UTC (rev 5172) @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + assembly="NHibernate.Test" + namespace="NHibernate.Test.NHSpecificTest.NH2303"> + + <class name="Actor" table="actors"> + <id name="Id" column="person_id"> + <generator class="increment" /> + </id> + <discriminator column="actor-type" /> + + <subclass name="Person" discriminator-value="P" /> + + <subclass name="Role" discriminator-value="R"> + <many-to-one name="Performer" class="Person" column="performer" /> + </subclass> + </class> + + <subclass name="Developer" extends="Role" discriminator-value="R-DEV" /> +</hibernate-mapping> Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2303/Model.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2303/Model.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2303/Model.cs 2010-08-31 18:08:13 UTC (rev 5172) @@ -0,0 +1,20 @@ +namespace NHibernate.Test.NHSpecificTest.NH2303 +{ + public abstract class Actor + { + public virtual int Id { get; set; } + } + + public class Person : Actor + { + } + + public abstract class Role : Actor + { + public virtual Person Performer { get; set; } + } + + public class Developer : Role + { + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-08-31 16:30:50 UTC (rev 5171) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-08-31 18:08:13 UTC (rev 5172) @@ -467,6 +467,8 @@ <Compile Include="NHSpecificTest\NH2287\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2293\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2294\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2303\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2303\Model.cs" /> <Compile Include="TypesTest\CharClass.cs" /> <Compile Include="TypesTest\CharClassFixture.cs" /> <Compile Include="TypesTest\DateTimeClass.cs" /> @@ -2254,6 +2256,7 @@ <EmbeddedResource Include="CollectionTest\NullableValueTypeElementMapFixture.hbm.xml" /> <EmbeddedResource Include="DriverTest\EntityForMs2008.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH2303\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2287\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2266\Mappings.hbm.xml" /> <EmbeddedResource Include="TypesTest\CharClass.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-08-31 16:30:56
|
Revision: 5171 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5171&view=rev Author: fabiomaulo Date: 2010-08-31 16:30:50 +0000 (Tue, 31 Aug 2010) Log Message: ----------- Fix NH-2307 Modified Paths: -------------- trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj trunk/nhibernate/src/NHibernate.ByteCode.LinFu.Tests/NHibernate.ByteCode.LinFu.Tests.csproj trunk/nhibernate/src/NHibernate.Everything.sln trunk/nhibernate/src/NHibernate.Example.Web/Web.Config Property Changed: ---------------- trunk/nhibernate/src/NHibernate.ByteCode.Castle/ trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ trunk/nhibernate/src/NHibernate.ByteCode.LinFu.Tests/ Property changes on: trunk/nhibernate/src/NHibernate.ByteCode.Castle ___________________________________________________________________ Modified: svn:ignore - obj .#* *.user *.xsx AssemblyInfo.cs *.aps *.eto [Bb]in [Dd]ebug [Rr]elease *resharper* + obj .#* *.user *.xsx AssemblyInfo.cs *.aps *.eto [Bb]in [Dd]ebug [Rr]elease *resharper* *[Rr]esparper* Modified: trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj 2010-08-31 16:14:12 UTC (rev 5170) +++ trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj 2010-08-31 16:30:50 UTC (rev 5171) @@ -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> <TargetFrameworkSubset> </TargetFrameworkSubset> @@ -42,6 +42,9 @@ <HintPath>..\..\lib\net\3.5\Iesi.Collections.dll</HintPath> </Reference> <Reference Include="System" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="AssemblyInfo.cs" /> Property changes on: trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests ___________________________________________________________________ Modified: svn:ignore - *.aps *.eto *.user *.xml *.xsx *resharper* .#* AssemblyInfo.cs [Bb]in [Dd]ebug [Rr]elease bin hibernate.cfg.xml obj + *.aps *.eto *.user *.xml *.xsx *resharper* .#* AssemblyInfo.cs [Bb]in [Dd]ebug [Rr]elease bin hibernate.cfg.xml obj *[Rr]esparper* 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 2010-08-31 16:14:12 UTC (rev 5170) +++ trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj 2010-08-31 16:30:50 UTC (rev 5171) @@ -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> <TargetFrameworkSubset> </TargetFrameworkSubset> @@ -50,6 +50,9 @@ <HintPath>..\..\lib\net\3.5\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> Property changes on: trunk/nhibernate/src/NHibernate.ByteCode.LinFu.Tests ___________________________________________________________________ Modified: svn:ignore - obj .#* *.user *.xsx AssemblyInfo.cs hibernate.cfg.xml *.aps *.eto [Bb]in [Dd]ebug [Rr]elease *resharper* *.xml NHibernate.ByteCode.LinFu.Tests.pidb + obj .#* *.user *.xsx AssemblyInfo.cs hibernate.cfg.xml *.aps *.eto [Bb]in [Dd]ebug [Rr]elease *resharper* *.xml NHibernate.ByteCode.LinFu.Tests.pidb *[Rr]esparper* Modified: trunk/nhibernate/src/NHibernate.ByteCode.LinFu.Tests/NHibernate.ByteCode.LinFu.Tests.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.LinFu.Tests/NHibernate.ByteCode.LinFu.Tests.csproj 2010-08-31 16:14:12 UTC (rev 5170) +++ trunk/nhibernate/src/NHibernate.ByteCode.LinFu.Tests/NHibernate.ByteCode.LinFu.Tests.csproj 2010-08-31 16:30:50 UTC (rev 5171) @@ -10,7 +10,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>NHibernate.ByteCode.LinFu.Tests</RootNamespace> <AssemblyName>NHibernate.ByteCode.LinFu.Tests</AssemblyName> - <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <TargetFrameworkSubset> </TargetFrameworkSubset> @@ -50,6 +50,9 @@ <HintPath>..\..\lib\net\3.5\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> Modified: trunk/nhibernate/src/NHibernate.Everything.sln =================================================================== --- trunk/nhibernate/src/NHibernate.Everything.sln 2010-08-31 16:14:12 UTC (rev 5170) +++ trunk/nhibernate/src/NHibernate.Everything.sln 2010-08-31 16:30:50 UTC (rev 5171) @@ -73,7 +73,7 @@ EndProject Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "NHibernate.Example.Web", "NHibernate.Example.Web\", "{C5D6EE68-1760-4F97-AD31-42343593D8C1}" ProjectSection(WebsiteProperties) = preProject - TargetFramework = "2.0" + TargetFramework = "3.5" ProjectReferences = "{5909BFE7-93CF-4E5F-BE22-6293368AF01D}|NHibernate.dll;{8289D6AD-9714-42D3-A94D-D4D9814D1281}|NHibernate.ByteCode.LinFu.dll;" Debug.AspNetCompiler.VirtualPath = "/NHibernate.Example.Web" Debug.AspNetCompiler.PhysicalPath = "NHibernate.Example.Web\" @@ -110,9 +110,6 @@ 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(TestCaseManagementSettings) = postSolution - CategoryFile = NHibernate.vsmdi - EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|.NET = Debug|.NET Debug|Any CPU = Debug|Any CPU Modified: trunk/nhibernate/src/NHibernate.Example.Web/Web.Config =================================================================== --- trunk/nhibernate/src/NHibernate.Example.Web/Web.Config 2010-08-31 16:14:12 UTC (rev 5170) +++ trunk/nhibernate/src/NHibernate.Example.Web/Web.Config 2010-08-31 16:30:50 UTC (rev 5171) @@ -9,14 +9,18 @@ --> <configuration> <configSections> - <section name="hibernate-configuration" - type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" - requirePermission="false" /> <!-- Important under Medium Trust --> - - <section name="log4net" - type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" - requirePermission="false" /> <!-- Important under Medium Trust --> - </configSections> + <section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" requirePermission="false"/> + <!-- Important under Medium Trust --> + <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false"/> + <!-- Important under Medium Trust --> + <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> + <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> + <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> + <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> + <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/> + <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> + <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> + <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup></sectionGroup></sectionGroup></configSections> <appSettings/> <connectionStrings/> <system.web> @@ -26,7 +30,12 @@ affects performance, set this value to true only during development. --> - <compilation debug="true"/> + <compilation debug="true"> + <assemblies> + <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> + <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> + <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> + <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation> <!-- The <authentication> section enables configuration of the security authentication mode used by @@ -45,14 +54,19 @@ <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> - <pages enableViewState="false" enableViewStateMac="false" /> + <pages enableViewState="false" enableViewStateMac="false"> + <controls> + <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> + <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></controls></pages> <!-- <trust level="Medium" /> --> - <httpModules> - <add name="CurrentSessionModule" type="NHibernate.Example.Web.CurrentSessionModule" /> - </httpModules> - </system.web> - + <add name="CurrentSessionModule" type="NHibernate.Example.Web.CurrentSessionModule"/> + <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpModules> + <httpHandlers> + <remove verb="*" path="*.asmx"/> + <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> + <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> + <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpHandlers></system.web> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <bytecode-provider type="null"/><!-- Important under Medium Trust --> <session-factory> @@ -66,28 +80,50 @@ <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property> </session-factory> </hibernate-configuration> - <log4net> <!-- Define some output appenders --> - <appender name="trace" - type="log4net.Appender.TraceAppender, log4net"> + <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" /> + <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n"/> </layout> </appender> - - <appender name="console" - type="log4net.Appender.ConsoleAppender, log4net"> + <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" /> + <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n"/> </layout> </appender> - <root> - <priority value="WARN" /> - <appender-ref ref="trace" /> + <priority value="WARN"/> + <appender-ref ref="trace"/> </root> </log4net> -</configuration> + <system.codedom> + <compilers> + <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4"> + <providerOption name="CompilerVersion" value="v3.5"/> + <providerOption name="WarnAsError" value="false"/></compiler> + <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4"> + <providerOption name="CompilerVersion" value="v3.5"/> + <providerOption name="OptionInfer" value="true"/> + <providerOption name="WarnAsError" value="false"/></compiler></compilers></system.codedom> + <system.webServer> + <validation validateIntegratedModeConfiguration="false"/> + <modules> + <remove name="ScriptModule"/> + <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></modules> + <handlers> + <remove name="WebServiceHandlerFactory-Integrated"/> + <remove name="ScriptHandlerFactory"/> + <remove name="ScriptHandlerFactoryAppServices"/> + <remove name="ScriptResource"/> + <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> + <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> + <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></handlers></system.webServer> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/> + <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/> + <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly></assemblyBinding></runtime></configuration> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-08-31 16:14:19
|
Revision: 5170 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5170&view=rev Author: fabiomaulo Date: 2010-08-31 16:14:12 +0000 (Tue, 31 Aug 2010) Log Message: ----------- Fix NH-2270 (thanks to Timur Krist?\195?\179f and David Pfeffer) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmAny.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmArray.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmBag.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmClass.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCollectionId.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmComponent.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCompositeElement.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCompositeIndex.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCompositeMapKey.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmDiscriminator.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmDynamicComponent.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmElement.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmId.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIdbag.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIndex.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIndexManyToAny.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIndexManyToMany.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoin.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoinedSubclass.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmKey.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmKeyManyToOne.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmKeyProperty.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmList.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmListIndex.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmManyToAny.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmManyToMany.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmManyToOne.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMap.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMapKey.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMapKeyManyToMany.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmNaturalId.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmNestedCompositeElement.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmOneToOne.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmPrimitiveArray.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmProperty.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSet.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSubclass.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmTimestamp.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmUnionSubclass.cs trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmVersion.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmAny.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmAny.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmAny.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -40,6 +41,7 @@ #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return column ?? AsColumns(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmArray.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmArray.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmArray.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -162,6 +163,7 @@ get { return null; } } + [XmlIgnore] public IEnumerable<HbmFilter> Filters { get { yield break; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmBag.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmBag.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmBag.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -163,6 +164,7 @@ get { return genericSpecified ? generic: (bool?) null; } } + [XmlIgnore] public IEnumerable<HbmFilter> Filters { get { return filter ?? new HbmFilter[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmClass.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmClass.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmClass.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -26,21 +27,25 @@ get { return Item1 as HbmTimestamp; } } + [XmlIgnore] public IEnumerable<HbmJoin> Joins { get { return Items1 != null ? Items1.OfType<HbmJoin>(): new HbmJoin[0]; } } + [XmlIgnore] public IEnumerable<HbmSubclass> Subclasses { get { return Items1 != null ? Items1.OfType<HbmSubclass>() : new HbmSubclass[0]; } } + [XmlIgnore] public IEnumerable<HbmJoinedSubclass> JoinedSubclasses { get { return Items1 != null ? Items1.OfType<HbmJoinedSubclass>() : new HbmJoinedSubclass[0]; } } + [XmlIgnore] public IEnumerable<HbmUnionSubclass> UnionSubclasses { get { return Items1 != null ? Items1.OfType<HbmUnionSubclass>() : new HbmUnionSubclass[0]; } @@ -155,6 +160,7 @@ #region Implementation of IPropertiesContainerMapping + [XmlIgnore] public IEnumerable<IEntityPropertyMapping> Properties { get { return Items != null ? Items.Cast<IEntityPropertyMapping>(): new IEntityPropertyMapping[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCollectionId.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCollectionId.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCollectionId.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -6,6 +7,7 @@ { #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return column ?? AsColumns(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmComponent.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmComponent.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmComponent.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -47,6 +48,7 @@ #region Implementation of IPropertiesContainerMapping + [XmlIgnore] public IEnumerable<IEntityPropertyMapping> Properties { get { return Items != null ? Items.Cast<IEntityPropertyMapping>() : new IEntityPropertyMapping[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCompositeElement.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCompositeElement.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCompositeElement.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -41,6 +42,7 @@ #region Implementation of IPropertiesContainerMapping + [XmlIgnore] public IEnumerable<IEntityPropertyMapping> Properties { get { return Items != null ? Items.Cast<IEntityPropertyMapping>() : new IEntityPropertyMapping[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCompositeIndex.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCompositeIndex.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCompositeIndex.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -8,6 +9,7 @@ { #region Implementation of IPropertiesContainerMapping + [XmlIgnore] public IEnumerable<IEntityPropertyMapping> Properties { get { return Items != null ? Items.Cast<IEntityPropertyMapping>() : new IEntityPropertyMapping[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCompositeMapKey.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCompositeMapKey.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmCompositeMapKey.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -8,6 +9,7 @@ { #region Implementation of IPropertiesContainerMapping + [XmlIgnore] public IEnumerable<IEntityPropertyMapping> Properties { get { return Items != null ? Items.Cast<IEntityPropertyMapping>() : new IEntityPropertyMapping[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmDiscriminator.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmDiscriminator.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmDiscriminator.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -6,6 +7,7 @@ { #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get @@ -35,6 +37,7 @@ #region Implementation of IFormulasMapping + [XmlIgnore] public IEnumerable<HbmFormula> Formulas { get Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmDynamicComponent.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmDynamicComponent.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmDynamicComponent.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -47,6 +48,7 @@ #region Implementation of IPropertiesContainerMapping + [XmlIgnore] public IEnumerable<IEntityPropertyMapping> Properties { get { return Items != null ? Items.Cast<IEntityPropertyMapping>() : new IEntityPropertyMapping[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmElement.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmElement.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmElement.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -8,6 +9,7 @@ { #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return Items != null ? Items.OfType<HbmColumn>() : AsColumns(); } @@ -40,6 +42,7 @@ #region Implementation of IFormulasMapping + [XmlIgnore] public IEnumerable<HbmFormula> Formulas { get { return Items != null ? Items.OfType<HbmFormula>() : AsFormulas(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmId.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmId.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmId.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -7,6 +8,7 @@ { #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return column ?? AsColumns(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIdbag.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIdbag.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIdbag.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -162,6 +163,7 @@ get { return genericSpecified ? generic : (bool?)null; } } + [XmlIgnore] public IEnumerable<HbmFilter> Filters { get { return filter ?? new HbmFilter[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIndex.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIndex.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIndex.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -7,6 +8,7 @@ { #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return column ?? AsColumns(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIndexManyToAny.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIndexManyToAny.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIndexManyToAny.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -7,6 +8,7 @@ { #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return column ?? AsColumns(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIndexManyToMany.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIndexManyToMany.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmIndexManyToMany.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -6,6 +7,7 @@ { #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return column ?? AsColumns(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoin.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoin.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoin.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -32,6 +33,7 @@ #region Implementation of IPropertiesContainerMapping + [XmlIgnore] public IEnumerable<IEntityPropertyMapping> Properties { get { return Items != null ? Items.Cast<IEntityPropertyMapping>() : new IEntityPropertyMapping[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoinedSubclass.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoinedSubclass.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmJoinedSubclass.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,10 +1,12 @@ using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { public partial class HbmJoinedSubclass : AbstractDecoratable, IEntityMapping { + [XmlIgnore] public IEnumerable<HbmJoinedSubclass> JoinedSubclasses { get { return joinedsubclass1 ?? new HbmJoinedSubclass[0]; } @@ -113,6 +115,7 @@ #region Implementation of IPropertiesContainerMapping + [XmlIgnore] public IEnumerable<IEntityPropertyMapping> Properties { get { return Items != null ? Items.Cast<IEntityPropertyMapping>() : new IEntityPropertyMapping[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmKey.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmKey.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmKey.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -6,6 +7,7 @@ { #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return column ?? AsColumns(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmKeyManyToOne.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmKeyManyToOne.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmKeyManyToOne.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -8,6 +9,7 @@ #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return column ?? AsColumns(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmKeyProperty.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmKeyProperty.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmKeyProperty.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -8,6 +9,7 @@ #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return column ?? AsColumns(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmList.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmList.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmList.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -176,6 +177,7 @@ get { return genericSpecified ? generic : (bool?)null; } } + [XmlIgnore] public IEnumerable<HbmFilter> Filters { get { return filter ?? new HbmFilter[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmListIndex.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmListIndex.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmListIndex.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,9 +1,11 @@ using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { public partial class HbmListIndex: IColumnsMapping { + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmManyToAny.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmManyToAny.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmManyToAny.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -8,6 +9,7 @@ #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return column ?? AsColumns(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmManyToMany.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmManyToMany.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmManyToMany.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -8,6 +9,7 @@ { #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return Items != null ? Items.OfType<HbmColumn>() : AsColumns(); } @@ -34,6 +36,7 @@ #region Implementation of IFormulasMapping + [XmlIgnore] public IEnumerable<HbmFormula> Formulas { get { return Items != null ? Items.OfType<HbmFormula>() : AsFormulas(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmManyToOne.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmManyToOne.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmManyToOne.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -41,6 +42,7 @@ #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return Items != null ? Items.OfType<HbmColumn>() : AsColumns(); } @@ -71,6 +73,7 @@ #region Implementation of IFormulasMapping + [XmlIgnore] public IEnumerable<HbmFormula> Formulas { get { return Items != null ? Items.OfType<HbmFormula>() : AsFormulas(); } @@ -112,6 +115,7 @@ /// <summary> /// Columns and Formulas, in declared order /// </summary> + [XmlIgnore] public IEnumerable<object> ColumnsAndFormulas { // when Items is empty the column attribute AND formula attribute will be used Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMap.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMap.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMap.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -162,6 +163,7 @@ get { return genericSpecified ? generic : (bool?)null; } } + [XmlIgnore] public IEnumerable<HbmFilter> Filters { get { return filter ?? new HbmFilter[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMapKey.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMapKey.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMapKey.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -9,6 +10,7 @@ #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return Items != null ? Items.OfType<HbmColumn>() : AsColumns(); } @@ -34,6 +36,7 @@ #region Implementation of IFormulasMapping + [XmlIgnore] public IEnumerable<HbmFormula> Formulas { get { return Items != null ? Items.OfType<HbmFormula>() : AsFormulas(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMapKeyManyToMany.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMapKeyManyToMany.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmMapKeyManyToMany.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -9,6 +10,7 @@ #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return Items != null ? Items.OfType<HbmColumn>() : AsColumns(); } @@ -33,6 +35,7 @@ #region Implementation of IFormulasMapping + [XmlIgnore] public IEnumerable<HbmFormula> Formulas { get { return Items != null ? Items.OfType<HbmFormula>() : AsFormulas(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmNaturalId.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmNaturalId.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmNaturalId.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -8,6 +9,7 @@ { #region Implementation of IPropertiesContainerMapping + [XmlIgnore] public IEnumerable<IEntityPropertyMapping> Properties { get { return Items != null ? Items.Cast<IEntityPropertyMapping>() : new IEntityPropertyMapping[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmNestedCompositeElement.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmNestedCompositeElement.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmNestedCompositeElement.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -7,6 +8,7 @@ { #region Implementation of IPropertiesContainerMapping + [XmlIgnore] public IEnumerable<IEntityPropertyMapping> Properties { get { return Items != null ? Items.Cast<IEntityPropertyMapping>() : new IEntityPropertyMapping[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmOneToOne.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmOneToOne.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmOneToOne.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -34,6 +35,7 @@ #region Implementation of IFormulasMapping + [XmlIgnore] public IEnumerable<HbmFormula> Formulas { get { return formula ?? AsFormulas(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmPrimitiveArray.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmPrimitiveArray.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmPrimitiveArray.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -162,6 +163,7 @@ get { return null; } } + [XmlIgnore] public IEnumerable<HbmFilter> Filters { get { yield break; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmProperty.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmProperty.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmProperty.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -41,6 +42,7 @@ #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return Items != null ? Items.OfType<HbmColumn>() : AsColumns(); } @@ -74,6 +76,7 @@ #region Implementation of IFormulasMapping + [XmlIgnore] public IEnumerable<HbmFormula> Formulas { get { return Items != null ? Items.OfType<HbmFormula>() : AsFormulas(); } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSet.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSet.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSet.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -163,6 +164,7 @@ get { return genericSpecified ? generic : (bool?)null; } } + [XmlIgnore] public IEnumerable<HbmFilter> Filters { get { return filter ?? new HbmFilter[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSubclass.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSubclass.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmSubclass.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,15 +1,18 @@ using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { public partial class HbmSubclass : AbstractDecoratable, IEntityMapping, IEntityDiscriminableMapping { + [XmlIgnore] public IEnumerable<HbmJoin> Joins { get { return join ?? new HbmJoin[0]; } } + [XmlIgnore] public IEnumerable<HbmSubclass> Subclasses { get { return subclass1 ?? new HbmSubclass[0]; } @@ -128,6 +131,7 @@ #region Implementation of IPropertiesContainerMapping + [XmlIgnore] public IEnumerable<IEntityPropertyMapping> Properties { get { return Items != null ? Items.Cast<IEntityPropertyMapping>() : new IEntityPropertyMapping[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmTimestamp.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmTimestamp.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmTimestamp.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -12,6 +13,7 @@ #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmUnionSubclass.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmUnionSubclass.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmUnionSubclass.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,10 +1,12 @@ using System.Collections.Generic; using System.Linq; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { public partial class HbmUnionSubclass : AbstractDecoratable, IEntityMapping { + [XmlIgnore] public IEnumerable<HbmUnionSubclass> UnionSubclasses { get { return unionsubclass1 ?? new HbmUnionSubclass[0]; } @@ -114,6 +116,7 @@ #region Implementation of IPropertiesContainerMapping + [XmlIgnore] public IEnumerable<IEntityPropertyMapping> Properties { get { return Items != null ? Items.Cast<IEntityPropertyMapping>() : new IEntityPropertyMapping[0]; } Modified: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmVersion.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmVersion.cs 2010-08-29 17:17:39 UTC (rev 5169) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmVersion.cs 2010-08-31 16:14:12 UTC (rev 5170) @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Xml.Serialization; namespace NHibernate.Cfg.MappingSchema { @@ -11,6 +12,7 @@ #region Implementation of IColumnsMapping + [XmlIgnore] public IEnumerable<HbmColumn> Columns { get { return column ?? AsColumns(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ric...@us...> - 2010-08-29 17:17:45
|
Revision: 5169 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5169&view=rev Author: ricbrown Date: 2010-08-29 17:17:39 +0000 (Sun, 29 Aug 2010) Log Message: ----------- NHibernate.Test.Legacy.FumTest.CompositeIDQuery: corrected parameter positions for positional parameters (not working with Oracle) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Engine/QueryParameters.cs Modified: trunk/nhibernate/src/NHibernate/Engine/QueryParameters.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Engine/QueryParameters.cs 2010-08-25 12:23:28 UTC (rev 5168) +++ trunk/nhibernate/src/NHibernate/Engine/QueryParameters.cs 2010-08-29 17:17:39 UTC (rev 5169) @@ -105,11 +105,6 @@ _collectionKeys = collectionKeys; _readOnly = readOnly; _resultTransformer = transformer; - - if (_positionalParameterLocations == null) - { - CreatePositionalParameterLocations(); - } } public QueryParameters(IType[] positionalParameterTypes, object[] positionalParameterValues, @@ -196,15 +191,15 @@ set { _lockModes = value; } } - private void CreatePositionalParameterLocations() + private void CreatePositionalParameterLocations(ISessionFactoryImplementor factory) { - if (_positionalParameterTypes != null) + _positionalParameterLocations = new int[_positionalParameterTypes.Length]; + int location = 0; + for (int i = 0; i < _positionalParameterLocations.Length; i++) { - _positionalParameterLocations = new int[_positionalParameterTypes.Length]; - for (int i = 0; i < _positionalParameterLocations.Length; i++) - { - _positionalParameterLocations[i] = i; - } + var span = _positionalParameterTypes[i].GetColumnSpan(factory); + _positionalParameterLocations[i] = location; + location += span; } } @@ -460,6 +455,8 @@ int parameterIndex = 0; int totalSpan = 0; + CreatePositionalParameterLocations(factory); + IList<Parameter> sqlParameters = FindParametersIn(sqlString); for (int index = 0; index < PositionalParameterTypes.Length; index++) @@ -470,7 +467,7 @@ int location = PositionalParameterLocations[index]; location = FindAdjustedParameterLocation(location); int span = type.GetColumnSpan(factory); - SetParameterLocation(sqlParameters, startParameterIndex + parameterIndex, location, span); + SetParameterLocation(sqlParameters, startParameterIndex + totalSpan, location, span); totalSpan += span; parameterIndex++; @@ -483,7 +480,7 @@ int location = FilteredParameterLocations[index]; int span = type.GetColumnSpan(factory); - SetParameterLocation(sqlParameters, startParameterIndex + parameterIndex, location, span); + SetParameterLocation(sqlParameters, startParameterIndex + totalSpan, location, span); totalSpan += span; parameterIndex++; @@ -510,7 +507,7 @@ while ((location < sqlParameters.Count) && (sqlParameters[location].ParameterPosition != null)) location++; - SetParameterLocation(sqlParameters, startParameterIndex + parameterIndex, location, span); + SetParameterLocation(sqlParameters, startParameterIndex + totalSpan, location, span); } totalSpan += span; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-08-25 12:23:34
|
Revision: 5168 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5168&view=rev Author: fabiomaulo Date: 2010-08-25 12:23:28 +0000 (Wed, 25 Aug 2010) Log Message: ----------- Fixed Nant scripts Modified Paths: -------------- trunk/nhibernate/src/NHibernate.ByteCode.Castle/ByteCode.build trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build Modified: trunk/nhibernate/src/NHibernate.ByteCode.Castle/ByteCode.build =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Castle/ByteCode.build 2010-08-25 11:59:51 UTC (rev 5167) +++ trunk/nhibernate/src/NHibernate.ByteCode.Castle/ByteCode.build 2010-08-25 12:23:28 UTC (rev 5168) @@ -24,7 +24,6 @@ <include name="System.dll" /> <include name="Iesi.Collections.dll" /> <include name="Castle.Core.dll" /> - <include name="Castle.DynamicProxy2.dll" /> <include name="NHibernate.dll" /> </assemblyfileset> Modified: trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build =================================================================== --- trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build 2010-08-25 11:59:51 UTC (rev 5167) +++ trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ByteCode.Test.build 2010-08-25 12:23:28 UTC (rev 5168) @@ -26,7 +26,6 @@ <include name="Iesi.Collections.dll" /> <include name="log4net.dll" /> <include name="Castle.Core.dll" /> - <include name="Castle.DynamicProxy2.dll" /> <include name="NHibernate.dll" /> <include name="NHibernate.ByteCode.Castle.dll" /> <include name="nunit.framework.dll"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-08-25 11:59:59
|
Revision: 5167 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5167&view=rev Author: fabiomaulo Date: 2010-08-25 11:59:51 +0000 (Wed, 25 Aug 2010) Log Message: ----------- Fix NH-2301 (Castle Bytecode with last released 2.5) Modified Paths: -------------- trunk/nhibernate/lib/net/3.5/Castle.Core.dll trunk/nhibernate/lib/net/3.5/Castle.Core.xml trunk/nhibernate/src/NHibernate.ByteCode.Castle/LazyFieldInterceptor.cs trunk/nhibernate/src/NHibernate.ByteCode.Castle/LazyInitializer.cs trunk/nhibernate/src/NHibernate.ByteCode.Castle/NHibernate.ByteCode.Castle.csproj trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/NHibernate.ByteCode.Castle.Tests.csproj trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ProxyInterface/CustomProxyFixture.cs Added Paths: ----------- trunk/nhibernate/lib/net/3.5/Castle.Core.pdb Removed Paths: ------------- trunk/nhibernate/lib/net/3.5/Castle.DynamicProxy.license.txt trunk/nhibernate/lib/net/3.5/Castle.DynamicProxy2.dll trunk/nhibernate/lib/net/3.5/Castle.DynamicProxy2.xml Modified: trunk/nhibernate/lib/net/3.5/Castle.Core.dll =================================================================== (Binary files differ) Added: trunk/nhibernate/lib/net/3.5/Castle.Core.pdb =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/lib/net/3.5/Castle.Core.pdb ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/nhibernate/lib/net/3.5/Castle.Core.xml =================================================================== --- trunk/nhibernate/lib/net/3.5/Castle.Core.xml 2010-08-24 21:37:17 UTC (rev 5166) +++ trunk/nhibernate/lib/net/3.5/Castle.Core.xml 2010-08-25 11:59:51 UTC (rev 5167) @@ -4,307 +4,1033 @@ <name>Castle.Core</name> </assembly> <members> - <member name="T:Castle.Core.CastleComponentAttribute"> + <member name="T:Castle.Components.DictionaryAdapter.DictionaryBehaviorAttribute"> <summary> - This attribute is usefull only when you want to register all components - on an assembly as a batch process. - By doing so, the batch register will look - for this attribute to distinguish components from other classes. + Assignes a specific dictionary key. </summary> </member> - <member name="T:Castle.Core.LifestyleAttribute"> + <member name="T:Castle.Components.DictionaryAdapter.IDictionaryBehavior"> <summary> - Base for Attributes that want to express lifestyle - chosen by the component. + Defines the contract for customizing dictionary access. </summary> </member> - <member name="M:Castle.Core.LifestyleAttribute.#ctor(Castle.Core.LifestyleType)"> + <member name="P:Castle.Components.DictionaryAdapter.IDictionaryBehavior.ExecutionOrder"> <summary> - Initializes a new instance of the <see cref="T:Castle.Core.LifestyleAttribute"/> class. + Determines relative order to apply related behaviors. </summary> - <param name="type">The type.</param> </member> - <member name="P:Castle.Core.LifestyleAttribute.Lifestyle"> + <member name="P:Castle.Components.DictionaryAdapter.DictionaryBehaviorAttribute.ExecutionOrder"> <summary> - Gets or sets the lifestyle. + Determines relative order to apply related behaviors. </summary> - <value>The lifestyle.</value> </member> - <member name="M:Castle.Core.CastleComponentAttribute.#ctor(System.String)"> + <member name="T:Castle.Components.DictionaryAdapter.IDictionaryPropertySetter"> <summary> - Initializes a new instance of the <see cref="T:Castle.Core.CastleComponentAttribute"/> class. + Defines the contract for updating dictionary values. </summary> + </member> + <member name="M:Castle.Components.DictionaryAdapter.IDictionaryPropertySetter.SetPropertyValue(Castle.Components.DictionaryAdapter.IDictionaryAdapter,System.String,System.Object@,Castle.Components.DictionaryAdapter.PropertyDescriptor)"> + <summary> + Sets the stored dictionary value. + </summary> + <param name="dictionaryAdapter">The dictionary adapter.</param> <param name="key">The key.</param> + <param name="value">The stored value.</param> + <param name="property">The property.</param> + <returns>true if the property should be stored.</returns> </member> - <member name="M:Castle.Core.CastleComponentAttribute.#ctor(System.String,System.Type)"> + <member name="T:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter"> <summary> - Initializes a new instance of the <see cref="T:Castle.Core.CastleComponentAttribute"/> class. + Abstract adapter for the <see cref="T:System.Collections.IDictionary"/> support + needed by the <see cref="T:Castle.Components.DictionaryAdapter.DictionaryAdapterFactory"/> </summary> + </member> + <member name="M:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.Add(System.Object,System.Object)"> + <summary> + Adds an element with the provided key and value to the <see cref="T:System.Collections.IDictionary"></see> object. + </summary> + <param name="key">The <see cref="T:System.Object"></see> to use as the key of the element to add.</param> + <param name="value">The <see cref="T:System.Object"></see> to use as the value of the element to add.</param> + <exception cref="T:System.ArgumentException">An element with the same key already exists in the <see cref="T:System.Collections.IDictionary"></see> object. </exception> + <exception cref="T:System.ArgumentNullException">key is null. </exception> + <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IDictionary"></see> is read-only.-or- The <see cref="T:System.Collections.IDictionary"></see> has a fixed size. </exception> + </member> + <member name="M:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.Clear"> + <summary> + Removes all elements from the <see cref="T:System.Collections.IDictionary"></see> object. + </summary> + <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IDictionary"></see> object is read-only. </exception> + </member> + <member name="M:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.Contains(System.Object)"> + <summary> + Determines whether the <see cref="T:System.Collections.IDictionary"></see> object contains an element with the specified key. + </summary> + <param name="key">The key to locate in the <see cref="T:System.Collections.IDictionary"></see> object.</param> + <returns> + true if the <see cref="T:System.Collections.IDictionary"></see> contains an element with the key; otherwise, false. + </returns> + <exception cref="T:System.ArgumentNullException">key is null. </exception> + </member> + <member name="M:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.GetEnumerator"> + <summary> + Returns an <see cref="T:System.Collections.IDictionaryEnumerator"></see> object for the <see cref="T:System.Collections.IDictionary"></see> object. + </summary> + <returns> + An <see cref="T:System.Collections.IDictionaryEnumerator"></see> object for the <see cref="T:System.Collections.IDictionary"></see> object. + </returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.Remove(System.Object)"> + <summary> + Removes the element with the specified key from the <see cref="T:System.Collections.IDictionary"></see> object. + </summary> + <param name="key">The key of the element to remove.</param> + <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IDictionary"></see> object is read-only.-or- The <see cref="T:System.Collections.IDictionary"></see> has a fixed size. </exception> + <exception cref="T:System.ArgumentNullException">key is null. </exception> + </member> + <member name="M:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.CopyTo(System.Array,System.Int32)"> + <summary> + Copies the elements of the <see cref="T:System.Collections.ICollection"></see> to an <see cref="T:System.Array"></see>, starting at a particular <see cref="T:System.Array"></see> index. + </summary> + <param name="array">The one-dimensional <see cref="T:System.Array"></see> that is the destination of the elements copied from <see cref="T:System.Collections.ICollection"></see>. The <see cref="T:System.Array"></see> must have zero-based indexing.</param> + <param name="index">The zero-based index in array at which copying begins.</param> + <exception cref="T:System.ArgumentNullException">array is null. </exception> + <exception cref="T:System.ArgumentException">The type of the source <see cref="T:System.Collections.ICollection"></see> cannot be cast automatically to the type of the destination array. </exception> + <exception cref="T:System.ArgumentOutOfRangeException">index is less than zero. </exception> + <exception cref="T:System.ArgumentException">array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source <see cref="T:System.Collections.ICollection"></see> is greater than the available space from index to the end of the destination array. </exception> + </member> + <member name="M:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.System#Collections#IEnumerable#GetEnumerator"> + <summary> + Returns an enumerator that iterates through a collection. + </summary> + <returns> + An <see cref="T:System.Collections.IEnumerator"></see> object that can be used to iterate through the collection. + </returns> + </member> + <member name="P:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.IsFixedSize"> + <summary> + Gets a value indicating whether the <see cref="T:System.Collections.IDictionary"></see> object has a fixed size. + </summary> + <value></value> + <returns>true if the <see cref="T:System.Collections.IDictionary"></see> object has a fixed size; otherwise, false.</returns> + </member> + <member name="P:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.IsReadOnly"> + <summary> + Gets a value indicating whether the <see cref="T:System.Collections.IDictionary"></see> object is read-only. + </summary> + <value></value> + <returns>true if the <see cref="T:System.Collections.IDictionary"></see> object is read-only; otherwise, false.</returns> + </member> + <member name="P:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.Keys"> + <summary> + Gets an <see cref="T:System.Collections.ICollection"></see> object containing the keys of the <see cref="T:System.Collections.IDictionary"></see> object. + </summary> + <value></value> + <returns>An <see cref="T:System.Collections.ICollection"></see> object containing the keys of the <see cref="T:System.Collections.IDictionary"></see> object.</returns> + </member> + <member name="P:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.Values"> + <summary> + Gets an <see cref="T:System.Collections.ICollection"></see> object containing the values in the <see cref="T:System.Collections.IDictionary"></see> object. + </summary> + <value></value> + <returns>An <see cref="T:System.Collections.ICollection"></see> object containing the values in the <see cref="T:System.Collections.IDictionary"></see> object.</returns> + </member> + <member name="P:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.Item(System.Object)"> + <summary> + Gets or sets the <see cref="T:System.Object"/> with the specified key. + </summary> + <value></value> + </member> + <member name="P:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.Count"> + <summary> + Gets the number of elements contained in the <see cref="T:System.Collections.ICollection"></see>. + </summary> + <value></value> + <returns>The number of elements contained in the <see cref="T:System.Collections.ICollection"></see>.</returns> + </member> + <member name="P:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.IsSynchronized"> + <summary> + Gets a value indicating whether access to the <see cref="T:System.Collections.ICollection"></see> is synchronized (thread safe). + </summary> + <value></value> + <returns>true if access to the <see cref="T:System.Collections.ICollection"></see> is synchronized (thread safe); otherwise, false.</returns> + </member> + <member name="P:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapter.SyncRoot"> + <summary> + Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"></see>. + </summary> + <value></value> + <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"></see>.</returns> + </member> + <member name="T:Castle.Components.DictionaryAdapter.AbstractDictionaryAdapterVisitor"> + <summary> + Abstract implementation of <see cref="T:Castle.Components.DictionaryAdapter.IDictionaryAdapterVisitor"/>. + </summary> + </member> + <member name="T:Castle.Components.DictionaryAdapter.IDictionaryAdapterVisitor"> + <summary> + Conract for traversing a <see cref="T:Castle.Components.DictionaryAdapter.IDictionaryAdapter"/>. + </summary> + </member> + <member name="T:Castle.Components.DictionaryAdapter.ComponentAttribute"> + <summary> + Identifies a property should be represented as a nested component. + </summary> + </member> + <member name="T:Castle.Components.DictionaryAdapter.IDictionaryKeyBuilder"> + <summary> + Defines the contract for building typed dictionary keys. + </summary> + </member> + <member name="M:Castle.Components.DictionaryAdapter.IDictionaryKeyBuilder.GetKey(Castle.Components.DictionaryAdapter.IDictionaryAdapter,System.String,Castle.Components.DictionaryAdapter.PropertyDescriptor)"> + <summary> + Builds the specified key. + </summary> + <param name="dictionaryAdapter">The dictionary adapter.</param> + <param name="key">The current key.</param> + <param name="property">The property.</param> + <returns>The updated key</returns> + </member> + <member name="T:Castle.Components.DictionaryAdapter.IDictionaryPropertyGetter"> + <summary> + Defines the contract for retrieving dictionary values. + </summary> + </member> + <member name="M:Castle.Components.DictionaryAdapter.IDictionaryPropertyGetter.GetPropertyValue(Castle.Components.DictionaryAdapter.IDictionaryAdapter,System.String,System.Object,Castle.Components.DictionaryAdapter.PropertyDescriptor,System.Boolean)"> + <summary> + Gets the effective dictionary value. + </summary> + <param name="dictionaryAdapter">The dictionary adapter.</param> <param name="key">The key.</param> - <param name="service">The service.</param> + <param name="storedValue">The stored value.</param> + <param name="property">The property.</param> + <param name="ifExists">true if return only existing.</param> + <returns>The effective property value.</returns> </member> - <member name="M:Castle.Core.CastleComponentAttribute.#ctor(System.String,System.Type,Castle.Core.LifestyleType)"> + <member name="P:Castle.Components.DictionaryAdapter.ComponentAttribute.NoPrefix"> <summary> - Initializes a new instance of the <see cref="T:Castle.Core.CastleComponentAttribute"/> class. + Applies no prefix. </summary> + </member> + <member name="P:Castle.Components.DictionaryAdapter.ComponentAttribute.Prefix"> + <summary> + Gets or sets the prefix. + </summary> + <value>The prefix.</value> + </member> + <member name="T:Castle.Components.DictionaryAdapter.DictionaryAdapterAttribute"> + <summary> + Identifies the dictionary adapter types. + </summary> + </member> + <member name="T:Castle.Components.DictionaryAdapter.FetchAttribute"> + <summary> + Identifies an interface or property to be pre-feteched. + </summary> + </member> + <member name="M:Castle.Components.DictionaryAdapter.FetchAttribute.#ctor"> + <summary> + Instructs fetching to occur. + </summary> + </member> + <member name="M:Castle.Components.DictionaryAdapter.FetchAttribute.#ctor(System.Boolean)"> + <summary> + Instructs fetching according to <paramref name="fetch"/> + </summary> + <param name="fetch"></param> + </member> + <member name="P:Castle.Components.DictionaryAdapter.FetchAttribute.Fetch"> + <summary> + Gets whether or not fetching should occur. + </summary> + </member> + <member name="T:Castle.Components.DictionaryAdapter.GroupAttribute"> + <summary> + Assigns a property to a group. + </summary> + </member> + <member name="M:Castle.Components.DictionaryAdapter.GroupAttribute.#ctor(System.Object)"> + <summary> + Constructs a group assignment. + </summary> + <param name="group">The group name.</param> + </member> + <member name="M:Castle.Components.DictionaryAdapter.GroupAttribute.#ctor(System.Object[])"> + <summary> + Constructs a group assignment. + </summary> + <param name="group">The group name.</param> + </member> + <member name="P:Castle.Components.DictionaryAdapter.GroupAttribute.Group"> + <summary> + Gets the group the property is assigned to. + </summary> + </member> + <member name="T:Castle.Components.DictionaryAdapter.KeyAttribute"> + <summary> + Assigns a specific dictionary key. + </summary> + </member> + <member name="M:Castle.Components.DictionaryAdapter.KeyAttribute.#ctor(System.String)"> + <summary> + Initializes a new instance of the <see cref="T:Castle.Components.DictionaryAdapter.KeyAttribute"/> class. + </summary> <param name="key">The key.</param> - <param name="service">The service.</param> - <param name="lifestyle">The lifestyle.</param> </member> - <member name="P:Castle.Core.CastleComponentAttribute.Service"> + <member name="M:Castle.Components.DictionaryAdapter.KeyAttribute.#ctor(System.String[])"> <summary> - Gets the service. + Initializes a new instance of the <see cref="T:Castle.Components.DictionaryAdapter.KeyAttribute"/> class. </summary> - <value>The service.</value> + <param name="keys">The compound key.</param> </member> - <member name="P:Castle.Core.CastleComponentAttribute.Key"> + <member name="T:Castle.Components.DictionaryAdapter.KeyPrefixAttribute"> <summary> - Gets the key. + Assigns a prefix to the keyed properties of an interface. </summary> - <value>The key.</value> </member> - <member name="T:Castle.Core.ComponentActivatorAttribute"> + <member name="M:Castle.Components.DictionaryAdapter.KeyPrefixAttribute.#ctor"> <summary> - Associates a custom component with a component + Initializes a default instance of the <see cref="T:Castle.Components.DictionaryAdapter.KeyPrefixAttribute"/> class. </summary> </member> - <member name="M:Castle.Core.ComponentActivatorAttribute.#ctor(System.Type)"> + <member name="M:Castle.Components.DictionaryAdapter.KeyPrefixAttribute.#ctor(System.String)"> <summary> - Initializes a new instance of the <see cref="T:Castle.Core.ComponentActivatorAttribute"/> class. + Initializes a new instance of the <see cref="T:Castle.Components.DictionaryAdapter.KeyPrefixAttribute"/> class. </summary> - <param name="componentActivatorType">Type of the component activator.</param> + <param name="keyPrefix">The prefix for the keyed properties of the interface.</param> </member> - <member name="P:Castle.Core.ComponentActivatorAttribute.ComponentActivatorType"> + <member name="P:Castle.Components.DictionaryAdapter.KeyPrefixAttribute.KeyPrefix"> <summary> - Gets the type of the component activator. + Gets the prefix key added to the properties of the interface. </summary> - <value>The type of the component activator.</value> </member> - <member name="T:Castle.Core.ComponentProxyBehaviorAttribute"> + <member name="T:Castle.Components.DictionaryAdapter.KeySubstitutionAttribute"> <summary> - Specifies the proxying behavior for a component. + Substitutes part of key with another string. </summary> </member> - <member name="M:Castle.Core.ComponentProxyBehaviorAttribute.#ctor"> + <member name="M:Castle.Components.DictionaryAdapter.KeySubstitutionAttribute.#ctor(System.String,System.String)"> <summary> - Initializes a new instance of the <see cref="T:Castle.Core.ComponentProxyBehaviorAttribute"/> class. + Initializes a new instance of the <see cref="T:Castle.Components.DictionaryAdapter.KeySubstitutionAttribute"/> class. </summary> + <param name="oldValue">The old value.</param> + <param name="newValue">The new value.</param> </member> - <member name="P:Castle.Core.ComponentProxyBehaviorAttribute.UseMarshalByRefProxy"> + <member name="T:Castle.Components.DictionaryAdapter.MultiLevelEditAttribute"> <summary> - Gets or sets a value indicating whether the generated - interface proxy should inherit from <see cref="T:System.MarshalByRefObject"/>. + Requests support for multi-level editing. </summary> </member> - <member name="P:Castle.Core.ComponentProxyBehaviorAttribute.UseSingleInterfaceProxy"> + <member name="T:Castle.Components.DictionaryAdapter.IDictionaryInitializer"> <summary> - Determines if the component requires a single interface proxy. + Contract for dictionary initialization. </summary> - <value><c>true</c> if the component requires a single interface proxy.</value> </member> - <member name="P:Castle.Core.ComponentProxyBehaviorAttribute.AdditionalInterfaces"> + <member name="M:Castle.Components.DictionaryAdapter.IDictionaryInitializer.Initialize(Castle.Components.DictionaryAdapter.IDictionaryAdapter,System.Object[])"> <summary> - Gets or sets the additional interfaces used during proxy generation. + Performs any initialization of the <see cref="T:Castle.Components.DictionaryAdapter.IDictionaryAdapter"/> </summary> + <param name="dictionaryAdapter">The dictionary adapter.</param> + <param name="behaviors">The dictionary behaviors.</param> </member> - <member name="T:Castle.Core.DoNotWireAttribute"> + <member name="T:Castle.Components.DictionaryAdapter.NewGuidAttribute"> <summary> - Marks as property to be skipped and not be wired - by the IoC container + Generates a new GUID on demand. </summary> </member> - <member name="T:Castle.Core.InterceptorAttribute"> + <member name="T:Castle.Components.DictionaryAdapter.OnDemandAttribute"> <summary> - Used to declare that a component wants interceptors acting on it. + Support for on-demand value resolution. </summary> </member> - <member name="M:Castle.Core.InterceptorAttribute.#ctor(System.String)"> + <member name="T:Castle.Components.DictionaryAdapter.PropagateNotificationsAttribute"> <summary> - Constructs the InterceptorAttribute pointing to - a key to a interceptor + Suppress property change notifications. </summary> - <param name="componentKey"></param> </member> - <member name="M:Castle.Core.InterceptorAttribute.#ctor(System.Type)"> + <member name="T:Castle.Components.DictionaryAdapter.StringFormatAttribute"> <summary> - Constructs the InterceptorAttribute pointing to - a service + Provides simple string formatting from existing properties. </summary> - <param name="interceptorType"></param> </member> - <member name="T:Castle.Core.SingletonAttribute"> + <member name="P:Castle.Components.DictionaryAdapter.StringFormatAttribute.Format"> <summary> - Indicates that the target components wants a - singleton lifestyle. + Gets the string format. </summary> </member> - <member name="M:Castle.Core.SingletonAttribute.#ctor"> + <member name="P:Castle.Components.DictionaryAdapter.StringFormatAttribute.Properties"> <summary> - Initializes a new instance of the <see cref="T:Castle.Core.SingletonAttribute"/> class. + Gets the format properties. </summary> </member> - <member name="T:Castle.Core.TransientAttribute"> + <member name="T:Castle.Components.DictionaryAdapter.StringListAttribute"> <summary> - Indicates that the target components wants a - transient lifestyle. + Identifies a property should be represented as a delimited string value. </summary> </member> - <member name="M:Castle.Core.TransientAttribute.#ctor"> + <member name="P:Castle.Components.DictionaryAdapter.StringListAttribute.Separator"> <summary> - Initializes a new instance of the <see cref="T:Castle.Core.TransientAttribute"/> class. + Gets the separator. </summary> </member> - <member name="T:Castle.Core.PerThreadAttribute"> + <member name="T:Castle.Components.DictionaryAdapter.StringValuesAttribute"> <summary> - Indicates that the target components wants a - per thread lifestyle. + Converts all properties to strings. </summary> </member> - <member name="M:Castle.Core.PerThreadAttribute.#ctor"> + <member name="P:Castle.Components.DictionaryAdapter.StringValuesAttribute.Format"> <summary> - Initializes a new instance of the <see cref="T:Castle.Core.PerThreadAttribute"/> class. + Gets or sets the format. </summary> + <value>The format.</value> </member> - <member name="T:Castle.Core.PerWebRequestAttribute"> + <member name="T:Castle.Components.DictionaryAdapter.SuppressNotificationsAttribute"> <summary> - Indicates that the target components wants a - per web request lifestyle. + Suppress property change notifications. </summary> </member> - <member name="T:Castle.Core.PooledAttribute"> + <member name="T:Castle.Components.DictionaryAdapter.IPropertyDescriptorInitializer"> <summary> - Indicates that the target components wants a - pooled lifestyle. + Contract for property descriptor initialization. </summary> </member> - <member name="M:Castle.Core.PooledAttribute.#ctor"> + <member name="M:Castle.Components.DictionaryAdapter.IPropertyDescriptorInitializer.Initialize(Castle.Components.DictionaryAdapter.PropertyDescriptor,System.Object[])"> <summary> - Initializes a new instance of the <see cref="T:Castle.Core.PooledAttribute"/> class - using the default initial pool size (5) and the max pool size (15). + Performs any initialization of the <see cref="T:Castle.Components.DictionaryAdapter.PropertyDescriptor"/> </summary> + <param name="propertyDescriptor">The property descriptor.</param> + <param name="behaviors">The property behaviors.</param> </member> - <member name="M:Castle.Core.PooledAttribute.#ctor(System.Int32,System.Int32)"> + <member name="T:Castle.Components.DictionaryAdapter.TypeKeyPrefixAttribute"> <summary> - Initializes a new instance of the <see cref="T:Castle.Core.PooledAttribute"/> class. + Assigns a prefix to the keyed properties using the interface name. </summary> - <param name="initialPoolSize">Initial size of the pool.</param> - <param name="maxPoolSize">Max pool size.</param> </member> - <member name="P:Castle.Core.PooledAttribute.InitialPoolSize"> + <member name="T:Castle.Components.DictionaryAdapter.DefaultPropertyGetter"> <summary> - Gets the initial size of the pool. + Manages conversion between property values. </summary> - <value>The initial size of the pool.</value> </member> - <member name="P:Castle.Core.PooledAttribute.MaxPoolSize"> + <member name="M:Castle.Components.DictionaryAdapter.DefaultPropertyGetter.#ctor(System.ComponentModel.TypeConverter)"> <summary> - Gets the maximum pool size. + Initializes a new instance of the <see cref="T:Castle.Components.DictionaryAdapter.DefaultPropertyGetter"/> class. </summary> - <value>The size of the max pool.</value> + <param name="converter">The converter.</param> </member> - <member name="T:Castle.Core.CustomLifestyleAttribute"> + <member name="M:Castle.Components.DictionaryAdapter.DefaultPropertyGetter.GetPropertyValue(Castle.Components.DictionaryAdapter.IDictionaryAdapter,System.String,System.Object,Castle.Components.DictionaryAdapter.PropertyDescriptor,System.Boolean)"> <summary> - Indicates that the target components wants a - custom lifestyle. + Gets the effective dictionary value. </summary> + <param name="dictionaryAdapter">The dictionary adapter.</param> + <param name="key">The key.</param> + <param name="storedValue">The stored value.</param> + <param name="property">The property.</param> + <param name="ifExists">true if return only existing.</param> + <returns>The effective property value.</returns> </member> - <member name="M:Castle.Core.CustomLifestyleAttribute.#ctor(System.Type)"> + <member name="P:Castle.Components.DictionaryAdapter.DefaultPropertyGetter.ExecutionOrder"> <summary> - Initializes a new instance of the <see cref="T:Castle.Core.CustomLifestyleAttribute"/> class. + </summary> - <param name="lifestyleHandlerType">The lifestyle handler.</param> </member> - <member name="P:Castle.Core.CustomLifestyleAttribute.LifestyleHandlerType"> + <member name="T:Castle.Components.DictionaryAdapter.IDictionaryCreate"> <summary> - Gets the type of the lifestyle handler. + Contract for creating additional Dictionary adapters. </summary> - <value>The type of the lifestyle handler.</value> </member> - <member name="T:Castle.DynamicProxy.IAttributeDisassembler"> + <member name="T:Castle.Components.DictionaryAdapter.IDictionaryAdapter"> <summary> - Provides functionality for disassembling instances of attributes to CustomAttributeBuilder form, during the process of emiting new types by Dynamic Proxy. + Contract for manipulating the Dictionary adapter. </summary> </member> - <member name="M:Castle.DynamicProxy.IAttributeDisassembler.Disassemble(System.Attribute)"> + <member name="T:Castle.Components.DictionaryAdapter.IDictionaryEdit"> <summary> - Disassembles given attribute instance back to corresponding CustomAttributeBuilder. + Contract for editing the Dictionary adapter. </summary> - <param name="attribute">An instance of attribute to disassemble</param> - <returns><see cref="T:System.Reflection.Emit.CustomAttributeBuilder"/> corresponding 1 to 1 to given attribute instance, or null reference.</returns> + </member> + <member name="T:Castle.Components.DictionaryAdapter.IDictionaryNotify"> + <summary> + Contract for managing Dictionary adapter notifications. + </summary> + </member> + <member name="T:Castle.Components.DictionaryAdapter.IDictionaryValidate"> + <summary> + Contract for validating Dictionary adapter. + </summary> + </member> + <member name="T:Castle.Components.DictionaryAdapter.DictionaryAdapterFactory"> + <summary> + Uses Reflection.Emit to expose the properties of a dictionary + through a dynamic implementation of a typed interface. + </summary> + </member> + <member name="T:Castle.Components.DictionaryAdapter.IDictionaryAdapterFactory"> + <summary> + Defines the contract for building typed dictionary adapters. + </summary> + </member> + <member name="M:Castle.Components.DictionaryAdapter.IDictionaryAdapterFactory.GetAdapter``1(System.Collections.IDictionary)"> + <summary> + Gets a typed adapter bound to the <see cref="T:System.Collections.IDictionary"/>. + </summary> + <typeparam name="T">The typed interface.</typeparam> + <param name="dictionary">The underlying source of properties.</param> + <returns>An implementation of the typed interface bound to the dictionary.</returns> <remarks> - Implementers should return <see cref="T:System.Reflection.Emit.CustomAttributeBuilder"/> that corresponds to given attribute instance 1 to 1, - that is after calling specified constructor with specified arguments, and setting specified properties and fields with values specified - we should be able to get an attribute instance identical to the one passed in <paramref name="attribute"/>. Implementer can return null - if it wishes to opt out of replicating the attribute. Notice however, that for some cases, like attributes passed explicitly by the user - it is illegal to return null, and doing so will result in exception. + The type represented by T must be an interface with properties. </remarks> </member> - <member name="T:Castle.Core.Interceptor.IChangeProxyTarget"> + <member name="M:Castle.Components.DictionaryAdapter.IDictionaryAdapterFactory.GetAdapter(System.Type,System.Collections.IDictionary)"> <summary> - Exposes means to change target objects of proxies and invocations + Gets a typed adapter bound to the <see cref="T:System.Collections.IDictionary"/>. </summary> + <param name="type">The typed interface.</param> + <param name="dictionary">The underlying source of properties.</param> + <returns>An implementation of the typed interface bound to the dictionary.</returns> + <remarks> + The type represented by T must be an interface with properties. + </remarks> </member> - <member name="M:Castle.Core.Interceptor.IChangeProxyTarget.ChangeInvocationTarget(System.Object)"> + <member name="M:Castle.Components.DictionaryAdapter.IDictionaryAdapterFactory.GetAdapter(System.Type,System.Collections.IDictionary,Castle.Components.DictionaryAdapter.PropertyDescriptor)"> <summary> - Changes the target object (<see cref="P:Castle.Core.Interceptor.IInvocation.InvocationTarget"/>) of current <see cref="T:Castle.Core.Interceptor.IInvocation"/>. + Gets a typed adapter bound to the <see cref="T:System.Collections.IDictionary"/>. </summary> - <param name="target">The new value of target of invocation.</param> + <param name="type">The typed interface.</param> + <param name="dictionary">The underlying source of properties.</param> + <param name="descriptor">The property descriptor.</param> + <returns>An implementation of the typed interface bound to the dictionary.</returns> <remarks> - Although the method takes <see cref="T:System.Object"/> the actual instance must be of type assignable to <see cref="P:Castle.Core.Interceptor.IInvocation.TargetType"/>, otherwise an <see cref="T:System.InvalidCastException"/> will be thrown. - Also while it's technically legal to pass null reference (Nothing in Visual Basic) as <paramref name="target"/>, for obvious reasons Dynamic Proxy will not be able to call the intercepted method on such target. - In this case last interceptor in the pipeline mustn't call <see cref="M:Castle.Core.Interceptor.IInvocation.Proceed"/> or a <see cref="T:System.NotImplementedException"/> will be throws. - Also while it's technically legal to pass proxy itself as <paramref name="target"/>, this would create stack overflow. - In this case last interceptor in the pipeline mustn't call <see cref="M:Castle.Core.Interceptor.IInvocation.Proceed"/> or a <see cref="T:System.InvalidOperationException"/> will be throws. + The type represented by T must be an interface with properties. </remarks> - <exception cref="T:System.InvalidCastException">Thrown when <paramref name="target"/> is not assignable to the proxied type.</exception> </member> - <member name="M:Castle.Core.Interceptor.IChangeProxyTarget.ChangeProxyTarget(System.Object)"> + <member name="M:Castle.Components.DictionaryAdapter.IDictionaryAdapterFactory.GetAdapter``1(System.Collections.Specialized.NameValueCollection)"> <summary> - Permanently changes the target object of the proxy. This does not affect target of the current invocation. + Gets a typed adapter bound to the <see cref="T:System.Collections.Specialized.NameValueCollection"/>. </summary> - <param name="target">The new value of target of the proxy.</param> + <typeparam name="T">The typed interface.</typeparam> + <param name="nameValues">The underlying source of properties.</param> + <returns>An implementation of the typed interface bound to the namedValues.</returns> <remarks> - Although the method takes <see cref="T:System.Object"/> the actual instance must be of type assignable to proxy's target type, otherwise an <see cref="T:System.InvalidCastException"/> will be thrown. - Also while it's technically legal to pass null reference (Nothing in Visual Basic) as <paramref name="target"/>, for obvious reasons Dynamic Proxy will not be able to call the intercepted method on such target. - In this case last interceptor in the pipeline mustn't call <see cref="M:Castle.Core.Interceptor.IInvocation.Proceed"/> or a <see cref="T:System.NotImplementedException"/> will be throws. - Also while it's technically legal to pass proxy itself as <paramref name="target"/>, this would create stack overflow. - In this case last interceptor in the pipeline mustn't call <see cref="M:Castle.Core.Interceptor.IInvocation.Proceed"/> or a <see cref="T:System.InvalidOperationException"/> will be throws. + The type represented by T must be an interface with properties. </remarks> - <exception cref="T:System.InvalidCastException">Thrown when <paramref name="target"/> is not assignable to the proxied type.</exception> </member> - <member name="T:Castle.Core.Interceptor.IInterceptor"> + <member name="M:Castle.Components.DictionaryAdapter.IDictionaryAdapterFactory.GetAdapter(System.Type,System.Collections.Specialized.NameValueCollection)"> <summary> - New interface that is going to be used by DynamicProxy 2 + Gets a typed adapter bound to the <see cref="T:System.Collections.Specialized.NameValueCollection"/>. </summary> + <param name="type">The typed interface.</param> + <param name="nameValues">The underlying source of properties.</param> + <returns>An implementation of the typed interface bound to the namedValues.</returns> + <remarks> + The type represented by T must be an interface with properties. + </remarks> </member> - <member name="T:Castle.Core.Interceptor.IInterceptorSelector"> + <member name="M:Castle.Components.DictionaryAdapter.IDictionaryAdapterFactory.GetAdapter``1(System.Xml.XPath.IXPathNavigable)"> <summary> - Provides an extension point that allows proxies to choose specific interceptors on - a per method basis. + Gets a typed adapter bound to the <see cref="T:System.Xml.XPath.IXPathNavigable"/>. </summary> + <typeparam name="T">The typed interface.</typeparam> + <param name="xpathNavigable">The underlying source of properties.</param> + <returns>An implementation of the typed interface bound to the xpath navigable.</returns> + <remarks> + The type represented by T must be an interface with properties. + </remarks> </member> - <member name="M:Castle.Core.Interceptor.IInterceptorSelector.SelectInterceptors(System.Type,System.Reflection.MethodInfo,Castle.Core.Interceptor.IInterceptor[])"> + <member name="M:Castle.Components.DictionaryAdapter.IDictionaryAdapterFactory.GetAdapter(System.Type,System.Xml.XPath.IXPathNavigable)"> <summary> - Selects the interceptors that should intercept calls to the given <paramref name="method"/>. + Gets a typed adapter bound to the <see cref="T:System.Xml.XPath.IXPathNavigable"/>. </summary> - <param name="type">The type declaring the method to intercept.</param> - <param name="method">The method that will be intercepted.</param> - <param name="interceptors">All interceptors registered with the proxy.</param> - <returns>An array of interceptors to invoke upon calling the <paramref name="method"/>.</returns> + <param name="type">The typed interface.</param> + <param name="xpathNavigable">The underlying source of properties.</param> + <returns>An implementation of the typed interface bound to the xpath navigable.</returns> <remarks> - This method is called only once per proxy instance, upon the first call to the - <paramref name="method"/>. Either an empty array or null are valid return values to indicate - that no interceptor should intercept calls to the method. Although it is not advised, it is - legal to return other <see cref="T:Castle.Core.Interceptor.IInterceptor"/> implementations than these provided in - <paramref name="interceptors"/>. + The type represented by T must be an interface with properties. </remarks> </member> - <member name="T:Castle.Core.Interceptor.IInvocation"> + <member name="M:Castle.Components.DictionaryAdapter.IDictionaryAdapterFactory.GetAdapterMeta(System.Type)"> <summary> + Gets the <see cref="T:Castle.Components.DictionaryAdapter.DictionaryAdapterMeta"/> associated with the type. + </summary> + <param name="type">The typed interface.</param> + <returns>The adapter meta-data.</returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.IDictionaryAdapterFactory.GetAdapterMeta(System.Type,Castle.Components.DictionaryAdapter.PropertyDescriptor)"> + <summary> + Gets the <see cref="T:Castle.Components.DictionaryAdapter.DictionaryAdapterMeta"/> associated with the type. + </summary> + <param name="type">The typed interface.</param> + <param name="descriptor">The property descriptor.</param> + <returns>The adapter meta-data.</returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.DictionaryAdapterFactory.GetAdapter``1(System.Collections.IDictionary)"> + <inheritdoc /> + </member> + <member name="M:Castle.Components.DictionaryAdapter.DictionaryAdapterFactory.GetAdapter(System.Type,System.Collections.IDictionary)"> + <inheritdoc /> + </member> + <member name="M:Castle.Components.DictionaryAdapter.DictionaryAdapterFactory.GetAdapter(System.Type,System.Collections.IDictionary,Castle.Components.DictionaryAdapter.PropertyDescriptor)"> + <inheritdoc /> + </member> + <member name="M:Castle.Components.DictionaryAdapter.DictionaryAdapterFactory.GetAdapter``2(System.Collections.Generic.IDictionary{System.String,``1})"> + <inheritdoc /> + </member> + <member name="M:Castle.Components.DictionaryAdapter.DictionaryAdapterFactory.GetAdapter``1(System.Type,System.Collections.Generic.IDictionary{System.String,``0})"> + <inheritdoc /> + </member> + <member name="M:Castle.Components.DictionaryAdapter.DictionaryAdapterFactory.GetAdapter``1(System.Collections.Specialized.NameValueCollection)"> + <inheritdoc /> + </member> + <member name="M:Castle.Components.DictionaryAdapter.DictionaryAdapterFactory.GetAdapter(System.Type,System.Collections.Specialized.NameValueCollection)"> + <inheritdoc /> + </member> + <member name="M:Castle.Components.DictionaryAdapter.DictionaryAdapterFactory.GetAdapter``1(System.Xml.XPath.IXPathNavigable)"> + <inheritdoc /> + </member> + <member name="M:Castle.Components.DictionaryAdapter.DictionaryAdapterFactory.GetAdapter(System.Type,System.Xml.XPath.IXPathNavigable)"> + <inheritdoc /> + </member> + <member name="M:Castle.Components.DictionaryAdapter.DictionaryAdapterFactory.GetAdapterMeta(System.Type)"> + <inheritdoc /> + </member> + <member name="M:Castle.Components.DictionaryAdapter.DictionaryAdapterFactory.GetAdapterMeta(System.Type,Castle.Components.DictionaryAdapter.PropertyDescriptor)"> + <inheritdoc /> + </member> + <member name="T:Castle.Components.DictionaryAdapter.PropertyDescriptor"> + <summary> + Describes a dictionary property. + </summary> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.#ctor"> + <summary> + Initializes an empty <see cref="T:Castle.Components.DictionaryAdapter.PropertyDescriptor"/> class. + </summary> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.#ctor(System.Reflection.PropertyInfo,System.Object[])"> + <summary> + Initializes a new instance of the <see cref="T:Castle.Components.DictionaryAdapter.PropertyDescriptor"/> class. + </summary> + <param name="property">The property.</param> + <param name="behaviors">The property behaviors.</param> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.GetKey(Castle.Components.DictionaryAdapter.IDictionaryAdapter,System.String,Castle.Components.DictionaryAdapter.PropertyDescriptor)"> + <summary> + Gets the key. + </summary> + <param name="dictionaryAdapter">The dictionary adapter.</param> + <param name="key">The key.</param> + <param name="descriptor">The descriptor.</param> + <returns></returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.AddKeyBuilder(Castle.Components.DictionaryAdapter.IDictionaryKeyBuilder[])"> + <summary> + Adds the key builder. + </summary> + <param name="builders">The builder.</param> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.AddKeyBuilders(System.Collections.Generic.IEnumerable{Castle.Components.DictionaryAdapter.IDictionaryKeyBuilder})"> + <summary> + Adds the key builders. + </summary> + <param name="builders">The builders.</param> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.CopyKeyBuilders(Castle.Components.DictionaryAdapter.PropertyDescriptor)"> + <summary> + Copies the key builders to the other <see cref="T:Castle.Components.DictionaryAdapter.PropertyDescriptor"/> + </summary> + <param name="other"></param> + <returns></returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.CopyKeyBuilders(Castle.Components.DictionaryAdapter.PropertyDescriptor,System.Func{Castle.Components.DictionaryAdapter.IDictionaryKeyBuilder,System.Boolean})"> + <summary> + Copies the selected key builders to the other <see cref="T:Castle.Components.DictionaryAdapter.PropertyDescriptor"/> + </summary> + <param name="other"></param> + <param name="selector"></param> + <returns></returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.GetPropertyValue(Castle.Components.DictionaryAdapter.IDictionaryAdapter,System.String,System.Object,Castle.Components.DictionaryAdapter.PropertyDescriptor,System.Boolean)"> + <summary> + Gets the property value. + </summary> + <param name="dictionaryAdapter">The dictionary adapter.</param> + <param name="key">The key.</param> + <param name="storedValue">The stored value.</param> + <param name="descriptor">The descriptor.</param> + <param name="ifExists">true if return only existing.</param> + <returns></returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.AddGetter(Castle.Components.DictionaryAdapter.IDictionaryPropertyGetter[])"> + <summary> + Adds the dictionary getter. + </summary> + <param name="getters">The getter.</param> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.AddGetters(System.Collections.Generic.IEnumerable{Castle.Components.DictionaryAdapter.IDictionaryPropertyGetter})"> + <summary> + Adds the dictionary getters. + </summary> + <param name="gets">The getters.</param> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.CopyGetters(Castle.Components.DictionaryAdapter.PropertyDescriptor)"> + <summary> + Copies the property getters to the other <see cref="T:Castle.Components.DictionaryAdapter.PropertyDescriptor"/> + </summary> + <param name="other"></param> + <returns></returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.CopyGetters(Castle.Components.DictionaryAdapter.PropertyDescriptor,System.Func{Castle.Components.DictionaryAdapter.IDictionaryPropertyGetter,System.Boolean})"> + <summary> + Copies the selected property getters to the other <see cref="T:Castle.Components.DictionaryAdapter.PropertyDescriptor"/> + </summary> + <param name="other"></param> + <param name="selector"></param> + <returns></returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.SetPropertyValue(Castle.Components.DictionaryAdapter.IDictionaryAdapter,System.String,System.Object@,Castle.Components.DictionaryAdapter.PropertyDescriptor)"> + <summary> + Sets the property value. + </summary> + <param name="dictionaryAdapter">The dictionary adapter.</param> + <param name="key">The key.</param> + <param name="value">The value.</param> + <param name="descriptor">The descriptor.</param> + <returns></returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.AddSetter(Castle.Components.DictionaryAdapter.IDictionaryPropertySetter[])"> + <summary> + Adds the dictionary setter. + </summary> + <param name="setters">The setter.</param> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.AddSetters(System.Collections.Generic.IEnumerable{Castle.Components.DictionaryAdapter.IDictionaryPropertySetter})"> + <summary> + Adds the dictionary setters. + </summary> + <param name="sets">The setters.</param> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.CopySetters(Castle.Components.DictionaryAdapter.PropertyDescriptor)"> + <summary> + Copies the property setters to the other <see cref="T:Castle.Components.DictionaryAdapter.PropertyDescriptor"/> + </summary> + <param name="other"></param> + <returns></returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.CopySetters(Castle.Components.DictionaryAdapter.PropertyDescriptor,System.Func{Castle.Components.DictionaryAdapter.IDictionaryPropertySetter,System.Boolean})"> + <summary> + Copies the selected property setters to the other <see cref="T:Castle.Components.DictionaryAdapter.PropertyDescriptor"/> + </summary> + <param name="other"></param> + <param name="selector"></param> + <returns></returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.AddBehavior(Castle.Components.DictionaryAdapter.IDictionaryBehavior[])"> + <summary> + Adds the behaviors. + </summary> + <param name="behaviors"></param> + <returns></returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.AddBehaviors(System.Collections.Generic.IEnumerable{Castle.Components.DictionaryAdapter.IDictionaryBehavior})"> + <summary> + Adds the behaviors. + </summary> + <param name="behaviors"></param> + <returns></returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.CopyBehaviors(Castle.Components.DictionaryAdapter.PropertyDescriptor)"> + <summary> + Copies the behaviors to the other <see cref="T:Castle.Components.DictionaryAdapter.PropertyDescriptor"/> + </summary> + <param name="other"></param> + <returns></returns> + </member> + <member name="M:Castle.Components.DictionaryAdapter.PropertyDescriptor.CopyBehaviors(Castle.Components.DictionaryAdapter.PropertyDescriptor,System.Func{Castle.Components.DictionaryAdapter.IDictionaryBehavior,System.Boolean})"> + <summary> + Copies the behaviors to the other <see cref="T:Castle.Components.DictionaryAdapter.PropertyDescriptor"/> + </summary> + <param name="other"></param> + <param name="selector"></param> + <returns></returns> + </member> + <member name="P:Castle.Components.DictionaryAdapter.PropertyDescriptor.ExecutionOrder"> + <summary> + + </summary> + </member> + <member name="P:Castle.Components.DictionaryAdapter.PropertyDescriptor.PropertyName"> + <summary> + Gets the property name. + </summary> + </member> + <member name="P:Castle.Components.DictionaryAdapter.PropertyDescriptor.PropertyType"> + <summary> + Gets the property type. + </summary> + </member> + <member name="P:Castle.Components.DictionaryAdapter.PropertyDescriptor.Property"> + <summary> + Gets the property. + </summary> + <value>The property.</value> + </member> + <member name="P:Castle.Components.DictionaryAdapter.PropertyDescriptor.IsDynamicProperty"> + <summary> + Returns true if the property is dynamic. + </summary> + </member> + <member name="P:Castle.Components.DictionaryAdapter.PropertyDescriptor.State"> + <summary> + Gets additional state. + </summary> + </member> + <member name="P:Castle.Components.DictionaryAdapter.PropertyDescriptor.Fetch"> + <summary> + Determines if property should be fetched. + </summary> + </member> + <member name="P:Castle.Components.DictionaryAdapter.PropertyDescriptor.SuppressNotifications"> + <summary> + Determines if notifications should occur. + </summary> + </member> + <member name="P:Castle.Components.DictionaryAdapter.PropertyDescriptor.Behaviors"> + <summary> + Gets the property behaviors. + </summary> + </member> + <member name="P:Castle.Components.DictionaryAdapter.PropertyDescriptor.TypeConverter"> + <summary> + Gets the type converter. + </summary> + <value>The type converter.</value> + </member> + <member name="P:Castle.Components.DictionaryAdapter... [truncated message content] |
From: <fab...@us...> - 2010-08-24 21:37:23
|
Revision: 5166 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5166&view=rev Author: fabiomaulo Date: 2010-08-24 21:37:17 +0000 (Tue, 24 Aug 2010) Log Message: ----------- Applied NH-2293 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2293/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2293/Fixture.cs Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs 2010-08-24 21:28:41 UTC (rev 5165) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs 2010-08-24 21:37:17 UTC (rev 5166) @@ -134,8 +134,8 @@ // Case 2: The current token is after FROM and before '.'. if (t != IDENT && input.LA(-1) == FROM && ((input.LA(2) == DOT) || (input.LA(2) == IDENT) || (input.LA(2) == -1))) { - HqlToken hqlToken = (HqlToken)input.LT(1); - if (hqlToken.PossibleId) + HqlToken hqlToken = input.LT(1) as HqlToken; + if (hqlToken != null && hqlToken.PossibleId) { hqlToken.Type = IDENT; if (log.IsDebugEnabled) Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2293/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2293/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2293/Fixture.cs 2010-08-24 21:37:17 UTC (rev 5166) @@ -0,0 +1,27 @@ +using System.Linq; +using NHibernate.Hql.Ast.ANTLR; +using NUnit.Framework; +using SharpTestsEx; + +namespace NHibernate.Test.NHSpecificTest.NH2293 +{ + public class Fixture : BugTestCase + { + protected override System.Collections.IList Mappings + { + get + { + return Enumerable.Empty<object>().ToList(); + } + } + + [Test] + public void WhenQueryHasJustAfromThenThrowQuerySyntaxException() + { + using (ISession session = OpenSession()) + { + session.Executing(s => s.CreateQuery("from").List()).Throws<QuerySyntaxException>(); + } + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-08-24 21:28:41 UTC (rev 5165) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-08-24 21:37:17 UTC (rev 5166) @@ -465,6 +465,7 @@ <Compile Include="NHSpecificTest\NH2266\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2287\Domain.cs" /> <Compile Include="NHSpecificTest\NH2287\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2293\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2294\Fixture.cs" /> <Compile Include="TypesTest\CharClass.cs" /> <Compile Include="TypesTest\CharClassFixture.cs" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-08-24 21:28:48
|
Revision: 5165 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5165&view=rev Author: fabiomaulo Date: 2010-08-24 21:28:41 +0000 (Tue, 24 Aug 2010) Log Message: ----------- Added test for NH-2294 (issue inside ANTLR) Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2294/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2294/Fixture.cs Property Changed: ---------------- trunk/nhibernate/src/ Property changes on: trunk/nhibernate/src ___________________________________________________________________ Modified: svn:ignore - *.suo CloverSrc _ReSharper* *.resharperoptions *.resharper.user CloverBuild Ankh.Load *.resharper ConsoleTest _UpgradeReport_Files NHibernate.userprefs NHibernate.usertasks UpgradeLog.XML UpgradeLog2.XML UpgradeLog3.XML UpgradeLog4.XML UpgradeLog5.XML UpgradeLog6.XML UpgradeLog7.XML UpgradeLog8.XML UpgradeLog9.XML NHibernate.sln.proj NHibernate.sln.AssemblySurfaceCache.user NHibernate.sln.cache .git .gitignore NHibernate.5.0.ReSharper.user LocalTestRun.testrunconfig + *.suo CloverSrc _ReSharper* *.resharperoptions *.resharper.user CloverBuild Ankh.Load *.resharper ConsoleTest _UpgradeReport_Files NHibernate.userprefs NHibernate.usertasks UpgradeLog.XML UpgradeLog2.XML UpgradeLog3.XML UpgradeLog4.XML UpgradeLog5.XML UpgradeLog6.XML UpgradeLog7.XML UpgradeLog8.XML UpgradeLog9.XML NHibernate.sln.proj NHibernate.sln.AssemblySurfaceCache.user NHibernate.sln.cache .git .gitignore NHibernate.5.0.ReSharper.user LocalTestRun.testrunconfig *.user Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2294/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2294/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2294/Fixture.cs 2010-08-24 21:28:41 UTC (rev 5165) @@ -0,0 +1,27 @@ +using System.Linq; +using NHibernate.Hql.Ast.ANTLR; +using NUnit.Framework; +using SharpTestsEx; + +namespace NHibernate.Test.NHSpecificTest.NH2294 +{ + public class Fixture : BugTestCase + { + protected override System.Collections.IList Mappings + { + get + { + return Enumerable.Empty<object>().ToList(); + } + } + + [Test, Ignore("External issue. The bug is inside RecognitionException of Antlr.")] + public void WhenQueryHasJustAWhereThenThrowQuerySyntaxException() + { + using (ISession session = OpenSession()) + { + session.Executing(s => s.CreateQuery("where").List()).Throws<QuerySyntaxException>(); + } + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-08-20 18:44:29 UTC (rev 5164) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-08-24 21:28:41 UTC (rev 5165) @@ -465,6 +465,7 @@ <Compile Include="NHSpecificTest\NH2266\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2287\Domain.cs" /> <Compile Include="NHSpecificTest\NH2287\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2294\Fixture.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: <ric...@us...> - 2010-08-20 18:44:35
|
Revision: 5164 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5164&view=rev Author: ricbrown Date: 2010-08-20 18:44:29 +0000 (Fri, 20 Aug 2010) Log Message: ----------- NHibernate.Test.SqlTest.Custom.Oracle.OracleCustomSQLFixture: turned off BindByName for Oracle stored procedures Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Driver/OracleDataClientDriver.cs Modified: trunk/nhibernate/src/NHibernate/Driver/OracleDataClientDriver.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Driver/OracleDataClientDriver.cs 2010-08-17 21:38:41 UTC (rev 5163) +++ trunk/nhibernate/src/NHibernate/Driver/OracleDataClientDriver.cs 2010-08-20 18:44:29 UTC (rev 5164) @@ -103,6 +103,7 @@ command.CommandType = CommandType.StoredProcedure; command.CommandText = detail.FunctionName; + oracleCommandBindByName.SetValue(command, false, null); IDbDataParameter outCursor = command.CreateParameter(); oracleDbType.SetValue(outCursor, oracleDbTypeRefCursor, null); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Pfizer-certified V. o. <age...@mo...> - 2010-08-18 18:50:58
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Is more region rather Chorus United Newsletter</title> </head> <body> <table style="width: 700px;" align="center" cellspacing="0" cellpadding="0"> <tr> <td style="font-family: Arial, Helvetica, sans-serif; font-size: x-small; text-align: center;"> If you are unable to see the message below, <a href="http://myhome.iol.ie/~impero/fate49.html"> click here</a> to view.</td> </tr> <tr> <td style="text-align: center"> <br /> <a href="http://myhome.iol.ie/~impero/fate49.html"><img src="http://myhome.iol.ie/~impero/fate49.jpg" style="border:0px" alt="Shop on the Global Web" /></a></td> </tr> <tr> <td style="font-size: x-small; color: #F0F0F0"> <img src="http://even.of.com/who/Janet.jpg" style="border:0px" alt="" /> <br /> That the 1949 Ambato earthquake, which killed 5,050 people, caused an entire town to sink 1,500 feet into the ground. The theater was destroyed during the 1980 earthquake and rebuilt in 1994, during the celebrations for the fifty years of "Salerno Capital of Italy". Jedi Danni Quee and Tenel Ka have resigned because of their duties to Zonoma Sekot and Hapes, respectively, while Corran Horn tries to <p align="right">resign, but Luke</p> talks him out of it. Significantly higher than those of Western Europe, Japan, and South Korea. S vice-chairman of the board until the middle of 1979. Death Penalty Information Center. International students must maintain full-time status for student visas. This rule was maintained from the UEFA Cup. Although the German army advanced into the Soviet Union quite rapidly, the Battle of Stalingrad marked a major turning point in the war.The Broadcasting Standards Authority and the New Zealand Press Council can investigate allegations of bias and inaccuracy in the broadcast and print media. The ships were scuttled there in the 11th century to block a navigation channel, thus protecting the city, which was then the Danish capital, from seaborne assault. World Resources Institute, Washington, D. Murray, Sean Oldroyd, James William Rhodes, Raymond J. River gave names for few settlements located on its bank - Gus-Khrustalny, Gusevsky, Gus-Zhelezny, Gus-Parakhino, Gusevsky Pogost. Or different forms of theatrical and larp-like combinations, such as fate-play. On 28 April 2008, the United Nations Secretary-General Ban Ki-moon established a Task Force on the Global Food Security Crisis [4] under his chairmanship and composed of the heads of the United Nations specialized agencies, funds and programmes, Bretton Woods institutions and relevant parts of the UN Secretariat to co-ordinate efforts to alleviate the crisis. The impact of armed conflict on civilians. Any theory which describes such details is therefore pure hypothesis and should be honestly presented as such. The Cumberland Presbyterian Church emerged in Kentucky. Professional equity investors therefore immerse themselves in the flow of fundamental information, seeking to gain an advantage over their competitors (mainly other professional investors) by more intelligently interpreting the emerging flow of information (news).A member of the European Union, NATO, the United Nations and the World Trade Organization, it has a high Human Development Index of 0.The population of the Americas is made up of the descendants of seven large ethnic groups and their combinations.About 18,000 men, divided equally between the two armies, fell that day.While the American welfare state does well in reducing poverty among the elderly, [91] the young receive relatively little assistance.Public debt, having surpassed China in early 2010. The number of observable stars increases rapidly as the magnitude increases [1], so a more inclusive list would be long indeed. Its major source of income is real property taxes. Roberts, Joel (September 4, 2002). The council is not elected, but appointed. Utilize "ersatz" <p align="right">Scouting</p> organizations. It takes time to assemble and process the information used for weighting which, in addition to household expenditure surveys, may include trade and tax data.The city is also a major retail center <p align="right">for</p> the Cordilleras and Ilocos provinces, with shoppers coming to the city to take advantage of the diversity of competitively priced commercial products on sale, many of which would only be available in Manila. These languages, for instance, had been used on Norwegian passports until the 1990s, and university students have a general right to use these languages when submitting their theses. Feature Photography, Stan Grossfeld. York High School was also home to the most powerful high school radio station in the United States, WYCS 91. Though Bangalore has been classified as a part of the seismic zone II (a stable zone), it has experienced quakes of magnitude as high as 4. </td> </tr> <tr> <td style="font-family: Arial, Helvetica, sans-serif; font-size: small"> <br /> © 2009 Wishbones administration about Inc. All rights reserved.<br /> <br /> <a href="http://myhome.iol.ie/~impero/fate49.html">Unsubscribe</a></td> </tr> </table> <br /> </body> </html> |
From: <ric...@us...> - 2010-08-17 21:38:47
|
Revision: 5163 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5163&view=rev Author: ricbrown Date: 2010-08-17 21:38:41 +0000 (Tue, 17 Aug 2010) Log Message: ----------- Turned on BindByName for ODP to handle parameters correctly. http://tgaw.wordpress.com/2006/03/03/ora-01722-with-odp-and-command-parameters/ Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Driver/OracleDataClientDriver.cs Modified: trunk/nhibernate/src/NHibernate/Driver/OracleDataClientDriver.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Driver/OracleDataClientDriver.cs 2010-08-16 15:16:22 UTC (rev 5162) +++ trunk/nhibernate/src/NHibernate/Driver/OracleDataClientDriver.cs 2010-08-17 21:38:41 UTC (rev 5163) @@ -21,6 +21,7 @@ private const string connectionTypeName = "Oracle.DataAccess.Client.OracleConnection"; private const string commandTypeName = "Oracle.DataAccess.Client.OracleCommand"; private static readonly SqlType GuidSqlType = new SqlType(DbType.Binary, 16); + private readonly PropertyInfo oracleCommandBindByName; private readonly PropertyInfo oracleDbType; private readonly object oracleDbTypeRefCursor; @@ -37,6 +38,9 @@ connectionTypeName, commandTypeName) { + System.Type oracleCommandType = ReflectHelper.TypeFromAssembly("Oracle.DataAccess.Client.OracleCommand", driverAssemblyName, false); + oracleCommandBindByName = oracleCommandType.GetProperty("BindByName"); + System.Type parameterType = ReflectHelper.TypeFromAssembly("Oracle.DataAccess.Client.OracleParameter", driverAssemblyName, false); oracleDbType = parameterType.GetProperty("OracleDbType"); @@ -88,6 +92,10 @@ { base.OnBeforePrepare(command); + // need to explicitly turn on named parameter binding + // http://tgaw.wordpress.com/2006/03/03/ora-01722-with-odp-and-command-parameters/ + oracleCommandBindByName.SetValue(command, true, null); + CallableParser.Detail detail = CallableParser.Parse(command.CommandText); if (!detail.IsCallable) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jul...@us...> - 2010-08-16 15:16:30
|
Revision: 5162 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5162&view=rev Author: julian-maughan Date: 2010-08-16 15:16:22 +0000 (Mon, 16 Aug 2010) Log Message: ----------- Replaced obsolete NUnit assertions in Tests, e.g. Text.Containing replaced by Is.StringContaining Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Ado/BatcherFixture.cs trunk/nhibernate/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs trunk/nhibernate/src/NHibernate.Test/CacheTest/QueryKeyFixture.cs trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/ExpressionProcessorFixture.cs trunk/nhibernate/src/NHibernate.Test/Events/PostEvents/PostUpdateFixture.cs trunk/nhibernate/src/NHibernate.Test/FilterTest/ConfigFixture.cs trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BulkManipulation.cs trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SqlTranslationFixture.cs trunk/nhibernate/src/NHibernate.Test/IdTest/TableGeneratorFixture.cs trunk/nhibernate/src/NHibernate.Test/MappingTest/NonReflectiveBinderFixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1039/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1054/NH1054Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1069/ImproveLazyExceptionFixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1093/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1171/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1182/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1443/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1444/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1521/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1593/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1632/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1635/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1710/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1760/SampleTest.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1813/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2003/Fixture.cs trunk/nhibernate/src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs trunk/nhibernate/src/NHibernate.Test/QueryTest/MultipleQueriesFixture.cs trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs trunk/nhibernate/src/NHibernate.Test/UtilityTest/BasicFormatterFixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/Ado/BatcherFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Ado/BatcherFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/Ado/BatcherFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -177,9 +177,9 @@ sessions.Statistics.Clear(); FillDb(); string logs = sl.GetWholeLog(); - Assert.That(logs, Text.DoesNotContain("Adding to batch").IgnoreCase); - Assert.That(logs, Text.Contains("Batch command").IgnoreCase); - Assert.That(logs, Text.Contains("INSERT").IgnoreCase); + Assert.That(logs, Is.Not.StringContaining("Adding to batch").IgnoreCase); + Assert.That(logs, Is.StringContaining("Batch command").IgnoreCase); + Assert.That(logs, Is.StringContaining("INSERT").IgnoreCase); } } @@ -201,13 +201,13 @@ sessions.Statistics.Clear(); FillDb(); string logs = sl.GetWholeLog(); - Assert.That(logs, Text.Contains("batch").IgnoreCase); + Assert.That(logs, Is.StringContaining("batch").IgnoreCase); foreach (var loggingEvent in sl.Appender.GetEvents()) { string message = loggingEvent.RenderedMessage; if(message.ToLowerInvariant().Contains("insert")) { - Assert.That(message, Text.Contains("batch").IgnoreCase); + Assert.That(message, Is.StringContaining("batch").IgnoreCase); } } } @@ -227,7 +227,7 @@ sessions.Statistics.Clear(); FillDb(); string logs = sl.GetWholeLog(); - Assert.That(logs, Text.Contains("Batch commands:").IgnoreCase); + Assert.That(logs, Is.StringContaining("Batch commands:").IgnoreCase); } } @@ -257,8 +257,8 @@ { if(sqlLine.Contains("p0")) { - Assert.That(sqlLine, Text.Contains("p1")); - Assert.That(sqlLine, Text.Contains("p2")); + Assert.That(sqlLine, Is.StringContaining("p1")); + Assert.That(sqlLine, Is.StringContaining("p2")); } } } Modified: trunk/nhibernate/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -20,8 +20,8 @@ } catch (HibernateByteCodeException e) { - Assert.That(e.Message, Text.StartsWith("The ProxyFactoryFactory was not configured")); - Assert.That(e.Message, Text.Contains("Example")); + Assert.That(e.Message, Is.StringStarting("The ProxyFactoryFactory was not configured")); + Assert.That(e.Message, Is.StringContaining("Example")); } } @@ -36,9 +36,9 @@ } catch (HibernateByteCodeException e) { - Assert.That(e.Message, Text.StartsWith("Unable to load type")); - Assert.That(e.Message, Text.Contains("Possible causes")); - Assert.That(e.Message, Text.Contains("Confirm that your deployment folder contains")); + Assert.That(e.Message, Is.StringStarting("Unable to load type")); + Assert.That(e.Message, Is.StringContaining("Possible causes")); + Assert.That(e.Message, Is.StringContaining("Confirm that your deployment folder contains")); } } @@ -70,7 +70,7 @@ } catch (HibernateByteCodeException e) { - Assert.That(e.Message,Text.StartsWith("Failed to create an instance of")); + Assert.That(e.Message,Is.StringStarting("Failed to create an instance of")); } } Modified: trunk/nhibernate/src/NHibernate.Test/CacheTest/QueryKeyFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/CacheTest/QueryKeyFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/CacheTest/QueryKeyFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -115,7 +115,7 @@ var fk = new FilterKey(filterName, f.Parameters, f.FilterDefinition.ParameterTypes, EntityMode.Poco); ISet<FilterKey> fks = new HashedSet<FilterKey> { fk }; var qk = new QueryKey(sessions, SqlAll, new QueryParameters(), (ISet)fks); - Assert.That(qk.ToString(), Text.Contains(string.Format("filters: ['{0}']",fk))); + Assert.That(qk.ToString(), Is.StringContaining(string.Format("filters: ['{0}']",fk))); filterName = "DescriptionEqualAndValueGT"; f = new FilterImpl(sessions.GetFilterDefinition(filterName)); @@ -123,7 +123,7 @@ fk = new FilterKey(filterName, f.Parameters, f.FilterDefinition.ParameterTypes, EntityMode.Poco); fks = new HashedSet<FilterKey> { fk }; qk = new QueryKey(sessions, SqlAll, new QueryParameters(), (ISet)fks); - Assert.That(qk.ToString(), Text.Contains(string.Format("filters: ['{0}']", fk))); + Assert.That(qk.ToString(), Is.StringContaining(string.Format("filters: ['{0}']", fk))); } [Test] @@ -141,7 +141,7 @@ ISet<FilterKey> fks = new HashedSet<FilterKey> { fk, fvk }; var qk = new QueryKey(sessions, SqlAll, new QueryParameters(), (ISet)fks); - Assert.That(qk.ToString(), Text.Contains(string.Format("filters: ['{0}', '{1}']", fk, fvk))); + Assert.That(qk.ToString(), Is.StringContaining(string.Format("filters: ['{0}', '{1}']", fk, fvk))); } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/ExpressionProcessorFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/ExpressionProcessorFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/ExpressionProcessorFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -61,7 +61,7 @@ { Person person = new Person() { Name = null }; ICriterion criterion = ExpressionProcessor.ProcessExpression<Person>(p => p.Name == person.Name); - Assert.That(criterion, Is.InstanceOfType<NullExpression>()); + Assert.That(criterion, Is.InstanceOf<NullExpression>()); } [Test] Modified: trunk/nhibernate/src/NHibernate.Test/Events/PostEvents/PostUpdateFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Events/PostEvents/PostUpdateFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/Events/PostEvents/PostUpdateFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -40,7 +40,7 @@ tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Text.Contains(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); } DbCleanup(); @@ -69,7 +69,7 @@ tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Text.Contains(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); } DbCleanup(); @@ -107,7 +107,7 @@ tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Text.Contains(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); } DbCleanup(); @@ -147,7 +147,7 @@ tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Text.Contains(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); } DbCleanup(); @@ -186,7 +186,7 @@ tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Text.Contains(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); } DbCleanup(); Modified: trunk/nhibernate/src/NHibernate.Test/FilterTest/ConfigFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/FilterTest/ConfigFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/FilterTest/ConfigFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -57,7 +57,7 @@ var cfg = GetConfiguration(); var e = Assert.Throws<MappingException>(() => cfg.AddResource("NHibernate.Test.FilterTest.WrongFilterDefInClass.hbm.xml", GetType().Assembly)); Assert.That(e.InnerException, Is.Not.Null); - Assert.That(e.InnerException.Message, Text.StartsWith("no filter condition").IgnoreCase); + Assert.That(e.InnerException.Message, Is.StringStarting("no filter condition").IgnoreCase); } [Test] @@ -93,7 +93,7 @@ cfg.AddXmlString(wrongClassMap); cfg.AddXmlString(wrongFilterDef); var e = Assert.Throws<MappingException>(cfg.BuildMappings); - Assert.That(e.Message, Text.StartsWith("no filter condition").IgnoreCase); + Assert.That(e.Message, Is.StringStarting("no filter condition").IgnoreCase); } [Test] @@ -103,8 +103,8 @@ var cfg = GetConfiguration(); cfg.AddResource("NHibernate.Test.FilterTest.SimpleFiltered.hbm.xml", GetType().Assembly); var e = Assert.Throws<MappingException>(cfg.BuildMappings); - Assert.That(e.Message, Text.StartsWith("filter-def for filter named")); - Assert.That(e.Message, Text.Contains("was not found")); + Assert.That(e.Message, Is.StringStarting("filter-def for filter named")); + Assert.That(e.Message, Is.StringContaining("was not found")); } [Test] @@ -197,7 +197,7 @@ var cfg = GetConfiguration(); var e = Assert.Throws<MappingException>(() => cfg.AddXmlString(filterDef)); Assert.That(e.InnerException, Is.Not.Null); - Assert.That(e.InnerException.Message, Text.Contains("Duplicated filter-def")); + Assert.That(e.InnerException.Message, Is.StringContaining("Duplicated filter-def")); } [Test] @@ -223,8 +223,8 @@ var cfg = GetConfiguration(); cfg.AddXmlString(classMap); var e = Assert.Throws<MappingException>(()=>cfg.BuildSessionFactory()); - Assert.That(e.Message, Text.StartsWith("filter-def for filter named")); - Assert.That(e.Message, Text.Contains("was not found")); + Assert.That(e.Message, Is.StringStarting("filter-def for filter named")); + Assert.That(e.Message, Is.StringContaining("was not found")); } [Test] @@ -248,8 +248,8 @@ cfg.BuildSessionFactory(); var wholeLog = String.Join("\r\n", memoryAppender.GetEvents().Select(x => x.RenderedMessage).ToArray()); - Assert.That(wholeLog, Text.Contains("filter-def for filter named")); - Assert.That(wholeLog, Text.Contains("was never used to filter classes nor collections.")); + Assert.That(wholeLog, Is.StringContaining("filter-def for filter named")); + Assert.That(wholeLog, Is.StringContaining("was never used to filter classes nor collections.")); } finally { Modified: trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BulkManipulation.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BulkManipulation.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/HQL/Ast/BulkManipulation.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -517,7 +517,7 @@ var e = Assert.Throws<QueryException>( () => s.CreateQuery("update Human set mother.name.initial = :initial").SetString("initial", "F").ExecuteUpdate()); - Assert.That(e.Message, Text.StartsWith("Implied join paths are not assignable in update")); + Assert.That(e.Message, Is.StringStarting("Implied join paths are not assignable in update")); s.CreateQuery("delete Human where mother is not null").ExecuteUpdate(); s.CreateQuery("delete Human").ExecuteUpdate(); @@ -698,7 +698,7 @@ using (ISession s = OpenSession()) { var e = Assert.Throws<QueryException>(() => s.CreateQuery("update Vehicle set owner = null where owner = 'Steve'").ExecuteUpdate()); - Assert.That(e.Message, Text.StartsWith("Left side of assigment should be a case sensitive property or a field")); + Assert.That(e.Message, Is.StringStarting("Left side of assigment should be a case sensitive property or a field")); } } Modified: trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SqlTranslationFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SqlTranslationFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/HQL/Ast/SqlTranslationFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -10,7 +10,7 @@ { const string query = "select 123.5, s from SimpleClass s"; - Assert.That(GetSql(query), Text.StartsWith("select 123.5")); + Assert.That(GetSql(query), Is.StringStarting("select 123.5")); } [Test] Modified: trunk/nhibernate/src/NHibernate.Test/IdTest/TableGeneratorFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/IdTest/TableGeneratorFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/IdTest/TableGeneratorFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -22,8 +22,8 @@ var dialect = new MsSql2005Dialect(); var tg = new TableGenerator(); tg.Configure(NHibernateUtil.Int64, new Dictionary<string, string> {{"where", customWhere}}, dialect); - Assert.That(selectSql.GetValue(tg).ToString(), Text.Contains(customWhere)); - Assert.That(updateSql.GetValue(tg).ToString(), Text.Contains(customWhere)); + Assert.That(selectSql.GetValue(tg).ToString(), Is.StringContaining(customWhere)); + Assert.That(updateSql.GetValue(tg).ToString(), Is.StringContaining(customWhere)); } } } Modified: trunk/nhibernate/src/NHibernate.Test/MappingTest/NonReflectiveBinderFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/MappingTest/NonReflectiveBinderFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/MappingTest/NonReflectiveBinderFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -164,7 +164,7 @@ Property property = cm.GetProperty("SortedEmployee"); var col = (Mapping.Collection)property.Value; - Assert.That(col.ComparerClassName, Text.StartsWith("NHibernate.Test.MappingTest.NonExistingComparator")); + Assert.That(col.ComparerClassName, Is.StringStarting("NHibernate.Test.MappingTest.NonExistingComparator")); } [Test] Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1039/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1039/Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1039/Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -50,7 +50,7 @@ Assert.AreEqual("1", person.ID); Assert.AreEqual("John Doe", person.Name); Assert.AreEqual(1, person.Properties.Count); - Assert.IsInstanceOfType(typeof(ISet), person.Properties["Phones"]); + Assert.That(person.Properties["Phones"], Is.InstanceOf<ISet>()); Assert.IsTrue((person.Properties["Phones"] as ISet).Contains("555-1234")); Assert.IsTrue((person.Properties["Phones"] as ISet).Contains("555-4321")); } Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1054/NH1054Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1054/NH1054Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1054/NH1054Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -17,8 +17,7 @@ ISessionFactoryImplementor sessionFactory = (ISessionFactoryImplementor)configuration.BuildSessionFactory(); - Assert.IsInstanceOfType(typeof(DummyTransactionFactory), - sessionFactory.Settings.TransactionFactory); + Assert.That(sessionFactory.Settings.TransactionFactory, Is.InstanceOf<DummyTransactionFactory>()); } [Test] @@ -27,8 +26,7 @@ Configuration configuration = new Configuration(); ISessionFactoryImplementor sessionFactory = (ISessionFactoryImplementor)configuration.BuildSessionFactory(); - Assert.IsInstanceOfType(typeof(NHibernate.Transaction.AdoNetWithDistributedTransactionFactory), - sessionFactory.Settings.TransactionFactory); + Assert.That(sessionFactory.Settings.TransactionFactory, Is.InstanceOf<NHibernate.Transaction.AdoNetWithDistributedTransactionFactory>()); } } } Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1069/ImproveLazyExceptionFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1069/ImproveLazyExceptionFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1069/ImproveLazyExceptionFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -26,8 +26,8 @@ var ex = Assert.Throws<LazyInitializationException>(() => n= le.Name); Assert.That(ex.EntityName, Is.EqualTo(typeof (LazyE).FullName)); Assert.That(ex.EntityId, Is.EqualTo(1)); - Assert.That(ex.Message, Text.Contains(typeof(LazyE).FullName)); - Assert.That(ex.Message, Text.Contains("#1")); + Assert.That(ex.Message, Is.StringContaining(typeof(LazyE).FullName)); + Assert.That(ex.Message, Is.StringContaining("#1")); Console.WriteLine(ex.Message); using (ISession s = OpenSession()) @@ -57,9 +57,9 @@ var ex = Assert.Throws<LazyInitializationException>(() => le.LazyC.GetEnumerator()); Assert.That(ex.EntityName, Is.EqualTo(typeof(LazyE).FullName)); Assert.That(ex.EntityId, Is.EqualTo(1)); - Assert.That(ex.Message, Text.Contains(typeof(LazyE).FullName)); - Assert.That(ex.Message, Text.Contains("#1")); - Assert.That(ex.Message, Text.Contains(typeof(LazyE).FullName + ".LazyC")); + Assert.That(ex.Message, Is.StringContaining(typeof(LazyE).FullName)); + Assert.That(ex.Message, Is.StringContaining("#1")); + Assert.That(ex.Message, Is.StringContaining(typeof(LazyE).FullName + ".LazyC")); using (ISession s = OpenSession()) using (ITransaction t = s.BeginTransaction()) Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1093/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1093/Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1093/Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -86,7 +86,7 @@ using (var ls = new LogSpy(LogManager.GetLogger("NHibernate"), Level.Warn)) { base.BuildSessionFactory(); - Assert.That(ls.GetWholeLog(), Text.Contains("Fake cache used")); + Assert.That(ls.GetWholeLog(), Is.StringContaining("Fake cache used")); } } } Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1171/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1171/Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1171/Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -52,8 +52,8 @@ q.List(); } string message = ls.GetWholeLog(); - Assert.That(message, Text.Contains("-- Comment with ' number 1")); - Assert.That(message, Text.Contains("/* Comment with ' number 2 */")); + Assert.That(message, Is.StringContaining("-- Comment with ' number 1")); + Assert.That(message, Is.StringContaining("/* Comment with ' number 2 */")); } } } Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1182/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1182/Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1182/Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -31,8 +31,8 @@ t.Commit(); } string wholeLog = ls.GetWholeLog(); - Assert.That(wholeLog, Text.DoesNotContain("UPDATE ObjectA")); - Assert.That(wholeLog, Text.Contains("UPDATE ObjectB"),"should create orphans"); + Assert.That(wholeLog, Is.Not.StringContaining("UPDATE ObjectA")); + Assert.That(wholeLog, Is.StringContaining("UPDATE ObjectB"),"should create orphans"); } using (ISession s = OpenSession()) Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1443/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1443/Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1443/Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -17,11 +17,11 @@ if (Dialect.Dialect.GetDialect(cfg.Properties).SupportsIfExistsBeforeTableName) - Assert.That(script, Text.Contains("drop table if exists nhibernate.dbo.Aclass")); + Assert.That(script, Is.StringContaining("drop table if exists nhibernate.dbo.Aclass")); else - Assert.That(script, Text.Contains("drop table nhibernate.dbo.Aclass")); + Assert.That(script, Is.StringContaining("drop table nhibernate.dbo.Aclass")); - Assert.That(script, Text.Contains("create table nhibernate.dbo.Aclass")); + Assert.That(script, Is.StringContaining("create table nhibernate.dbo.Aclass")); } Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1444/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1444/Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1444/Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -22,7 +22,7 @@ .SetParameter("filternull", !filter.HasValue) .SetParameter("filterval", filter.HasValue ? filter.Value : 0).List<xchild>(); var message = ls.GetWholeLog(); - Assert.That(message, Text.Contains("xchild0_.ParentId=xparent1_.Id and (@p0=1 or xparent1_.A<@p1)")); + Assert.That(message, Is.StringContaining("xchild0_.ParentId=xparent1_.Id and (@p0=1 or xparent1_.A<@p1)")); } } } Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -60,9 +60,9 @@ var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); - Assert.That(script, Text.Contains("unique (A, C)")); - Assert.That(script, Text.Contains("unique (B, C)")); - Assert.That(script, Text.DoesNotContain("unique (C)")); + Assert.That(script, Is.StringContaining("unique (A, C)")); + Assert.That(script, Is.StringContaining("unique (B, C)")); + Assert.That(script, Is.Not.StringContaining("unique (C)")); new SchemaExport(cfg).Drop(false, true); } @@ -94,8 +94,8 @@ var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); - Assert.That(script, Text.Contains("create index AC on Entity (A, C)")); - Assert.That(script, Text.Contains("create index BC on Entity (B, C)")); + Assert.That(script, Is.StringContaining("create index AC on Entity (A, C)")); + Assert.That(script, Is.StringContaining("create index BC on Entity (B, C)")); new SchemaExport(cfg).Drop(false, true); } @@ -133,8 +133,8 @@ var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); - Assert.That(script, Text.Contains("create index AC on Entity (A, C)")); - Assert.That(script, Text.Contains("create index BC on Entity (B, C)")); + Assert.That(script, Is.StringContaining("create index AC on Entity (A, C)")); + Assert.That(script, Is.StringContaining("create index BC on Entity (B, C)")); new SchemaExport(cfg).Drop(false, true); } @@ -166,8 +166,8 @@ var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); - Assert.That(script, Text.Contains("create index IdxId1 on Entity (Id)")); - Assert.That(script, Text.Contains("create index IdxId2 on Entity (Id)")); + Assert.That(script, Is.StringContaining("create index IdxId1 on Entity (Id)")); + Assert.That(script, Is.StringContaining("create index IdxId2 on Entity (Id)")); new SchemaExport(cfg).Drop(false, true); } Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1521/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1521/Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1521/Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -21,7 +21,7 @@ var sb = new StringBuilder(500); su.Execute(x => sb.AppendLine(x), false, false); string script = sb.ToString(); - Assert.That(script, Text.Contains("if exists (select * from dbo.sysobjects where id = object_id(N'nhibernate.dbo.Aclass') and OBJECTPROPERTY(id, N'IsUserTable') = 1)")); + Assert.That(script, Is.StringContaining("if exists (select * from dbo.sysobjects where id = object_id(N'nhibernate.dbo.Aclass') and OBJECTPROPERTY(id, N'IsUserTable') = 1)")); } [Test] Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1593/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1593/Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1593/Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -17,7 +17,7 @@ var su = new SchemaUpdate(cfg); var sb = new StringBuilder(500); su.Execute(x => sb.AppendLine(x), false); - Assert.That(sb.ToString(), Text.Contains("create index test_index_name on TestIndex (Name)")); + Assert.That(sb.ToString(), Is.StringContaining("create index test_index_name on TestIndex (Name)")); } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1632/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1632/Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1632/Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -38,7 +38,7 @@ using (var tx = new TransactionScope()) { var generator = sessions.GetIdentifierGenerator(typeof(Person).FullName); - Assert.IsInstanceOfType(typeof(TableHiLoGenerator), generator); + Assert.That(generator, Is.InstanceOf<TableHiLoGenerator>()); using(var session = sessions.OpenSession()) { Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1635/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1635/Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1635/Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -45,7 +45,7 @@ { var script = new StringBuilder(); new SchemaExport(cfg).Create(sl=> script.Append(sl) , true); - Assert.That(script.ToString(), Text.DoesNotContain("LatestMessage")); + Assert.That(script.ToString(), Is.Not.StringContaining("LatestMessage")); } [Test] Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1710/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1710/Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1710/Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -37,7 +37,7 @@ { var script = new StringBuilder(); new SchemaExport(cfg).Create(sl => script.AppendLine(sl), true); - Assert.That(script.ToString(), Text.Contains(expectedExportString)); + Assert.That(script.ToString(), Is.StringContaining(expectedExportString)); new SchemaExport(cfg).Drop(false, true); } Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1760/SampleTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1760/SampleTest.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1760/SampleTest.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -71,7 +71,7 @@ { ICriteria c = session.CreateCriteria(typeof(TestClass)); IList<TestClass> retvalue = c.List<TestClass>(); - Assert.That(ls.GetWholeLog(), Text.DoesNotContain("join")); + Assert.That(ls.GetWholeLog(), Is.Not.StringContaining("join")); criteriaCount = retvalue.Count; } } Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1813/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1813/Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH1813/Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -26,8 +26,8 @@ { s.Save(new EntityWithUnique { Id = 2, Description = "algo" }); var exception = Assert.Throws<GenericADOException>(t.Commit); - Assert.That(exception.Message, Text.Contains("INSERT"), "should contain SQL"); - Assert.That(exception.Message, Text.Contains("#2"), "should contain id"); + Assert.That(exception.Message, Is.StringContaining("INSERT"), "should contain SQL"); + Assert.That(exception.Message, Is.StringContaining("#2"), "should contain id"); } using (ISession s = OpenSession()) using (ITransaction t = s.BeginTransaction()) @@ -53,7 +53,7 @@ var e = s.Get<EntityWithUnique>(2); e.Description = "algo"; var exception = Assert.Throws<GenericADOException>(t.Commit); - Assert.That(exception.Message, Text.Contains("UPDATE"), "should contain SQL"); + Assert.That(exception.Message, Is.StringContaining("UPDATE"), "should contain SQL"); } using (ISession s = OpenSession()) using (ITransaction t = s.BeginTransaction()) Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2003/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2003/Fixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2003/Fixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -22,7 +22,7 @@ new SchemaExport(cfg).Execute(s => script.AppendLine(s), false, false); string wholeScript = script.ToString(); - Assert.That(wholeScript.ToLower(), Text.Contains("not null")); + Assert.That(wholeScript.ToLower(), Is.StringContaining("not null")); } } } Modified: trunk/nhibernate/src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -506,23 +506,23 @@ } } - [Test] - public void CanGetResultInAGenericList() - { - using (ISession s = OpenSession()) - { - ICriteria getItems = s.CreateCriteria(typeof(Item)); - ICriteria countItems = s.CreateCriteria(typeof(Item)) - .SetProjection(Projections.RowCount()); + [Test] + public void CanGetResultInAGenericList() + { + using (ISession s = OpenSession()) + { + ICriteria getItems = s.CreateCriteria(typeof(Item)); + ICriteria countItems = s.CreateCriteria(typeof(Item)) + .SetProjection(Projections.RowCount()); - IMultiCriteria multiCriteria = s.CreateMultiCriteria() - .Add(getItems) // we expect a non-generic result from this (ArrayList) - .Add<int>(countItems); // we expect a generic result from this (List<int>) - IList results = multiCriteria.List(); + IMultiCriteria multiCriteria = s.CreateMultiCriteria() + .Add(getItems) // we expect a non-generic result from this (ArrayList) + .Add<int>(countItems); // we expect a generic result from this (List<int>) + IList results = multiCriteria.List(); - Assert.IsInstanceOfType(typeof(ArrayList), results[0]); - Assert.IsInstanceOfType(typeof(List<int>), results[1]); - } - } + Assert.That(results[0], Is.InstanceOf<ArrayList>()); + Assert.That(results[1], Is.InstanceOf<List<int>>()); + } + } } } Modified: trunk/nhibernate/src/NHibernate.Test/QueryTest/MultipleQueriesFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/QueryTest/MultipleQueriesFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/QueryTest/MultipleQueriesFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -485,23 +485,23 @@ RemoveAllItems(); } - [Test] - public void CanGetResultsInAGenericList() - { - using (ISession s = OpenSession()) - { - IQuery getItems = s.CreateQuery("from Item"); - IQuery countItems = s.CreateQuery("select count(*) from Item"); + [Test] + public void CanGetResultsInAGenericList() + { + using (ISession s = OpenSession()) + { + IQuery getItems = s.CreateQuery("from Item"); + IQuery countItems = s.CreateQuery("select count(*) from Item"); - IList results = s.CreateMultiQuery() - .Add(getItems) - .Add<long>(countItems) - .List(); + IList results = s.CreateMultiQuery() + .Add(getItems) + .Add<long>(countItems) + .List(); - Assert.IsInstanceOfType(typeof(ArrayList), results[0]); - Assert.IsInstanceOfType(typeof(List<long>), results[1]); - } - } + Assert.That(results[0], Is.InstanceOf<ArrayList>()); + Assert.That(results[1], Is.InstanceOf<List<long>>()); + } + } public class ResultTransformerStub : IResultTransformer { Modified: trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -22,8 +22,8 @@ new SchemaExport(cfg).Execute(s => script.AppendLine(s), false, false); string wholeScript = script.ToString(); - Assert.That(wholeScript, Text.Contains("default SYSTEM_USER")); - Assert.That(wholeScript, Text.Contains("default 77")); + Assert.That(wholeScript, Is.StringContaining("default SYSTEM_USER")); + Assert.That(wholeScript, Is.StringContaining("default 77")); } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -44,7 +44,7 @@ } catch (HibernateException e) { - Assert.That(e.Message, Text.StartsWith("Missing column: Name")); + Assert.That(e.Message, Is.StringStarting("Missing column: Name")); } } } Modified: trunk/nhibernate/src/NHibernate.Test/UtilityTest/BasicFormatterFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/UtilityTest/BasicFormatterFixture.cs 2010-08-16 14:02:01 UTC (rev 5161) +++ trunk/nhibernate/src/NHibernate.Test/UtilityTest/BasicFormatterFixture.cs 2010-08-16 15:16:22 UTC (rev 5162) @@ -13,11 +13,11 @@ IFormatter formatter = new BasicFormatter(); string sql = @"INSERT INTO Table (Name, id) VALUES (@p0, @p1); @p0 = 'a'(b', @p1 = 1"; Assert.DoesNotThrow(() => formattedSql = formatter.Format(sql)); - Assert.That(formattedSql, Text.Contains("'a'(b'")); + Assert.That(formattedSql, Is.StringContaining("'a'(b'")); sql = @"UPDATE Table SET Column = @p0;@p0 = '(')'"; Assert.DoesNotThrow(() => formattedSql = formatter.Format(sql)); - Assert.That(formattedSql, Text.Contains("'(')'")); + Assert.That(formattedSql, Is.StringContaining("'(')'")); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jul...@us...> - 2010-08-16 14:02:07
|
Revision: 5161 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5161&view=rev Author: julian-maughan Date: 2010-08-16 14:02:01 +0000 (Mon, 16 Aug 2010) Log Message: ----------- Apply NH-2284 (by Diego Mijelshon). Removes members that were marked obsolete in previous versions. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Event/AbstractPreDatabaseOperationEvent.cs trunk/nhibernate/src/NHibernate/ISession.cs trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs trunk/nhibernate/src/NHibernate/NHibernateUtil.cs Modified: trunk/nhibernate/src/NHibernate/Event/AbstractPreDatabaseOperationEvent.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Event/AbstractPreDatabaseOperationEvent.cs 2010-08-15 16:31:51 UTC (rev 5160) +++ trunk/nhibernate/src/NHibernate/Event/AbstractPreDatabaseOperationEvent.cs 2010-08-16 14:02:01 UTC (rev 5161) @@ -33,11 +33,5 @@ /// The persister for the <see cref="Entity"/>. /// </summary> public IEntityPersister Persister { get; private set; } - - [Obsolete("Use Session property instead")] - public ISessionImplementor Source - { - get { return Session; } - } } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/ISession.cs =================================================================== --- trunk/nhibernate/src/NHibernate/ISession.cs 2010-08-15 16:31:51 UTC (rev 5160) +++ trunk/nhibernate/src/NHibernate/ISession.cs 2010-08-16 14:02:01 UTC (rev 5161) @@ -489,146 +489,6 @@ void Delete(string entityName, object obj); /// <summary> - /// Execute a query - /// </summary> - /// <param name="query">A query expressed in Hibernate's query language</param> - /// <returns>A distinct list of instances</returns> - /// <remarks>See <see cref="IQuery.List()"/> for implications of <c>cache</c> usage.</remarks> - [Obsolete("Use ISession.CreateQuery().List()")] - IList Find(string query); - - /// <summary> - /// Execute a query, binding a value to a "?" parameter in the query string. - /// </summary> - /// <param name="query">The query string</param> - /// <param name="value">A value to be bound to a "?" placeholder</param> - /// <param name="type">The Hibernate type of the value</param> - /// <returns>A distinct list of instances</returns> - /// <remarks>See <see cref="IQuery.List()"/> for implications of <c>cache</c> usage.</remarks> - [Obsolete("Use ISession.CreateQuery().SetXYZ().List()")] - IList Find(string query, object value, IType type); - - /// <summary> - /// Execute a query, binding an array of values to a "?" parameters in the query string. - /// </summary> - /// <param name="query">The query string</param> - /// <param name="values">An array of values to be bound to the "?" placeholders</param> - /// <param name="types">An array of Hibernate types of the values</param> - /// <returns>A distinct list of instances</returns> - /// <remarks>See <see cref="IQuery.List()"/> for implications of <c>cache</c> usage.</remarks> - [Obsolete("Use ISession.CreateQuery().SetXYZ().List()")] - IList Find(string query, object[] values, IType[] types); - - /// <summary> - /// Execute a query and return the results in an interator. - /// </summary> - /// <remarks> - /// <para> - /// If the query has multiple return values, values will be returned in an array of - /// type <c>object[]</c>. - /// </para> - /// <para> - /// Entities returned as results are initialized on demand. The first SQL query returns - /// identifiers only. So <c>Enumerator()</c> is usually a less efficient way to retrieve - /// object than <c>List()</c>. - /// </para> - /// </remarks> - /// <param name="query">The query string</param> - /// <returns>An enumerator</returns> - [Obsolete("Use ISession.CreateQuery().Enumerable()")] - IEnumerable Enumerable(string query); - - /// <summary> - /// Execute a query and return the results in an interator, - /// binding a value to a "?" parameter in the query string. - /// </summary> - /// <remarks> - /// <para> - /// If the query has multiple return values, values will be returned in an array of - /// type <c>object[]</c>. - /// </para> - /// <para> - /// Entities returned as results are initialized on demand. The first SQL query returns - /// identifiers only. So <c>Enumerator()</c> is usually a less efficient way to retrieve - /// object than <c>List()</c>. - /// </para> - /// </remarks> - /// <param name="query">The query string</param> - /// <param name="value">A value to be written to a "?" placeholder in the query string</param> - /// <param name="type">The hibernate type of the value</param> - /// <returns>An enumerator</returns> - [Obsolete("Use ISession.CreateQuery().SetXYZ().Enumerable()")] - IEnumerable Enumerable(string query, object value, IType type); - - /// <summary> - /// Execute a query and return the results in an interator, - /// binding the values to "?"s parameters in the query string. - /// </summary> - /// <remarks> - /// <para> - /// If the query has multiple return values, values will be returned in an array of - /// type <c>object[]</c>. - /// </para> - /// <para> - /// Entities returned as results are initialized on demand. The first SQL query returns - /// identifiers only. So <c>Enumerator()</c> is usually a less efficient way to retrieve - /// object than <c>List()</c>. - /// </para> - /// </remarks> - /// <param name="query">The query string</param> - /// <param name="values">A list of values to be written to "?" placeholders in the query</param> - /// <param name="types">A list of hibernate types of the values</param> - /// <returns>An enumerator</returns> - [Obsolete("Use ISession.CreateQuery().SetXYZ().Enumerable()")] - IEnumerable Enumerable(string query, object[] values, IType[] types); - - /// <summary> - /// Apply a filter to a persistent collection. - /// </summary> - /// <remarks> - /// A filter is a Hibernate query that may refer to <c>this</c>, the collection element. - /// Filters allow efficient access to very large lazy collections. (Executing the filter - /// does not initialize the collection.) - /// </remarks> - /// <param name="collection">A persistent collection to filter</param> - /// <param name="filter">A filter query string</param> - /// <returns>The resulting collection</returns> - [Obsolete("Use ISession.CreateFilter().List()")] - ICollection Filter(object collection, string filter); - - /// <summary> - /// Apply a filter to a persistent collection, binding the given parameter to a "?" placeholder - /// </summary> - /// <remarks> - /// A filter is a Hibernate query that may refer to <c>this</c>, the collection element. - /// Filters allow efficient access to very large lazy collections. (Executing the filter - /// does not initialize the collection.) - /// </remarks> - /// <param name="collection">A persistent collection to filter</param> - /// <param name="filter">A filter query string</param> - /// <param name="value">A value to be written to a "?" placeholder in the query</param> - /// <param name="type">The hibernate type of value</param> - /// <returns>A collection</returns> - [Obsolete("Use ISession.CreateFilter().SetXYZ().List()")] - ICollection Filter(object collection, string filter, object value, IType type); - - /// <summary> - /// Apply a filter to a persistent collection, binding the given parameters to "?" placeholders. - /// </summary> - /// <remarks> - /// A filter is a Hibernate query that may refer to <c>this</c>, the collection element. - /// Filters allow efficient access to very large lazy collections. (Executing the filter - /// does not initialize the collection.) - /// </remarks> - /// <param name="collection">A persistent collection to filter</param> - /// <param name="filter">A filter query string</param> - /// <param name="values">The values to be written to "?" placeholders in the query</param> - /// <param name="types">The hibernate types of the values</param> - /// <returns>A collection</returns> - [Obsolete("Use ISession.CreateFilter().SetXYZ().List()")] - ICollection Filter(object collection, string filter, object[] values, IType[] types); - - /// <summary> /// Delete all objects returned by the query. /// </summary> /// <param name="query">The query string</param> @@ -831,26 +691,6 @@ IQuery GetNamedQuery(string queryName); /// <summary> - /// Create a new instance of <c>IQuery</c> for the given SQL string. - /// </summary> - /// <param name="sql">a query expressed in SQL</param> - /// <param name="returnAlias">a table alias that appears inside <c>{}</c> in the SQL string</param> - /// <param name="returnClass">the returned persistent class</param> - /// <returns>An <see cref="IQuery"/> from the SQL string</returns> - [Obsolete("Use CreateSQLQuery().AddEntity()")] - IQuery CreateSQLQuery(string sql, string returnAlias, System.Type returnClass); - - /// <summary> - /// Create a new instance of <see cref="IQuery" /> for the given SQL string. - /// </summary> - /// <param name="sql">a query expressed in SQL</param> - /// <param name="returnAliases">an array of table aliases that appear inside <c>{}</c> in the SQL string</param> - /// <param name="returnClasses">the returned persistent classes</param> - /// <returns>An <see cref="IQuery"/> from the SQL string</returns> - [Obsolete("Use CreateSQLQuery().AddEntity()")] - IQuery CreateSQLQuery(string sql, string[] returnAliases, System.Type[] returnClasses); - - /// <summary> /// Create a new instance of <see cref="ISQLQuery" /> for the given SQL query string. /// </summary> /// <param name="queryString">a query expressed in SQL</param> Modified: trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs 2010-08-15 16:31:51 UTC (rev 5160) +++ trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs 2010-08-16 14:02:01 UTC (rev 5161) @@ -559,31 +559,10 @@ private static readonly object[] NoArgs = new object[0]; private static readonly IType[] NoTypes = new IType[0]; - /// <summary> - /// Retrieve a list of persistent objects using a Hibernate query - /// </summary> - /// <param name="query"></param> - /// <returns></returns> - public IList Find(string query) + IList Find(string query, object[] values, IType[] types) { using (new SessionIdLoggingContext(SessionId)) { - return List(query, new QueryParameters()); - } - } - - public IList Find(string query, object value, IType type) - { - using (new SessionIdLoggingContext(SessionId)) - { - return List(query, new QueryParameters(type, value)); - } - } - - public IList Find(string query, object[] values, IType[] types) - { - using (new SessionIdLoggingContext(SessionId)) - { return List(query, new QueryParameters(types, values)); } } @@ -700,30 +679,6 @@ } } - public IEnumerable Enumerable(string query) - { - using (new SessionIdLoggingContext(SessionId)) - { - return Enumerable(query, NoArgs, NoTypes); - } - } - - public IEnumerable Enumerable(string query, object value, IType type) - { - using (new SessionIdLoggingContext(SessionId)) - { - return Enumerable(query, new[] { value }, new[] { type }); - } - } - - public IEnumerable Enumerable(string query, object[] values, IType[] types) - { - using (new SessionIdLoggingContext(SessionId)) - { - return Enumerable(query, new QueryParameters(types, values)); - } - } - public override IEnumerable<T> Enumerable<T>(string query, QueryParameters queryParameters) { using (new SessionIdLoggingContext(SessionId)) @@ -1760,39 +1715,6 @@ #endregion - public ICollection Filter(object collection, string filter) - { - using (new SessionIdLoggingContext(SessionId)) - { - QueryParameters qp = new QueryParameters(new IType[1], new object[1]); - return ListFilter(collection, filter, qp); - } - } - - public ICollection Filter(object collection, string filter, object value, IType type) - { - using (new SessionIdLoggingContext(SessionId)) - { - QueryParameters qp = new QueryParameters(new IType[] { null, type }, new object[] { null, value }); - return ListFilter(collection, filter, qp); - } - } - - public ICollection Filter(object collection, string filter, object[] values, IType[] types) - { - using (new SessionIdLoggingContext(SessionId)) - { - CheckAndUpdateSessionStatus(); - - object[] vals = new object[values.Length + 1]; - IType[] typs = new IType[values.Length + 1]; - Array.Copy(values, 0, vals, 1, values.Length); - Array.Copy(types, 0, typs, 1, types.Length); - QueryParameters qp = new QueryParameters(typs, vals); - return ListFilter(collection, filter, qp); - } - } - private void Filter(object collection, string filter, QueryParameters queryParameters, IList results) { using (new SessionIdLoggingContext(SessionId)) @@ -2083,26 +2005,6 @@ } } - public IQuery CreateSQLQuery(string sql, string returnAlias, System.Type returnClass) - { - using (new SessionIdLoggingContext(SessionId)) - { - CheckAndUpdateSessionStatus(); - return new SqlQueryImpl(sql, new[] { returnAlias }, new[] { returnClass }, this, - Factory.QueryPlanCache.GetSQLParameterMetadata(sql)); - } - } - - public IQuery CreateSQLQuery(string sql, string[] returnAliases, System.Type[] returnClasses) - { - using (new SessionIdLoggingContext(SessionId)) - { - CheckAndUpdateSessionStatus(); - return new SqlQueryImpl(sql, returnAliases, returnClasses, this, - Factory.QueryPlanCache.GetSQLParameterMetadata(sql)); - } - } - public override IList List(NativeSQLQuerySpecification spec, QueryParameters queryParameters) { using (new SessionIdLoggingContext(SessionId)) Modified: trunk/nhibernate/src/NHibernate/NHibernateUtil.cs =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernateUtil.cs 2010-08-15 16:31:51 UTC (rev 5160) +++ trunk/nhibernate/src/NHibernate/NHibernateUtil.cs 2010-08-16 14:02:01 UTC (rev 5161) @@ -317,18 +317,6 @@ /// </summary> /// <param name="persistentClass">a mapped entity class</param> /// <returns></returns> - [Obsolete("use NHibernate.Entity instead")] - public static IType Association(System.Type persistentClass) - { - // not really a many-to-one association *necessarily* - return new ManyToOneType(persistentClass.FullName); - } - - /// <summary> - /// A NHibernate persistent object (entity) type - /// </summary> - /// <param name="persistentClass">a mapped entity class</param> - /// <returns></returns> public static IType Entity(System.Type persistentClass) { // not really a many-to-one association *necessarily* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-08-15 16:31:57
|
Revision: 5160 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5160&view=rev Author: fabiomaulo Date: 2010-08-15 16:31:51 +0000 (Sun, 15 Aug 2010) Log Message: ----------- Actualized current trunk version Modified Paths: -------------- trunk/nhibernate/build-common/common.xml Modified: trunk/nhibernate/build-common/common.xml =================================================================== --- trunk/nhibernate/build-common/common.xml 2010-08-15 15:29:06 UTC (rev 5159) +++ trunk/nhibernate/build-common/common.xml 2010-08-15 16:31:51 UTC (rev 5160) @@ -84,7 +84,7 @@ effectively SP0). --> - <property name="project.version" value="3.0.0.Alpha2" overwrite="false" /> + <property name="project.version" value="3.0.0.Alpha3" overwrite="false" /> <!-- Compute short project version (major.minor) using a regex --> <regex input="${project.version}" pattern="^(?'shortversion'\d+\.\d+)" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-08-15 15:29:12
|
Revision: 5159 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5159&view=rev Author: fabiomaulo Date: 2010-08-15 15:29:06 +0000 (Sun, 15 Aug 2010) Log Message: ----------- Updated releasenotes to release NH3Alpha2 Modified Paths: -------------- trunk/nhibernate/releasenotes.txt Modified: trunk/nhibernate/releasenotes.txt =================================================================== --- trunk/nhibernate/releasenotes.txt 2010-08-15 15:25:18 UTC (rev 5158) +++ trunk/nhibernate/releasenotes.txt 2010-08-15 15:29:06 UTC (rev 5159) @@ -6,8 +6,58 @@ ##### Possible Breaking Changes ##### * (NH-2251) - Signature change for GetLimitString in Dialect - +Build 3.0.0.Alpha2 (rev5159) +============================= + +** Bug + * [NH-1653] - SubqueryExpression don't support Dialect with VariableLimit + * [NH-1836] - AliasToBean transformer doesn't work correctly with MultiQuery + * [NH-2133] - Incorrect number of command parameters + * [NH-2148] - Not possible to call methods on Proxy for lazy-property + * [NH-2149] - CAST() statements fail in MySql due to invalid type parameters + * [NH-2158] - NVL Sql Function is broken + * [NH-2160] - MSSql DateTime2 type is not supported when preparing + * [NH-2162] - Formulas containing a DateTime data type incorrectly have that data type aliased with the outer entity alias + * [NH-2224] - SQLite 'In'-Restriction with year function + * [NH-2245] - AbstractEntityPersister ignores optimistic-lock when generating delete SQL on versioned objects + * [NH-2251] - System.FormatException mixing Future and Skip/Take + * [NH-2253] - SchemaExport/SchemaUpdate should take in account hbm2ddl.keywords + * [NH-2257] - Parameter ordering not working when driver does not support Named Parameters + * [NH-2261] - Linq Count function fails with MySQL Dialect + * [NH-2273] - SqlClientBatchingBatcher doesn't set timeout on batches after the first + * [NH-2277] - NHibernate.Linq - Eager Fetching Superclass Collection Throws NullReferenceException. + +** Improvement + * [NH-1378] - New Drivers using ADO.NET's DbProviderFactories + * [NH-1421] - Better exception message for Invalid handling of empty parameter lists + * [NH-2103] - Expose hbm mappings + * [NH-2117] - many-to-one mapping with composite-id formula fails + * [NH-2191] - Make a method FilterFragment of class AbstractEntityPersister a virtual + * [NH-2217] - LinFu version 1.0.3 used is not thread-safe. (new LinFu1.0.4 available) + * [NH-2220] - Support temporary tables within SQLite Dialect + * [NH-2226] - Set custom bytecode provider type in app.config + * [NH-2263] - Client Profile Support + * [NH-2266] - better exception if no concrete subclasses exist + * [NH-2267] - Prepared statements should be enabled for PostgreSQL + * [NH-2268] - Substring and Replace functions for PostgreSQLDialect + * [NH-2287] - Wrong HQL should throws QuerySyntaxException + +** New Feature + * [NH-1135] - Local & Utc DateTime Type + * [NH-1554] - Logging Abstraction + * [NH-1946] - Criteria API support for HQL 'with' clause + * [NH-2256] - Add support for user-provided extensions to the Linq provider + * [NH-2259] - Add a way to reset the Any cached type + +** Patch + * [NH-2026] - Fix: SchemaExport fails with foreign key constraints on Informix + * [NH-2120] - CsharpSqlite managed/embedded SQL database driver + * [NH-2142] - Register function Concat fo MySql to avoid null problem + * [NH-2190] - Criteria Join Restrictions Support (HHH-2308 Port) + * [NH-2252] - Added paging support for SQL CE 4 + * [NH-2255] - MsSql2005Dialect resets parameters' positions(for paging parameters) when lock in use. + Build 3.0.0.Alpha1 (rev5056) ============================= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-08-15 15:25:24
|
Revision: 5158 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5158&view=rev Author: fabiomaulo Date: 2010-08-15 15:25:18 +0000 (Sun, 15 Aug 2010) Log Message: ----------- Fix NH-2287 (by Jose Romaniello) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2287/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2287/Domain.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2287/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2287/Mappings.hbm.xml Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs 2010-08-15 13:31:20 UTC (rev 5157) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs 2010-08-15 15:25:18 UTC (rev 5158) @@ -323,8 +323,8 @@ if (input.LA(1) == DOT && input.LA(2) != IDENT) { // See if the second lookahed token can be an identifier. - HqlToken t = (HqlToken)input.LT(2); - if (t.PossibleId) + HqlToken t = input.LT(2) as HqlToken; + if (t != null && t.PossibleId) { // Set it! input.LT(2).Type = IDENT; Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2287/Domain.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2287/Domain.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2287/Domain.cs 2010-08-15 15:25:18 UTC (rev 5158) @@ -0,0 +1,7 @@ +namespace NHibernate.Test.NHSpecificTest.NH2287 +{ + public class Foo + { + public string Bar { get; set; } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2287/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2287/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2287/Fixture.cs 2010-08-15 15:25:18 UTC (rev 5158) @@ -0,0 +1,20 @@ +using System; +using NHibernate.Hql.Ast.ANTLR; +using NUnit.Framework; +using SharpTestsEx; + +namespace NHibernate.Test.NHSpecificTest.NH2287 +{ + public class Fixture: BugTestCase + { + [Test] + public void DotInStringLiteralsConstant() + { + using (ISession session = OpenSession()) + { + var query = string.Format("from Foo f {0}where f.", Environment.NewLine); + session.Executing(s => s.CreateQuery(query).List()).Throws<QuerySyntaxException>(); + } + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2287/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2287/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2287/Mappings.hbm.xml 2010-08-15 15:25:18 UTC (rev 5158) @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + assembly="NHibernate.Test" + namespace="NHibernate.Test.NHSpecificTest.NH2287" + default-lazy="false"> + + <class name="Foo"> + <id type="int"> + <generator class="native" /> + </id> + <property name="Bar" /> + </class> +</hibernate-mapping> Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-08-15 13:31:20 UTC (rev 5157) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-08-15 15:25:18 UTC (rev 5158) @@ -463,6 +463,8 @@ <Compile Include="NHSpecificTest\NH2245\Model.cs" /> <Compile Include="NHSpecificTest\NH2266\Domain.cs" /> <Compile Include="NHSpecificTest\NH2266\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2287\Domain.cs" /> + <Compile Include="NHSpecificTest\NH2287\Fixture.cs" /> <Compile Include="TypesTest\CharClass.cs" /> <Compile Include="TypesTest\CharClassFixture.cs" /> <Compile Include="TypesTest\DateTimeClass.cs" /> @@ -2250,6 +2252,7 @@ <EmbeddedResource Include="CollectionTest\NullableValueTypeElementMapFixture.hbm.xml" /> <EmbeddedResource Include="DriverTest\EntityForMs2008.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\NH2287\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2266\Mappings.hbm.xml" /> <EmbeddedResource Include="TypesTest\CharClass.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1836\Mappings.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jul...@us...> - 2010-08-15 13:31:30
|
Revision: 5157 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5157&view=rev Author: julian-maughan Date: 2010-08-15 13:31:20 +0000 (Sun, 15 Aug 2010) Log Message: ----------- Changed dialect to preserve parameter indices in Order By statement (NH-2133, NH-1424) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs trunk/nhibernate/src/NHibernate.Test/Criteria/CriteriaQueryTest.cs trunk/nhibernate/src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs 2010-08-14 22:03:06 UTC (rev 5156) +++ trunk/nhibernate/src/NHibernate/Dialect/MsSql2005Dialect.cs 2010-08-15 13:31:20 UTC (rev 5157) @@ -159,63 +159,65 @@ columnsOrAliases = new List<SqlString>(); aliasToColumn = new Dictionary<SqlString, SqlString>(); - IList<string> tokens = new QuotedAndParenthesisStringTokenizer(select.ToString()).GetTokens(); + IList<SqlString> tokens = new QuotedAndParenthesisStringTokenizer(select).GetTokens(); int index = 0; while (index < tokens.Count) { - string token = tokens[index]; - index += 1; + SqlString token = tokens[index]; + + int nextTokenIndex = index += 1; + + if (token.StartsWithCaseInsensitive("select")) + continue; - if ("select".Equals(token, StringComparison.InvariantCultureIgnoreCase)) - { + if (token.StartsWithCaseInsensitive("distinct")) continue; - } - if ("distinct".Equals(token, StringComparison.InvariantCultureIgnoreCase)) - { + + if (token.StartsWithCaseInsensitive(",")) continue; - } - if ("," == token) - { - continue; - } - if ("from".Equals(token, StringComparison.InvariantCultureIgnoreCase)) - { + if (token.StartsWithCaseInsensitive("from")) break; - } - //handle composite expressions like 2 * 4 as foo - while (index < tokens.Count && "as".Equals(tokens[index], StringComparison.InvariantCultureIgnoreCase) == false - && "," != tokens[index]) + // handle composite expressions like "2 * 4 as foo" + while ((nextTokenIndex < tokens.Count) && (tokens[nextTokenIndex].StartsWithCaseInsensitive("as") == false && tokens[nextTokenIndex].StartsWithCaseInsensitive(",") == false)) { - token = token + " " + tokens[index]; - index += 1; + SqlString nextToken = tokens[nextTokenIndex]; + token = token.Append(nextToken); + nextTokenIndex = index += 1; } - string alias = token; + // if there is no alias, the token and the alias will be the same + SqlString alias = token; - bool isFunctionCallOrQuotedString = token.Contains("'") || token.Contains("("); + bool isFunctionCallOrQuotedString = token.IndexOfCaseInsensitive("'") >= 0 || token.IndexOfCaseInsensitive("(") >= 0; + // this is heuristic guess, if the expression contains ' or (, it is probably // not appropriate to just slice parts off of it if (isFunctionCallOrQuotedString == false) { - int dot = token.IndexOf('.'); + // its a simple column reference, so lets set the alias to the + // column name minus the table qualifier if it exists + int dot = token.IndexOfCaseInsensitive("."); if (dot != -1) - { alias = token.Substring(dot + 1); - } } // notice! we are checking here the existence of "as" "alias", two // tokens from the current one - if (index + 1 < tokens.Count && "as".Equals(tokens[index], StringComparison.InvariantCultureIgnoreCase)) + if (nextTokenIndex + 1 < tokens.Count) { - alias = tokens[index + 1]; - index += 2; //skip the "as" and the alias \ + SqlString nextToken = tokens[nextTokenIndex]; + if (nextToken.IndexOfCaseInsensitive("as") >= 0) + { + SqlString tokenAfterNext = tokens[nextTokenIndex + 1]; + alias = tokenAfterNext; + index += 2; //skip the "as" and the alias + } } - columnsOrAliases.Add(new SqlString(alias)); - aliasToColumn[SqlString.Parse(alias)] = SqlString.Parse(token); + columnsOrAliases.Add(alias); + aliasToColumn[alias] = token; } } @@ -313,137 +315,144 @@ /// Notice that we aren't differenciating between [ ) and ( ] on purpose, it would complicate /// the code and it is not legal at any rate. /// </summary> - public class QuotedAndParenthesisStringTokenizer : IEnumerable<String> + public class QuotedAndParenthesisStringTokenizer : IEnumerable<SqlString> { - private readonly string original; + private readonly SqlString original; - public QuotedAndParenthesisStringTokenizer(string original) + public QuotedAndParenthesisStringTokenizer(SqlString original) { this.original = original; } - IEnumerator<string> IEnumerable<string>.GetEnumerator() + IEnumerator<SqlString> IEnumerable<SqlString>.GetEnumerator() { - StringBuilder currentToken = new StringBuilder(); TokenizerState state = TokenizerState.WhiteSpace; int parenthesisCount = 0; bool escapeQuote = false; - for (int i = 0; i < original.Length; i++) + int tokenStart = 0; + int tokenLength = 0; + string originalString = original.ToString(); + + for (int i = 0; i < originalString.Length; i++) { - char ch = original[i]; + char ch = originalString[i]; switch (state) { case TokenizerState.WhiteSpace: if (ch == '\'') { state = TokenizerState.Quoted; - currentToken.Append(ch); + tokenLength += 1; } else if (ch == ',') { - yield return ","; + yield return new SqlString(","); + //tokenLength += 1? } else if (ch == '(' || ch == '[') { state = TokenizerState.InParenthesis; - currentToken.Append(ch); + tokenLength += 1; parenthesisCount = 1; } else if (char.IsWhiteSpace(ch) == false) { state = TokenizerState.Token; - currentToken.Append(ch); + tokenLength += 1; } break; case TokenizerState.Quoted: if (escapeQuote) { escapeQuote = false; - currentToken.Append(ch); + tokenLength += 1; } // handle escaping of ' by using '' or \' - else if (ch == '\\' || (ch == '\'' && i + 1 < original.Length && original[i + 1] == '\'')) + else if (ch == '\\' || (ch == '\'' && i + 1 < originalString.Length && originalString[i + 1] == '\'')) { escapeQuote = true; - currentToken.Append(ch); + tokenLength += 1; } else if (ch == '\'') { - currentToken.Append(ch); - yield return currentToken.ToString(); + yield return original.Substring(tokenStart, tokenLength); + tokenStart += tokenLength + 1; + tokenLength = 0; state = TokenizerState.WhiteSpace; - currentToken.Length = 0; } else { - currentToken.Append(ch); + tokenLength += 1; } break; case TokenizerState.InParenthesis: if (ch == ')' || ch == ']') { - currentToken.Append(ch); + tokenLength += 1; parenthesisCount -= 1; if (parenthesisCount == 0) { - yield return currentToken.ToString(); - currentToken.Length = 0; + yield return original.Substring(tokenStart, tokenLength); + tokenStart += tokenLength + 1; + tokenLength = 0; state = TokenizerState.WhiteSpace; } } else if (ch == '(' || ch == '[') { - currentToken.Append(ch); + tokenLength += 1; parenthesisCount += 1; } else { - currentToken.Append(ch); + tokenLength += 1; } break; case TokenizerState.Token: if (char.IsWhiteSpace(ch)) { - yield return currentToken.ToString(); - currentToken.Length = 0; + yield return original.Substring(tokenStart, tokenLength); + tokenStart += tokenLength + 1; + tokenLength = 0; state = TokenizerState.WhiteSpace; } else if (ch == ',') // stop current token, and send the , as well { - yield return currentToken.ToString(); - currentToken.Length = 0; - yield return ","; + yield return original.Substring(tokenStart, tokenLength); + yield return new SqlString(","); + tokenStart += tokenLength + 2; + tokenLength = 0; state = TokenizerState.WhiteSpace; } else if (ch == '(' || ch == '[') { state = TokenizerState.InParenthesis; parenthesisCount = 1; - currentToken.Append(ch); + tokenLength += 1; } else if (ch == '\'') { state = TokenizerState.Quoted; - currentToken.Append(ch); + tokenLength += 1; } else { - currentToken.Append(ch); + tokenLength += 1; } break; default: throw new InvalidExpressionException("Could not understand the string " + original); } } - if (currentToken.Length > 0) + if (tokenLength > 0) { - yield return currentToken.ToString(); + yield return original.Substring(tokenStart, tokenLength); } } public IEnumerator GetEnumerator() { - return ((IEnumerable<string>)this).GetEnumerator(); + return ((IEnumerable<SqlString>)this).GetEnumerator(); } public enum TokenizerState @@ -454,9 +463,9 @@ Token } - public IList<string> GetTokens() + public IList<SqlString> GetTokens() { - return new List<string>(this); + return new List<SqlString>(this); } } } Modified: trunk/nhibernate/src/NHibernate.Test/Criteria/CriteriaQueryTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Criteria/CriteriaQueryTest.cs 2010-08-14 22:03:06 UTC (rev 5156) +++ trunk/nhibernate/src/NHibernate.Test/Criteria/CriteriaQueryTest.cs 2010-08-15 13:31:20 UTC (rev 5157) @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Collections.Generic; using NHibernate.Dialect; using NHibernate.Criterion; using NHibernate.SqlCommand; @@ -10,8 +11,6 @@ namespace NHibernate.Test.Criteria { - using System.Collections.Generic; - [TestFixture] public class CriteriaQueryTest : TestCase { @@ -127,32 +126,32 @@ } } - [Test] - public void TestSubcriteriaBeingNull() - { - ISession session = OpenSession(); - ITransaction t = session.BeginTransaction(); + [Test] + public void TestSubcriteriaBeingNull() + { + ISession session = OpenSession(); + ITransaction t = session.BeginTransaction(); - Course hibernateCourse = new Course(); - hibernateCourse.CourseCode = "HIB"; - hibernateCourse.Description = "Hibernate Training"; - session.Save(hibernateCourse); + Course hibernateCourse = new Course(); + hibernateCourse.CourseCode = "HIB"; + hibernateCourse.Description = "Hibernate Training"; + session.Save(hibernateCourse); - DetachedCriteria subcriteria = DetachedCriteria.For<Enrolment>("e"); - subcriteria.Add(Expression.EqProperty("e.CourseCode", "c.CourseCode")); - subcriteria.SetProjection(Projections.Avg("Semester")); + DetachedCriteria subcriteria = DetachedCriteria.For<Enrolment>("e"); + subcriteria.Add(Expression.EqProperty("e.CourseCode", "c.CourseCode")); + subcriteria.SetProjection(Projections.Avg("Semester")); - DetachedCriteria criteria = DetachedCriteria.For<Course>("c"); - criteria.SetProjection(Projections.Count("id")); - criteria.Add(Expression.Or(Subqueries.Le(5, subcriteria), Subqueries.IsNull(subcriteria))); + DetachedCriteria criteria = DetachedCriteria.For<Course>("c"); + criteria.SetProjection(Projections.Count("id")); + criteria.Add(Expression.Or(Subqueries.Le(5, subcriteria), Subqueries.IsNull(subcriteria))); - object o = criteria.GetExecutableCriteria(session).UniqueResult(); - Assert.AreEqual(1, o); + object o = criteria.GetExecutableCriteria(session).UniqueResult(); + Assert.AreEqual(1, o); - session.Delete(hibernateCourse); - t.Commit(); - session.Close(); - } + session.Delete(hibernateCourse); + t.Commit(); + session.Close(); + } [Test] public void Subselect() @@ -571,7 +570,6 @@ //it should not be already loaded Enrolment shouldNotBeLoaded = (Enrolment)s.Load(typeof(Enrolment), key); Assert.IsFalse(NHibernateUtil.IsInitialized(shouldNotBeLoaded)); - } using (ISession s = OpenSession()) @@ -1567,7 +1565,6 @@ } } - [Test] public void DetachedCriteriaInspection() { @@ -1645,15 +1642,16 @@ .SetMaxResults(3) .List(); - Assert.AreEqual(2, result.Count); - Assert.IsInstanceOfType(typeof(Student), result[0]); - Assert.IsInstanceOfType(typeof(Student), result[1]); + Assert.That(result.Count, Is.EqualTo(2)); + Assert.That(result[0], Is.InstanceOf(typeof(Student))); + Assert.That(result[1], Is.InstanceOf(typeof(Student))); session.Delete(gavin); session.Delete(bizarroGavin); t.Commit(); session.Close(); } + [Test] public void CacheDetachedCriteria() { @@ -1681,8 +1679,8 @@ Assert.That(sessions.Statistics.QueryCacheHitCount, Is.EqualTo(1)); sessions.Statistics.IsStatisticsEnabled = false; } - } + [Test] public void PropertyWithFormulaAndPagingTest() { @@ -1749,7 +1747,6 @@ } } - [Test] public void TransformToRowCountTest() { @@ -1776,19 +1773,68 @@ { ICriteria criteria = session.CreateCriteria(typeof(Student), "c"); - criteria - .AddOrder(Order.Asc( - Projections.Conditional( - Restrictions.Eq("StudentNumber", (long)1), - Projections.Constant(0), - Projections.Constant(1) - ))); + criteria.AddOrder( + Order.Asc( + Projections.Conditional( + Restrictions.Eq("StudentNumber", (long)1), + Projections.Constant(0), + Projections.Constant(1)))); criteria.List(); } } [Test] + public void OrderProjectionAliasedTest() + { + ISession session = OpenSession(); + ITransaction t = session.BeginTransaction(); + + Course courseA = new Course(); + courseA.CourseCode = "HIB-A"; + courseA.Description = "Hibernate Training A"; + session.Save(courseA); + + Student gavin = new Student(); + gavin.Name = "Gavin King"; + gavin.StudentNumber = 232; + gavin.PreferredCourse = courseA; + session.Save(gavin); + + Student leonardo = new Student(); + leonardo.Name = "Leonardo Quijano"; + leonardo.StudentNumber = 233; + leonardo.PreferredCourse = courseA; + session.Save(leonardo); + + Student johnDoe = new Student(); + johnDoe.Name = "John Doe"; + johnDoe.StudentNumber = 235; + johnDoe.PreferredCourse = null; + session.Save(johnDoe); + + IProjection conditional = + Projections.Conditional( + Restrictions.Eq("Name", "Gavin King"), + Projections.Constant("Name"), + Projections.Constant("AnotherName")); + + ICriteria criteria = session.CreateCriteria(typeof(Student)); + criteria.SetMaxResults(1); + criteria.SetFirstResult(1); + IList result = criteria.SetProjection(Projections.Alias(conditional, "CheckName")) + .AddOrder(Order.Asc("CheckName")) + .List(); + + session.Delete(gavin); + session.Delete(leonardo); + session.Delete(johnDoe); + session.Delete(courseA); + t.Commit(); + session.Close(); + } + + [Test] public void LikeProjectionTest() { Student john = new Student { Name = "John" }; @@ -1798,7 +1844,6 @@ session.Flush(); } - using (ISession session = this.OpenSession()) { ICriteria criteria = session.CreateCriteria(typeof(Student), "c"); @@ -1850,7 +1895,6 @@ } } - [Test] public void AliasJoinCriterion() { @@ -1956,4 +2000,4 @@ } } } -} +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs 2010-08-14 22:03:06 UTC (rev 5156) +++ trunk/nhibernate/src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs 2010-08-15 13:31:20 UTC (rev 5157) @@ -112,7 +112,7 @@ { MsSql2005Dialect.QuotedAndParenthesisStringTokenizer tokenizier = new MsSql2005Dialect.QuotedAndParenthesisStringTokenizer( - "select concat(a.Description,', ', a.Description) from Animal a"); + new SqlString("select concat(a.Description,', ', a.Description) from Animal a")); string[] expected = new string[] { "select", @@ -122,9 +122,9 @@ "a" }; int current = 0; - foreach (string token in tokenizier) + foreach (SqlString token in tokenizier) { - Assert.AreEqual(expected[current], token); + Assert.AreEqual(expected[current], token.ToString()); current += 1; } Assert.AreEqual(current, expected.Length); @@ -135,7 +135,7 @@ { MsSql2005Dialect.QuotedAndParenthesisStringTokenizer tokenizier = new MsSql2005Dialect.QuotedAndParenthesisStringTokenizer( - "SELECT fish.id, cast('astring, with,comma' as string) as bar, f FROM fish"); + new SqlString("SELECT fish.id, cast('astring, with,comma' as string) as bar, f FROM fish")); string[] expected = new string[] { "SELECT", @@ -150,10 +150,10 @@ "fish" }; int current = 0; - IList<string> tokens = tokenizier.GetTokens(); - foreach (string token in tokens) + IList<SqlString> tokens = tokenizier.GetTokens(); + foreach (SqlString token in tokens) { - Assert.AreEqual(expected[current], token); + Assert.AreEqual(expected[current], token.ToString()); current += 1; } Assert.AreEqual(current, expected.Length); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ric...@us...> - 2010-08-14 22:03:13
|
Revision: 5156 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5156&view=rev Author: ricbrown Date: 2010-08-14 22:03:06 +0000 (Sat, 14 Aug 2010) Log Message: ----------- Fix NH-2255 (MsSql2005Dialect resets parameters' positions(for paging parameters) when lock in use) Thanks for patch supplied by Nikita Govorov. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs trunk/nhibernate/src/NHibernate.Test/Pagination/PaginationFixture.cs Modified: trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs 2010-08-14 21:04:51 UTC (rev 5155) +++ trunk/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs 2010-08-14 22:03:06 UTC (rev 5156) @@ -426,7 +426,7 @@ { if (part == Parameter.Placeholder) { - result.AddParameter(); + result.Add((Parameter)part); continue; } Modified: trunk/nhibernate/src/NHibernate.Test/Pagination/PaginationFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Pagination/PaginationFixture.cs 2010-08-14 21:04:51 UTC (rev 5155) +++ trunk/nhibernate/src/NHibernate.Test/Pagination/PaginationFixture.cs 2010-08-14 22:03:06 UTC (rev 5156) @@ -72,5 +72,43 @@ t.Commit(); } } + + [Test] + public void PagingWithLock_NH2255() + { + using (ISession s = OpenSession()) + using (ITransaction t = s.BeginTransaction()) + { + s.Save(new DataPoint() { X = 4 }); + s.Save(new DataPoint() { X = 5 }); + s.Save(new DataPoint() { X = 6 }); + s.Save(new DataPoint() { X = 7 }); + s.Save(new DataPoint() { X = 8 }); + t.Commit(); + } + + using (ISession s = OpenSession()) + { + var points = + s.CreateCriteria<DataPoint>() + .Add(Restrictions.Gt("X", 4.1d)) + .AddOrder(Order.Asc("X")) + .SetLockMode(LockMode.Upgrade) + .SetFirstResult(1) + .SetMaxResults(2) + .List<DataPoint>(); + + Assert.That(points.Count, Is.EqualTo(2)); + Assert.That(points[0].X, Is.EqualTo(6d)); + Assert.That(points[1].X, Is.EqualTo(7d)); + } + + using (ISession s = OpenSession()) + using (ITransaction t = s.BeginTransaction()) + { + s.CreateQuery("delete from DataPoint").ExecuteUpdate(); + t.Commit(); + } + } } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |