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-12-10 18:12:48
|
Revision: 5303 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5303&view=rev Author: fabiomaulo Date: 2010-12-10 18:12:42 +0000 (Fri, 10 Dec 2010) Log Message: ----------- Fix NH-2425 Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs trunk/nhibernate/src/NHibernate/Cfg/NamedXmlDocument.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs 2010-12-10 16:47:11 UTC (rev 5302) +++ trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs 2010-12-10 18:12:42 UTC (rev 5303) @@ -9,6 +9,7 @@ using System.Text; using System.Xml; using System.Xml.Schema; +using System.Xml.Serialization; using Iesi.Collections; using Iesi.Collections.Generic; @@ -78,9 +79,10 @@ private static readonly IInternalLogger log = LoggerProvider.LoggerFor(typeof(Configuration)); - protected internal SettingsFactory settingsFactory; + private readonly XmlSerializer mappingDocumentSerializer = new XmlSerializer(typeof(HbmMapping)); + #region ISerializable Members public Configuration(SerializationInfo info, StreamingContext context) { @@ -1771,7 +1773,7 @@ { var hbmDocument = new XmlDocument(); hbmDocument.Load(reader); - return new NamedXmlDocument(name, hbmDocument); + return new NamedXmlDocument(name, hbmDocument, mappingDocumentSerializer); } catch (MappingException) { Modified: trunk/nhibernate/src/NHibernate/Cfg/NamedXmlDocument.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/NamedXmlDocument.cs 2010-12-10 16:47:11 UTC (rev 5302) +++ trunk/nhibernate/src/NHibernate/Cfg/NamedXmlDocument.cs 2010-12-10 18:12:42 UTC (rev 5303) @@ -11,7 +11,7 @@ private readonly string name; private readonly HbmMapping document; - public NamedXmlDocument(string name, XmlDocument document) + public NamedXmlDocument(string name, XmlDocument document, XmlSerializer mappingDocumentSerializer) { if (document == null) { @@ -24,7 +24,7 @@ } using (var reader = new StringReader(document.DocumentElement.OuterXml)) { - this.document = (HbmMapping)new XmlSerializer(typeof(HbmMapping)).Deserialize(reader); + this.document = (HbmMapping)mappingDocumentSerializer.Deserialize(reader); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-12-10 16:47:17
|
Revision: 5302 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5302&view=rev Author: fabiomaulo Date: 2010-12-10 16:47:11 +0000 (Fri, 10 Dec 2010) Log Message: ----------- Fix NH-2410 (Port <properties> from Hibernate) thanks to Roger Kratz Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/PropertiesBinder.cs trunk/nhibernate/src/NHibernate/Mapping/PersistentClass.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmProperties.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/CompositePropertyRefTest.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/DynamicEntityTest.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/Model.cs Added: trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmProperties.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmProperties.cs (rev 0) +++ trunk/nhibernate/src/NHibernate/Cfg/MappingSchema/HbmProperties.cs 2010-12-10 16:47:11 UTC (rev 5302) @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Xml.Serialization; + +namespace NHibernate.Cfg.MappingSchema +{ + public partial class HbmProperties : AbstractDecoratable, IEntityPropertyMapping, IComponentMapping + { + #region Implementation of IEntityPropertyMapping + + public bool IsLazyProperty + { + get { return false; } + } + + public string Class + { + get { return null; } + } + + public HbmParent Parent + { + get { return null; } + } + + public string EmbeddedNode + { + get { return node; } + } + + public string Name + { + get { return name; } + } + + public string Access + { + get { return "embedded"; } + } + + public bool OptimisticLock + { + get { return optimisticlock; } + } + + #endregion + + #region Implementation of IPropertiesContainerMapping + + [XmlIgnore] + public IEnumerable<IEntityPropertyMapping> Properties + { + get { return Items != null ? Items.Cast<IEntityPropertyMapping>() : new IEntityPropertyMapping[0]; } + } + + #endregion + + #region Overrides of AbstractDecoratable + + protected override HbmMeta[] Metadatas + { + get { return new HbmMeta[0]; } + } + + #endregion + } +} Modified: trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs 2010-12-10 14:23:49 UTC (rev 5301) +++ trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs 2010-12-10 16:47:11 UTC (rev 5302) @@ -286,6 +286,7 @@ model.IsEmbedded = false; model.IsDynamic = true; } + else if (reflectedClass != null) { model.ComponentClass = reflectedClass; @@ -294,8 +295,15 @@ else { // an "embedded" component (ids only) - model.ComponentClass = model.Owner.MappedClass; model.IsEmbedded = true; + if (model.Owner.HasPocoRepresentation) + { + model.ComponentClass = model.Owner.MappedClass; + } + else + { + model.IsDynamic = true; + } } string nodeName = !string.IsNullOrEmpty(componentMapping.EmbeddedNode) Modified: trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/PropertiesBinder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/PropertiesBinder.cs 2010-12-10 14:23:49 UTC (rev 5301) +++ trunk/nhibernate/src/NHibernate/Cfg/XmlHbmBinding/PropertiesBinder.cs 2010-12-10 16:47:11 UTC (rev 5302) @@ -83,6 +83,7 @@ HbmNestedCompositeElement nestedCompositeElementMapping; HbmKeyProperty keyPropertyMapping; HbmKeyManyToOne keyManyToOneMapping; + HbmProperties propertiesMapping; if ((propertyMapping = entityPropertyMapping as HbmProperty) != null) { @@ -104,6 +105,14 @@ property = CreateProperty(collectionMapping, className, collection, inheritedMetas); BindCollectionProperty(collectionMapping, property); } + else if ((propertiesMapping = entityPropertyMapping as HbmProperties) != null) + { + var subpath = propertyName == null ? null : StringHelper.Qualify(propertyBasePath, propertyName); + var value = CreateNewComponent(table); + BindComponent(propertiesMapping, value, null, entityName, subpath, componetDefaultNullable, inheritedMetas); + property = CreateProperty(entityPropertyMapping, className, value, inheritedMetas); + BindComponentProperty(propertiesMapping, property, value); + } else if ((manyToOneMapping = entityPropertyMapping as HbmManyToOne) != null) { var value = new ManyToOne(table); @@ -326,6 +335,16 @@ } } + private void BindComponentProperty(HbmProperties propertiesMapping, Property property, Component model) + { + property.IsUpdateable = propertiesMapping.update; + property.IsInsertable = propertiesMapping.insert; + if (propertiesMapping.unique) + { + model.Owner.Table.CreateUniqueKey(model.ColumnIterator.OfType<Column>().ToList()); + } + } + private void BindComponentProperty(HbmComponent componentMapping, Property property, Component model) { property.IsUpdateable = componentMapping.update; Modified: trunk/nhibernate/src/NHibernate/Mapping/PersistentClass.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Mapping/PersistentClass.cs 2010-12-10 14:23:49 UTC (rev 5301) +++ trunk/nhibernate/src/NHibernate/Mapping/PersistentClass.cs 2010-12-10 16:47:11 UTC (rev 5302) @@ -910,9 +910,10 @@ private Property GetProperty(string propertyName, IEnumerable<Property> iter) { - foreach (Property prop in iter) + var propName = StringHelper.Root(propertyName); + foreach (var prop in iter) { - if (prop.Name.Equals(StringHelper.Root(propertyName))) + if (prop.Name.Equals(propName)) { return prop; } Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2010-12-10 14:23:49 UTC (rev 5301) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2010-12-10 16:47:11 UTC (rev 5302) @@ -530,6 +530,7 @@ <Compile Include="Cfg\MappingSchema\HbmOneToMany.cs" /> <Compile Include="Cfg\MappingSchema\HbmOneToOne.cs" /> <Compile Include="Cfg\MappingSchema\HbmPrimitiveArray.cs" /> + <Compile Include="Cfg\MappingSchema\HbmProperties.cs" /> <Compile Include="Cfg\MappingSchema\HbmProperty.cs" /> <Compile Include="Cfg\MappingSchema\HbmSet.cs" /> <Compile Include="Cfg\MappingSchema\HbmSubclass.cs" /> Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/CompositePropertyRefTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/CompositePropertyRefTest.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/CompositePropertyRefTest.cs 2010-12-10 16:47:11 UTC (rev 5302) @@ -0,0 +1,142 @@ +using System; +using System.Linq; +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.Properties +{ + [TestFixture] + public class CompositePropertyRefTest : BugTestCase + { + private long p_id; + private long p2_id; + + protected override void OnSetUp() + { + using (var s = OpenSession()) + { + using (var tx = s.BeginTransaction()) + { + var p = new Person { Name = "Steve", UserId = "steve" }; + var a = new Address { Addr = "Texas", Country = "USA", Person = p }; + var p2 = new Person { Name = "Max", UserId = "max" }; + var act = new Account { Type = Convert.ToChar("c"), User = p2 }; + p2.Accounts.Add(act); + p_id = (long)s.Save(p); + s.Save(a); + p2_id = (long)s.Save(p2); + s.Save(act); + tx.Commit(); + } + } + } + + protected override void OnTearDown() + { + using (var s = OpenSession()) + { + using (var tx = s.BeginTransaction()) + { + s.Delete("from Account"); + s.Delete("from Address"); + s.Delete("from Person"); + tx.Commit(); + } + } + } + + [Test] + public void MappingOuterJoin() + { + using(var s = OpenSession()) + { + using (s.BeginTransaction()) + { + var p = s.Get<Person>(p_id); //get address reference by outer join + var p2 = s.Get<Person>(p2_id); //get null address reference by outer join + Assert.IsNull(p2.Address); + Assert.IsNotNull(p.Address); + var l = s.CreateQuery("from Person").List(); //pull address references for cache + Assert.AreEqual(l.Count, 2); + Assert.IsTrue(l.Contains(p) && l.Contains(p2)); + } + } + } + + [Test] + public void AddressBySequentialSelect() + { + using (var s = OpenSession()) + { + using (s.BeginTransaction()) + { + var l = s.CreateQuery("from Person p order by p.Name").List<Person>(); + Assert.AreEqual(l.Count, 2); + Assert.IsNull(l[0].Address); + Assert.IsNotNull(l[1].Address); + } + } + } + + [Test] + public void AddressOuterJoin() + { + using (var s = OpenSession()) + { + using (s.BeginTransaction()) + { + var l = s.CreateQuery("from Person p left join fetch p.Address a order by a.Country").List<Person>(); + Assert.AreEqual(l.Count, 2); + if (l[0].Name.Equals("Max")) + { + Assert.IsNull(l[0].Address); + Assert.IsNotNull(l[1].Address); + } + else + { + Assert.IsNull(l[1].Address); + Assert.IsNotNull(l[0].Address); + } + } + } + } + + [Test] + public void AccountsOuterJoin() + { + using (var s = OpenSession()) + { + using (s.BeginTransaction()) + { + var l = s.CreateQuery("from Person p left join p.Accounts").List(); + for (var i = 0; i < 2; i++) + { + var row = (object[])l[i]; + var px = (Person)row[0]; + var accounts = px.Accounts; + Assert.IsFalse(NHibernateUtil.IsInitialized(accounts)); + Assert.IsTrue(px.Accounts.Count > 0 || row[1] == null); + } + } + } + } + + [Test] + public void AccountsOuterJoinVerifyInitialization() + { + using (var s = OpenSession()) + { + using (s.BeginTransaction()) + { + var l = s.CreateQuery("from Person p left join fetch p.Accounts a order by p.Name").List<Person>(); + var p0 = l[0]; + Assert.IsTrue(NHibernateUtil.IsInitialized(p0.Accounts)); + Assert.AreEqual(p0.Accounts.Count, 1); + Assert.AreSame(p0.Accounts.First().User, p0); + var p1 = l[1]; + Assert.IsTrue(NHibernateUtil.IsInitialized(p1.Accounts)); + Assert.AreEqual(p1.Accounts.Count, 0); + } + } + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/DynamicEntityTest.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/DynamicEntityTest.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/DynamicEntityTest.cs 2010-12-10 16:47:11 UTC (rev 5302) @@ -0,0 +1,56 @@ +using System.Collections; +using System.Collections.Generic; +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.Properties +{ + [TestFixture] + public class DynamicEntityTest : BugTestCase + { + protected override void OnSetUp() + { + using (var s = OpenSession()) + { + using (var tx = s.BeginTransaction()) + { + var props = new Dictionary<string, object>(); + props["Foo"] = "Sweden"; + props["Bar"] = "IsCold"; + s.Save("DynamicEntity", new Dictionary<string, object> + { + {"SomeProps", props}, + }); + tx.Commit(); + } + } + } + + protected override void OnTearDown() + { + using (var s = OpenSession()) + { + using (var tx = s.BeginTransaction()) + { + s.Delete("from DynamicEntity"); + tx.Commit(); + } + } + } + + [Test] + public void CanFetchByProperty() + { + using (var s = OpenSession()) + { + using (s.BeginTransaction()) + { + var l = s.CreateQuery("from DynamicEntity de where de.SomeProps.Foo=:fooParam") + .SetString("fooParam", "Sweden").List(); + Assert.AreEqual(1, l.Count); + var props = ((IDictionary)l[0])["SomeProps"]; + Assert.AreEqual("IsCold", ((IDictionary)props)["Bar"]); + } + } + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/Mappings.hbm.xml 2010-12-10 16:47:11 UTC (rev 5302) @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" + namespace="NHibernate.Test.NHSpecificTest.Properties" + assembly="NHibernate.Test"> + + <class entity-name="DynamicEntity"> + <id name="Id" type="Int32"> + <generator class="hilo"/> + + </id> + <properties name="SomeProps"> + <property name="Foo" type="string"/> + <property name="Bar" type="string"/> + </properties> + </class> + + <class name="Person"> + <id name="Id"> + <generator class="hilo"/> + </id> + <property name="Name" length="100"/> + <one-to-one name="Address" property-ref="Person" cascade="all" fetch="join"/> + <set name="Accounts" inverse="true"> + <key property-ref="UserIdAndDeleted"> + <column name="userId"/> + <column name="userDeleted"/> + </key> + <one-to-many class="Account"/> + </set> + <properties name="UserIdAndDeleted" update="false" unique="true"> + <property name="UserId" length="8"/> + <property name="Deleted"/> + </properties> + </class> + + <class name="Address"> + <id name="Id"> + <generator class="hilo"/> + + </id> + <property name="Addr" length="300"/> + <property name="Zip" length="5"/> + <property name="Country" length="25"/> + <many-to-one name="Person" unique="true" not-null="true"/> + </class> + + <class name="Account" table="`Account`"> + <id name="AccountId" length="32"> + <generator class="uuid.hex"/> + </id> + <many-to-one name="User" property-ref="UserIdAndDeleted"> + <column name="userId"/> + <column name="userDeleted"/> + </many-to-one> + <property name="Type" column="`type`" not-null="true"/> + </class> + +</hibernate-mapping> \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/Model.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/Model.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/Properties/Model.cs 2010-12-10 16:47:11 UTC (rev 5302) @@ -0,0 +1,42 @@ +using Iesi.Collections.Generic; + +namespace NHibernate.Test.NHSpecificTest.Properties +{ + public class Person + { + public virtual long Id { get; set; } + public virtual string Name { get; set; } + public virtual Address Address { get; set; } + public virtual string UserId { get; set; } + public virtual bool Deleted { get; set; } + public virtual ISet<Account> Accounts { get; set; } + + public Person() + { + Accounts = new HashedSet<Account>(); + } + } + + public class Address + { + public virtual long Id { get; set; } + public virtual string Addr { get; set; } + public virtual string Zip { get; set; } + public virtual string Country { get; set; } + public virtual Person Person { get; set; } + } + + public class Account + { + public virtual string AccountId { get; set; } + public virtual Person User { get; set; } + public virtual char Type { get; set; } + } + + public class DynamicEntity + { + public virtual long Id { get; set; } + public virtual string Foo { get; set; } + public virtual string Bar { get; set; } + } +} Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-12-10 14:23:49 UTC (rev 5301) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-12-10 16:47:11 UTC (rev 5302) @@ -540,6 +540,9 @@ <Compile Include="NHSpecificTest\NH2420\MyTable.cs" /> <Compile Include="NHSpecificTest\NH2441\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2441\Model.cs" /> + <Compile Include="NHSpecificTest\Properties\CompositePropertyRefTest.cs" /> + <Compile Include="NHSpecificTest\Properties\DynamicEntityTest.cs" /> + <Compile Include="NHSpecificTest\Properties\Model.cs" /> <Compile Include="PolymorphicGetAndLoad\Domain.cs" /> <Compile Include="PolymorphicGetAndLoad\PolymorphicGetAndLoadTest.cs" /> <Compile Include="TypesTest\CharClass.cs" /> @@ -2348,6 +2351,7 @@ <EmbeddedResource Include="CollectionTest\NullableValueTypeElementMapFixture.hbm.xml" /> <EmbeddedResource Include="DriverTest\EntityForMs2008.hbm.xml" /> <Content Include="DynamicEntity\package.html" /> + <EmbeddedResource Include="NHSpecificTest\Properties\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2378\Mappings.hbm.xml" /> <EmbeddedResource Include="TypesTest\XDocClass.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2374\Mappings.hbm.xml" /> @@ -2685,8 +2689,6 @@ <EmbeddedResource Include="DynamicEntity\Tuplizer\Customer.hbm.xml" /> </ItemGroup> <ItemGroup> - <Folder Include="NHSpecificTest\NH2420" /> - <Folder Include="NHSpecificTest\NH2441" /> <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: <jul...@us...> - 2010-12-10 14:23:55
|
Revision: 5301 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5301&view=rev Author: julian-maughan Date: 2010-12-10 14:23:49 +0000 (Fri, 10 Dec 2010) Log Message: ----------- Added BeginTransaction method overload - with IsolationLevel parameter - for stateless sessions (ref. NH-2449) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/IStatelessSession.cs trunk/nhibernate/src/NHibernate/Impl/StatelessSessionImpl.cs Modified: trunk/nhibernate/src/NHibernate/IStatelessSession.cs =================================================================== --- trunk/nhibernate/src/NHibernate/IStatelessSession.cs 2010-12-09 16:15:38 UTC (rev 5300) +++ trunk/nhibernate/src/NHibernate/IStatelessSession.cs 2010-12-10 14:23:49 UTC (rev 5301) @@ -3,8 +3,8 @@ namespace NHibernate { - /// <summary> - /// A command-oriented API for performing bulk operations against a database. + /// <summary> + /// A command-oriented API for performing bulk operations against a database. /// </summary> /// <remarks> /// A stateless session does not implement a first-level cache nor @@ -17,7 +17,7 @@ /// aliasing effects, due to the lack of a first-level cache. /// <para/> /// For certain kinds of transactions, a stateless session may - /// perform slightly faster than a stateful session. + /// perform slightly faster than a stateful session. /// </remarks> public interface IStatelessSession : IDisposable { @@ -61,46 +61,46 @@ object Get(string entityName, object id); /// <summary> Retrieve a entity. - /// + /// /// </summary> /// <returns> a detached entity instance /// </returns> T Get<T>(object id); - /// <summary> - /// Retrieve a entity, obtaining the specified lock mode. + /// <summary> + /// Retrieve a entity, obtaining the specified lock mode. /// </summary> /// <returns> a detached entity instance </returns> object Get(string entityName, object id, LockMode lockMode); - /// <summary> - /// Retrieve a entity, obtaining the specified lock mode. + /// <summary> + /// Retrieve a entity, obtaining the specified lock mode. /// </summary> /// <returns> a detached entity instance </returns> T Get<T>(object id, LockMode lockMode); - /// <summary> - /// Refresh the entity instance state from the database. + /// <summary> + /// Refresh the entity instance state from the database. /// </summary> /// <param name="entity">The entity to be refreshed. </param> void Refresh(object entity); - /// <summary> - /// Refresh the entity instance state from the database. + /// <summary> + /// Refresh the entity instance state from the database. /// </summary> /// <param name="entityName">The entityName for the entity to be refreshed. </param> /// <param name="entity">The entity to be refreshed.</param> void Refresh(string entityName, object entity); - /// <summary> - /// Refresh the entity instance state from the database. + /// <summary> + /// Refresh the entity instance state from the database. /// </summary> /// <param name="entity">The entity to be refreshed. </param> /// <param name="lockMode">The LockMode to be applied.</param> void Refresh(object entity, LockMode lockMode); - /// <summary> - /// Refresh the entity instance state from the database. + /// <summary> + /// Refresh the entity instance state from the database. /// </summary> /// <param name="entityName">The entityName for the entity to be refreshed. </param> /// <param name="entity">The entity to be refreshed. </param> @@ -113,7 +113,7 @@ /// <remarks>Entities returned by the query are detached.</remarks> IQuery CreateQuery(string queryString); - /// <summary> + /// <summary> /// Obtain an instance of <see cref="IQuery"/> for a named query string defined in /// the mapping file. /// </summary> @@ -125,7 +125,7 @@ /// <summary> /// Create a new <see cref="ICriteria"/> instance, for the given entity class, - /// or a superclass of an entity class. + /// or a superclass of an entity class. /// </summary> /// <typeparam name="T">A class, which is persistent, or has persistent subclasses</typeparam> /// <returns> The <see cref="ICriteria"/>. </returns> @@ -134,7 +134,7 @@ /// <summary> /// Create a new <see cref="ICriteria"/> instance, for the given entity class, - /// or a superclass of an entity class, with the given alias. + /// or a superclass of an entity class, with the given alias. /// </summary> /// <typeparam name="T">A class, which is persistent, or has persistent subclasses</typeparam> /// <param name="alias">The alias of the entity</param> @@ -144,7 +144,7 @@ /// <summary> /// Create a new <see cref="ICriteria"/> instance, for the given entity class, - /// or a superclass of an entity class. + /// or a superclass of an entity class. /// </summary> /// <param name="entityType">A class, which is persistent, or has persistent subclasses</param> /// <returns> The <see cref="ICriteria"/>. </returns> @@ -153,7 +153,7 @@ /// <summary> /// Create a new <see cref="ICriteria"/> instance, for the given entity class, - /// or a superclass of an entity class, with the given alias. + /// or a superclass of an entity class, with the given alias. /// </summary> /// <param name="entityType">A class, which is persistent, or has persistent subclasses</param> /// <param name="alias">The alias of the entity</param> @@ -161,7 +161,7 @@ /// <remarks>Entities returned by the query are detached.</remarks> ICriteria CreateCriteria(System.Type entityType, string alias); - /// <summary> + /// <summary> /// Create a new <see cref="ICriteria"/> instance, for the given entity name. /// </summary> /// <param name="entityName">The entity name. </param> @@ -169,9 +169,9 @@ /// <remarks>Entities returned by the query are detached.</remarks> ICriteria CreateCriteria(string entityName); - /// <summary> + /// <summary> /// Create a new <see cref="ICriteria"/> instance, for the given entity name, - /// with the given alias. + /// with the given alias. /// </summary> /// <param name="entityName">The entity name. </param> /// <param name="alias">The alias of the entity</param> @@ -179,7 +179,7 @@ /// <remarks>Entities returned by the query are detached.</remarks> ICriteria CreateCriteria(string entityName, string alias); - /// <summary> + /// <summary> /// Create a new instance of <see cref="ISQLQuery"/> for the given SQL query string. /// Entities returned by the query are detached. /// </summary> @@ -187,10 +187,20 @@ /// <returns> The <see cref="ISQLQuery"/> </returns> ISQLQuery CreateSQLQuery(string queryString); - /// <summary> Begin a NHibernate transaction.</summary> + /// <summary> + /// Begin a NHibernate transaction + /// </summary> + /// <returns>A NHibernate transaction</returns> ITransaction BeginTransaction(); - /// <summary> + /// <summary> + /// Begin a NHibernate transaction with the specified isolation level + /// </summary> + /// <param name="isolationLevel">The isolation level</param> + /// <returns>A NHibernate transaction</returns> + ITransaction BeginTransaction(IsolationLevel isolationLevel); + + /// <summary> /// Returns the current ADO.NET connection associated with this instance. /// </summary> /// <remarks> Modified: trunk/nhibernate/src/NHibernate/Impl/StatelessSessionImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/StatelessSessionImpl.cs 2010-12-09 16:15:38 UTC (rev 5300) +++ trunk/nhibernate/src/NHibernate/Impl/StatelessSessionImpl.cs 2010-12-10 14:23:49 UTC (rev 5301) @@ -140,15 +140,15 @@ } } - public override IList List(IQueryExpression queryExpression, QueryParameters parameters) - { - throw new System.NotImplementedException(); - } + public override IList List(IQueryExpression queryExpression, QueryParameters parameters) + { + throw new System.NotImplementedException(); + } - public override void List(IQueryExpression queryExpression, QueryParameters queryParameters, IList results) - { - throw new System.NotImplementedException(); - } + public override void List(IQueryExpression queryExpression, QueryParameters queryParameters, IList results) + { + throw new System.NotImplementedException(); + } public override IList<T> List<T>(string query, QueryParameters queryParameters) { @@ -660,7 +660,7 @@ } /// <summary> Retrieve a entity. - /// + /// /// </summary> /// <returns> a detached entity instance /// </returns> @@ -680,8 +680,8 @@ } } - /// <summary> - /// Retrieve a entity, obtaining the specified lock mode. + /// <summary> + /// Retrieve a entity, obtaining the specified lock mode. /// </summary> /// <returns> a detached entity instance </returns> public object Get(string entityName, object id, LockMode lockMode) @@ -695,8 +695,8 @@ } } - /// <summary> - /// Retrieve a entity, obtaining the specified lock mode. + /// <summary> + /// Retrieve a entity, obtaining the specified lock mode. /// </summary> /// <returns> a detached entity instance </returns> public T Get<T>(object id, LockMode lockMode) @@ -707,8 +707,8 @@ } } - /// <summary> - /// Refresh the entity instance state from the database. + /// <summary> + /// Refresh the entity instance state from the database. /// </summary> /// <param name="entity">The entity to be refreshed. </param> public void Refresh(object entity) @@ -719,8 +719,8 @@ } } - /// <summary> - /// Refresh the entity instance state from the database. + /// <summary> + /// Refresh the entity instance state from the database. /// </summary> /// <param name="entityName">The entityName for the entity to be refreshed. </param> /// <param name="entity">The entity to be refreshed.</param> @@ -732,8 +732,8 @@ } } - /// <summary> - /// Refresh the entity instance state from the database. + /// <summary> + /// Refresh the entity instance state from the database. /// </summary> /// <param name="entity">The entity to be refreshed. </param> /// <param name="lockMode">The LockMode to be applied.</param> @@ -745,8 +745,8 @@ } } - /// <summary> - /// Refresh the entity instance state from the database. + /// <summary> + /// Refresh the entity instance state from the database. /// </summary> /// <param name="entityName">The entityName for the entity to be refreshed. </param> /// <param name="entity">The entity to be refreshed. </param> @@ -794,7 +794,7 @@ /// <summary> /// Create a new <see cref="ICriteria"/> instance, for the given entity class, - /// or a superclass of an entity class. + /// or a superclass of an entity class. /// </summary> /// <typeparam name="T">A class, which is persistent, or has persistent subclasses</typeparam> /// <returns> The <see cref="ICriteria"/>. </returns> @@ -809,7 +809,7 @@ /// <summary> /// Create a new <see cref="ICriteria"/> instance, for the given entity class, - /// or a superclass of an entity class, with the given alias. + /// or a superclass of an entity class, with the given alias. /// </summary> /// <typeparam name="T">A class, which is persistent, or has persistent subclasses</typeparam> /// <param name="alias">The alias of the entity</param> @@ -841,7 +841,7 @@ } } - /// <summary> + /// <summary> /// Create a new <see cref="ICriteria"/> instance, for the given entity name. /// </summary> /// <param name="entityName">The entity name. </param> @@ -856,9 +856,9 @@ } } - /// <summary> + /// <summary> /// Create a new <see cref="ICriteria"/> instance, for the given entity name, - /// with the given alias. + /// with the given alias. /// </summary> /// <param name="entityName">The entity name. </param> /// <param name="alias">The alias of the entity</param> @@ -873,13 +873,26 @@ } } - /// <summary> Begin a NHibernate transaction.</summary> + /// <summary> + /// Begin a NHibernate transaction + /// </summary> + /// <returns>A NHibernate transaction</returns> public ITransaction BeginTransaction() { + return BeginTransaction(IsolationLevel.Unspecified); + } + + /// <summary> + /// Begin a NHibernate transaction with the specified isolation level + /// </summary> + /// <param name="isolationLevel">The isolation level</param> + /// <returns>A NHibernate transaction</returns> + public ITransaction BeginTransaction(IsolationLevel isolationLevel) + { using (new SessionIdLoggingContext(SessionId)) { CheckAndUpdateSessionStatus(); - return connectionManager.BeginTransaction(); + return connectionManager.BeginTransaction(isolationLevel); } } @@ -1011,8 +1024,7 @@ } else { - return Factory.GetEntityPersister(entityName).GetSubclassEntityPersister(obj, Factory, - EntityMode.Poco); + return Factory.GetEntityPersister(entityName).GetSubclassEntityPersister(obj, Factory, EntityMode.Poco); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jul...@us...> - 2010-12-09 16:15:44
|
Revision: 5300 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5300&view=rev Author: julian-maughan Date: 2010-12-09 16:15:38 +0000 (Thu, 09 Dec 2010) Log Message: ----------- Fixed typing of boolean parameter values (issue reported on SQLite) [ref. NH-2441] Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2441/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2441/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2441/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2441/Model.cs Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs 2010-12-06 16:56:40 UTC (rev 5299) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs 2010-12-09 16:15:38 UTC (rev 5300) @@ -165,7 +165,7 @@ case TypeCode.DateTime: return new HqlStringConstant(_factory, "\'" + (DateTime)value + "\'"); case TypeCode.Boolean: - return new HqlStringConstant(_factory, "\'" + ((bool)value ? "true" : "false") + "\'"); + return (bool)value ? (HqlConstant)True() : (HqlConstant)False(); default: throw new NotSupportedException(string.Format("The constant for '{0}' is not supported", value)); } Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2441/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2441/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2441/Fixture.cs 2010-12-09 16:15:38 UTC (rev 5300) @@ -0,0 +1,57 @@ +using System.Linq; +using NHibernate.Dialect; +using NHibernate.Linq; +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.NH2441 +{ + [TestFixture] + public class Fixture : BugTestCase + { + protected override bool AppliesTo(NHibernate.Dialect.Dialect dialect) + { + return ((dialect is Dialect.SQLiteDialect) || (dialect is Dialect.MsSql2008Dialect)); + } + + protected override void OnSetUp() + { + base.OnSetUp(); + + using (ISession s = OpenSession()) + using (ITransaction tx = s.BeginTransaction()) + { + Person e1 = new Person("Tuna Toksoz", "Born in Istanbul :Turkey"); + Person e2 = new Person("Tuna Toksoz", "Born in Istanbul :Turkiye"); + s.Save(e1); + s.Save(e2); + tx.Commit(); + } + } + + protected override void OnTearDown() + { + using (ISession session = OpenSession()) + using (ITransaction tx = session.BeginTransaction()) + { + session.Delete("from Person"); + tx.Commit(); + } + + base.OnTearDown(); + } + + [Test] + public void LinqQueryBooleanSQLite() + { + using (ISession session = OpenSession()) + { + var query1 = session.Query<Person>().Where(p => true); + var query2 = session.Query<Person>().Where(p => p.Id != null); + var query3 = session.Query<Person>(); + + Assert.That(query1.Count(), Is.EqualTo(query2.Count())); + Assert.That(query3.Count(), Is.EqualTo(query1.Count())); + } + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2441/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2441/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2441/Mappings.hbm.xml 2010-12-09 16:15:38 UTC (rev 5300) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping + xmlns="urn:nhibernate-mapping-2.2" + assembly="NHibernate.Test" + namespace="NHibernate.Test.NHSpecificTest.NH2441"> + + <class name="Person" lazy="false"> + <id name="Id"> + <generator class="native" /> + </id> + <property name="Name"/> + <property name="Biography"/> + </class> + +</hibernate-mapping> \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2441/Model.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2441/Model.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2441/Model.cs 2010-12-09 16:15:38 UTC (rev 5300) @@ -0,0 +1,19 @@ +namespace NHibernate.Test.NHSpecificTest.NH2441 +{ + public class Person + { + public virtual int Id { get; set; } + public virtual string Name { get; set; } + public virtual string Biography { get; set; } + + public Person() + { + } + + public Person(string name, string bio) + { + this.Name = name; + this.Biography = bio; + } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-12-06 16:56:40 UTC (rev 5299) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-12-09 16:15:38 UTC (rev 5300) @@ -538,6 +538,8 @@ <Compile Include="NHSpecificTest\NH2420\DummyEnlistment.cs" /> <Compile Include="NHSpecificTest\NH2420\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2420\MyTable.cs" /> + <Compile Include="NHSpecificTest\NH2441\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2441\Model.cs" /> <Compile Include="PolymorphicGetAndLoad\Domain.cs" /> <Compile Include="PolymorphicGetAndLoad\PolymorphicGetAndLoadTest.cs" /> <Compile Include="TypesTest\CharClass.cs" /> @@ -1832,6 +1834,7 @@ <EmbeddedResource Include="NHSpecificTest\NH2392\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2409\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2420\Mappings.hbm.xml" /> + <EmbeddedResource Include="NHSpecificTest\NH2441\Mappings.hbm.xml" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\NHibernate.ByteCode.Castle\NHibernate.ByteCode.Castle.csproj"> @@ -2683,6 +2686,7 @@ </ItemGroup> <ItemGroup> <Folder Include="NHSpecificTest\NH2420" /> + <Folder Include="NHSpecificTest\NH2441" /> <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: <pa...@us...> - 2010-12-06 16:56:46
|
Revision: 5299 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5299&view=rev Author: patearl Date: 2010-12-06 16:56:40 +0000 (Mon, 06 Dec 2010) Log Message: ----------- NHibernate.TestDatabaseSetup: Removed connection string debug line. Was just using the connection string from nhibernate-properties.xml as it does when running nant test. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs Modified: trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs =================================================================== --- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs 2010-12-06 16:51:11 UTC (rev 5298) +++ trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs 2010-12-06 16:56:40 UTC (rev 5299) @@ -13,8 +13,6 @@ var cfg = new Cfg.Configuration(); var connStr = cfg.Properties["connection.connection_string"]; - Console.WriteLine("Connection String: " + connStr); - using (var conn = new SqlConnection(connStr)) { conn.Open(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2010-12-06 16:51:17
|
Revision: 5298 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5298&view=rev Author: patearl Date: 2010-12-06 16:51:11 +0000 (Mon, 06 Dec 2010) Log Message: ----------- NHibernate.TestDatabaseSetup: Attempting to fix database connection string build problem. Modified Paths: -------------- trunk/nhibernate/build-common/nhibernate-properties.xml Modified: trunk/nhibernate/build-common/nhibernate-properties.xml =================================================================== --- trunk/nhibernate/build-common/nhibernate-properties.xml 2010-12-06 16:25:47 UTC (rev 5297) +++ trunk/nhibernate/build-common/nhibernate-properties.xml 2010-12-06 16:51:11 UTC (rev 5298) @@ -2,5 +2,5 @@ <project xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd"> <property name="nhibernate.dialect" value="NHibernate.Dialect.MsSql2008Dialect" overwrite="false"/> <property name="nhibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" overwrite="false"/> - <property name="nhibernate.connection.connection_string" value="Server=(local);initial catalog=nhibernate;Integrated Security=SSPI" overwrite="false"/> + <property name="nhibernate.connection.connection_string" value="Server=.\SQLExpress;initial catalog=nhibernate;Integrated Security=SSPI" overwrite="false"/> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2010-12-06 16:25:53
|
Revision: 5297 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5297&view=rev Author: patearl Date: 2010-12-06 16:25:47 +0000 (Mon, 06 Dec 2010) Log Message: ----------- NHibernate.TestDatabaseSetup: Trying to get more debugging info as Steve did. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs Modified: trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs =================================================================== --- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs 2010-12-06 16:10:14 UTC (rev 5296) +++ trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs 2010-12-06 16:25:47 UTC (rev 5297) @@ -12,6 +12,8 @@ { var cfg = new Cfg.Configuration(); var connStr = cfg.Properties["connection.connection_string"]; + + Console.WriteLine("Connection String: " + connStr); using (var conn = new SqlConnection(connStr)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2010-12-06 16:10:20
|
Revision: 5296 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5296&view=rev Author: patearl Date: 2010-12-06 16:10:14 +0000 (Mon, 06 Dec 2010) Log Message: ----------- Removed hard-coded connection string from NHibernate.TestDatabaseSetup. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs Modified: trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs =================================================================== --- trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs 2010-12-05 20:25:20 UTC (rev 5295) +++ trunk/nhibernate/src/NHibernate.TestDatabaseSetup/TestDatabaseSetup.cs 2010-12-06 16:10:14 UTC (rev 5296) @@ -13,8 +13,6 @@ var cfg = new Cfg.Configuration(); var connStr = cfg.Properties["connection.connection_string"]; - connStr = @"Server=.\SQLExpress;initial catalog=nhibernate;Integrated Security=SSPI"; - using (var conn = new SqlConnection(connStr)) { conn.Open(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2010-12-05 20:25:26
|
Revision: 5295 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5295&view=rev Author: patearl Date: 2010-12-05 20:25:20 +0000 (Sun, 05 Dec 2010) Log Message: ----------- ShowBuildMenu.bat now handles paths with spaces and running from a different folder. Modified Paths: -------------- trunk/nhibernate/ShowBuildMenu.bat Modified: trunk/nhibernate/ShowBuildMenu.bat =================================================================== --- trunk/nhibernate/ShowBuildMenu.bat 2010-12-05 08:35:46 UTC (rev 5294) +++ trunk/nhibernate/ShowBuildMenu.bat 2010-12-05 20:25:20 UTC (rev 5295) @@ -1,6 +1,9 @@ @echo off -set NANT=%~dp0\Tools\nant\bin\NAnt.exe -t:net-3.5 +set OLD_CD=%CD% +cd %~dp0 +set NANT=Tools\nant\bin\NAnt.exe -t:net-3.5 + echo --- SETUP --- echo A. Set up for Visual Studio (creates AssemblyInfo.cs files). echo. @@ -86,4 +89,5 @@ goto end :end +cd %OLD_CD% pause This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jul...@us...> - 2010-12-05 08:35:56
|
Revision: 5294 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5294&view=rev Author: julian-maughan Date: 2010-12-05 08:35:46 +0000 (Sun, 05 Dec 2010) Log Message: ----------- Relocation of Northwind domain entities and mappings from NHibernate.Tests to NHibernate.DomainModel project Modified Paths: -------------- trunk/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel.csproj trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Address.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Animal.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/AnotherEntity.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Customer.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Employee.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Entity.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Northwind.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Order.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/OrderLine.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Patient.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Product.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/ProductCategory.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Region.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Role.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Shipper.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Supplier.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Territory.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Timesheet.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/User.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/UserComponent.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/UserDto.cs trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Animal.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/AnotherEntity.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Customer.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Employee.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Order.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/OrderLine.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Patient.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Product.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/ProductCategory.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Region.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Role.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Shipper.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Supplier.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Territory.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/TimeSheet.hbm.xml trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/User.hbm.xml trunk/nhibernate/src/NHibernate.Test/Linq/BinaryBooleanExpressionTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/BooleanMethodExtensionExample.cs trunk/nhibernate/src/NHibernate.Test/Linq/DynamicQueryTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/EagerLoadTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/EnumTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/LinqQuerySamples.cs trunk/nhibernate/src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs trunk/nhibernate/src/NHibernate.Test/Linq/LinqTestCase.cs trunk/nhibernate/src/NHibernate.Test/Linq/MiscellaneousTextFixture.cs trunk/nhibernate/src/NHibernate.Test/Linq/NorthwindDbCreator.cs trunk/nhibernate/src/NHibernate.Test/Linq/NullComparisonTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/ParameterisedQueries.cs trunk/nhibernate/src/NHibernate.Test/Linq/PatientTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/QueryReuseTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/RegresstionTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/SelectionTests.cs trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.DomainModel/Northwind/ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/ Removed Paths: ------------- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/ trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/ Modified: trunk/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel.csproj 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel.csproj 2010-12-05 08:35:46 UTC (rev 5294) @@ -137,6 +137,27 @@ <Compile Include="NHSpecific\SimpleComponent.cs" /> <Compile Include="NHSpecific\Team.cs" /> <Compile Include="NHSpecific\UnsavedType.cs" /> + <Compile Include="Northwind\Entities\Address.cs" /> + <Compile Include="Northwind\Entities\Animal.cs" /> + <Compile Include="Northwind\Entities\AnotherEntity.cs" /> + <Compile Include="Northwind\Entities\Customer.cs" /> + <Compile Include="Northwind\Entities\Employee.cs" /> + <Compile Include="Northwind\Entities\Entity.cs" /> + <Compile Include="Northwind\Entities\Northwind.cs" /> + <Compile Include="Northwind\Entities\Order.cs" /> + <Compile Include="Northwind\Entities\OrderLine.cs" /> + <Compile Include="Northwind\Entities\Patient.cs" /> + <Compile Include="Northwind\Entities\Product.cs" /> + <Compile Include="Northwind\Entities\ProductCategory.cs" /> + <Compile Include="Northwind\Entities\Region.cs" /> + <Compile Include="Northwind\Entities\Role.cs" /> + <Compile Include="Northwind\Entities\Shipper.cs" /> + <Compile Include="Northwind\Entities\Supplier.cs" /> + <Compile Include="Northwind\Entities\Territory.cs" /> + <Compile Include="Northwind\Entities\Timesheet.cs" /> + <Compile Include="Northwind\Entities\User.cs" /> + <Compile Include="Northwind\Entities\UserComponent.cs" /> + <Compile Include="Northwind\Entities\UserDto.cs" /> <Compile Include="NotMono.cs" /> <Compile Include="One.cs" /> <Compile Include="Outer.cs" /> @@ -223,6 +244,22 @@ </ItemGroup> <ItemGroup> <None Include="NHibernate.DomainModel.build" /> + <EmbeddedResource Include="Northwind\Mappings\Animal.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\AnotherEntity.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\Customer.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\Employee.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\Order.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\OrderLine.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\Patient.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\Product.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\ProductCategory.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\Region.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\Role.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\Shipper.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\Supplier.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\Territory.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\TimeSheet.hbm.xml" /> + <EmbeddedResource Include="Northwind\Mappings\User.hbm.xml" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\NHibernate\NHibernate.csproj"> @@ -241,6 +278,9 @@ <Service Include="..\..\..\..\trunk\nhibernate\src\NHibernate.DomainModel\{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}" /> </ItemGroup> <ItemGroup> + <Folder Include="Northwind" /> + <Folder Include="Northwind\Entities" /> + <Folder Include="Northwind\Mappings" /> <Folder Include="Properties\" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> Property changes on: trunk/nhibernate/src/NHibernate.DomainModel/Northwind ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Address.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Address.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Address.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,4 +1,4 @@ -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class Address { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Animal.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Animal.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Animal.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class Animal { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/AnotherEntity.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/AnotherEntity.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/AnotherEntity.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,4 +1,4 @@ -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class AnotherEntity { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Customer.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Customer.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Customer.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -2,7 +2,7 @@ using System.Collections.ObjectModel; using Iesi.Collections.Generic; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class Customer { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Employee.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Employee.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Employee.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -3,7 +3,7 @@ using System.Collections.ObjectModel; using Iesi.Collections.Generic; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class Employee { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Entity.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Entity.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Entity.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,4 +1,4 @@ -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public abstract class Entity<T> { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Northwind.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Northwind.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Northwind.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -3,7 +3,7 @@ using System.Linq; using NHibernate.Linq; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class Northwind { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Order.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Order.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Order.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -3,7 +3,7 @@ using System.Collections.ObjectModel; using Iesi.Collections.Generic; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class Order { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/OrderLine.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/OrderLine.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/OrderLine.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,4 +1,4 @@ -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class OrderLine : Entity<OrderLine> { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Patient.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Patient.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Patient.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class Patient { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Product.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Product.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Product.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class Thing { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/ProductCategory.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/ProductCategory.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/ProductCategory.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -2,7 +2,7 @@ using System.Collections.ObjectModel; using Iesi.Collections.Generic; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class ProductCategory { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Region.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Region.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Region.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -2,7 +2,7 @@ using System.Collections.ObjectModel; using Iesi.Collections.Generic; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class Region : Entity<Region> { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Role.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Role.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Role.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,5 +1,5 @@ -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class Role { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Shipper.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Shipper.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Shipper.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class Shipper { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Supplier.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Supplier.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Supplier.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -2,7 +2,7 @@ using System.Collections.ObjectModel; using Iesi.Collections.Generic; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class Supplier { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Territory.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Territory.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Territory.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -2,7 +2,7 @@ using System.Collections.ObjectModel; using Iesi.Collections.Generic; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class Territory : Entity<Territory> { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Timesheet.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/Timesheet.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/Timesheet.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class Timesheet { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/User.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/User.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/User.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -2,7 +2,7 @@ using System.Data; using NHibernate.Type; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { [Flags] public enum FeatureSet Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/UserComponent.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/UserComponent.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/UserComponent.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,4 +1,4 @@ -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class UserComponent { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/UserDto.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Entities/UserDto.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Entities/UserDto.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,6 +1,6 @@ using System; -namespace NHibernate.Test.Linq.Entities +namespace NHibernate.DomainModel.Northwind.Entities { public class UserDto { Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Animal.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/Animal.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Animal.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" ?> -<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="Animal"> <id name="Id"> <generator class="native"/> Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/AnotherEntity.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/AnotherEntity.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/AnotherEntity.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" ?> -<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="AnotherEntity" table="AnotherEntity"> <id name="Id"> <generator class="native" /> Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Customer.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/Customer.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Customer.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" - namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> + namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="Customer" table="Customers"> <id name="CustomerId" column="CustomerId" type="string" unsaved-value="-1" @@ -17,7 +17,7 @@ <property name="ContactTitle" column="ContactTitle" type="string" length="30" access="field.camelcase-underscore"/> - <component name="Address" class="NHibernate.Test.Linq.Entities.Address, NHibernate.Test" + <component name="Address" class="NHibernate.DomainModel.Northwind.Entities.Address, NHibernate.DomainModel" access="field.camelcase-underscore" insert="true" update="true"> <property name="Street" column="Address" type="string" length="60" Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Employee.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/Employee.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Employee.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" - namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> + namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="Employee" table="Employees"> <id name="EmployeeId" column="EmployeeId" type="int" unsaved-value="-1" @@ -26,7 +26,7 @@ <property name="HireDate" column="HireDate" type="DateTime" access="field.camelcase-underscore"/> - <component name="Address" class="NHibernate.Test.Linq.Entities.Address, NHibernate.Test" + <component name="Address" class="NHibernate.DomainModel.Northwind.Entities.Address, NHibernate.DomainModel" access="field.camelcase-underscore" insert="true" update="true"> <property name="Street" column="Address" type="string" length="60" Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Order.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/Order.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Order.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" - namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> + namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="Order" table="Orders"> <id name="OrderId" column="OrderId" type="int" unsaved-value="-1" @@ -32,7 +32,7 @@ <property name="ShippedTo" column="ShipName" type="string" length="40" access="field.camelcase-underscore"/> - <component name="ShippingAddress" class="NHibernate.Test.Linq.Entities.Address, NHibernate.Test" + <component name="ShippingAddress" class="NHibernate.DomainModel.Northwind.Entities.Address, NHibernate.DomainModel" access="field.camelcase-underscore" insert="true" update="true"> <property name="Street" column="ShipAddress" type="string" length="60" Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/OrderLine.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/OrderLine.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/OrderLine.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" - namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> + namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="OrderLine" table="OrderLines"> Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Patient.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/Patient.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Patient.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" ?> -<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="Patient" table="Patients"> <id name="Id" column="PatientId" type="Int64"> <generator class="native" /> @@ -23,7 +23,7 @@ <id name="Id" column="PatientRecordId" type="System.Int64"> <generator class="native" /> </id> - <property type="NHibernate.Test.Linq.Entities.Gender, NHibernate.Test" not-null="true" name="Gender" column="`Gender`" /> + <property type="NHibernate.DomainModel.Northwind.Entities.Gender, NHibernate.DomainModel" not-null="true" name="Gender" column="`Gender`" /> <property type="System.DateTime" not-null="true" name="BirthDate" column="`BirthDate`" /> <component name="Name" class="PatientName"> Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Product.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/Product.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Product.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" - namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> + namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> - <import class="NHibernate.Test.Linq.Entities.Thing, NHibernate.Test"/> + <import class="NHibernate.DomainModel.Northwind.Entities.Thing, NHibernate.DomainModel"/> <class name="Product" table="Products"> <id name="ProductId" column="ProductId" type="int" unsaved-value="-1" Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/ProductCategory.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/ProductCategory.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/ProductCategory.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" - namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> + namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="ProductCategory" table="Categories"> Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Region.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/Region.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Region.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" - namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> + namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="Region" table="Region"> <id name="Id" column="RegionId" type="long" unsaved-value="-1" Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Role.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/Role.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Role.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" ?> -<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="Role" table="Roles"> <id name="Id"> <generator class="native" /> Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Shipper.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/Shipper.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Shipper.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" - namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> + namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="Shipper" table="Shippers"> <id name="ShipperId" column="ShipperId" type="int" unsaved-value="-1" Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Supplier.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/Supplier.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Supplier.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" - namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> + namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="Supplier" table="Suppliers"> <id name="SupplierId" column="SupplierId" type="int" unsaved-value="-1" @@ -20,7 +20,7 @@ <property name="HomePage" column="HomePage" type="string" access="field.camelcase-underscore"/> - <component name="Address" class="NHibernate.Test.Linq.Entities.Address, NHibernate.Test" + <component name="Address" class="NHibernate.DomainModel.Northwind.Entities.Address, NHibernate.DomainModel" access="field.camelcase-underscore" insert="true" update="true"> <property name="Street" column="Address" type="string" length="60" Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Territory.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/Territory.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/Territory.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" - namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> + namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="Territory" table="Territories"> <id name="Id" column="TerritoryId" type="long" unsaved-value="-1" Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/TimeSheet.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/TimeSheet.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/TimeSheet.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" ?> -<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="Timesheet" table="Timesheets"> <id name="Id" column="TimesheetId"> <generator class="native" /> @@ -10,12 +10,12 @@ <bag name="Entries" cascade="all-delete-orphan"> <key column="TimesheetID" /> - <one-to-many class="NHibernate.Test.Linq.Entities.TimesheetEntry" /> + <one-to-many class="NHibernate.DomainModel.Northwind.Entities.TimesheetEntry" /> </bag> <bag name="Users" cascade="all-delete-orphan" access="field.camelcase" table="TimeSheetUsers"> <key column="TimesheetID" /> - <many-to-many class="NHibernate.Test.Linq.Entities.User" column="UserId" /> + <many-to-many class="NHibernate.DomainModel.Northwind.Entities.User" column="UserId" /> </bag> </class> Modified: trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/User.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/Mappings/User.hbm.xml 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.DomainModel/Northwind/Mappings/User.hbm.xml 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" ?> -<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernate.Test.Linq.Entities" assembly="NHibernate.Test"> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel"> <class name="User" table="Users" proxy="IUser" > @@ -12,7 +12,7 @@ <property name="RegisteredAt" type="DateTime" /> <property name="LastLoginDate" type="DateTime" /> - <property name="Enum1" type="NHibernate.Test.Linq.Entities.EnumStoredAsStringType, NHibernate.Test"> + <property name="Enum1" type="NHibernate.DomainModel.Northwind.Entities.EnumStoredAsStringType, NHibernate.DomainModel"> <column name="Enum1" length="12" /> </property> Modified: trunk/nhibernate/src/NHibernate.Test/Linq/BinaryBooleanExpressionTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/BinaryBooleanExpressionTests.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/BinaryBooleanExpressionTests.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,7 +1,7 @@ using System; using System.Linq; using System.Linq.Expressions; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; namespace NHibernate.Test.Linq Modified: trunk/nhibernate/src/NHibernate.Test/Linq/BooleanMethodExtensionExample.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/BooleanMethodExtensionExample.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/BooleanMethodExtensionExample.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -10,7 +10,7 @@ using NHibernate.Linq; using NHibernate.Linq.Functions; using NHibernate.Linq.Visitors; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; using SharpTestsEx; Modified: trunk/nhibernate/src/NHibernate.Test/Linq/DynamicQueryTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/DynamicQueryTests.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/DynamicQueryTests.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,7 +1,7 @@ using System; using System.Linq; //using System.Linq.Dynamic; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; namespace NHibernate.Test.Linq Modified: trunk/nhibernate/src/NHibernate.Test/Linq/EagerLoadTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/EagerLoadTests.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/EagerLoadTests.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,6 +1,6 @@ using System.Linq; using NHibernate.Linq; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; using SharpTestsEx; Modified: trunk/nhibernate/src/NHibernate.Test/Linq/EnumTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/EnumTests.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/EnumTests.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,5 +1,5 @@ using System.Linq; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; namespace NHibernate.Test.Linq Modified: trunk/nhibernate/src/NHibernate.Test/Linq/LinqQuerySamples.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/LinqQuerySamples.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/LinqQuerySamples.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; namespace NHibernate.Test.Linq Modified: trunk/nhibernate/src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -14,29 +14,37 @@ [SetUpFixture] public class LinqReadonlyTestsContext { + /// <summary> + /// Assembly to load mapping files from + /// </summary> + protected virtual string MappingsAssembly + { + get { return "NHibernate.DomainModel"; } + } + private IEnumerable<string> Mappings { get { return new[] - { - "Linq.Mappings.Customer.hbm.xml", - "Linq.Mappings.Employee.hbm.xml", - "Linq.Mappings.Order.hbm.xml", - "Linq.Mappings.OrderLine.hbm.xml", - "Linq.Mappings.Product.hbm.xml", - "Linq.Mappings.ProductCategory.hbm.xml", - "Linq.Mappings.Region.hbm.xml", - "Linq.Mappings.Shipper.hbm.xml", - "Linq.Mappings.Supplier.hbm.xml", - "Linq.Mappings.Territory.hbm.xml", - "Linq.Mappings.AnotherEntity.hbm.xml", - "Linq.Mappings.Role.hbm.xml", - "Linq.Mappings.User.hbm.xml", - "Linq.Mappings.TimeSheet.hbm.xml", - "Linq.Mappings.Animal.hbm.xml", - "Linq.Mappings.Patient.hbm.xml" - }; + { + "Northwind.Mappings.Customer.hbm.xml", + "Northwind.Mappings.Employee.hbm.xml", + "Northwind.Mappings.Order.hbm.xml", + "Northwind.Mappings.OrderLine.hbm.xml", + "Northwind.Mappings.Product.hbm.xml", + "Northwind.Mappings.ProductCategory.hbm.xml", + "Northwind.Mappings.Region.hbm.xml", + "Northwind.Mappings.Shipper.hbm.xml", + "Northwind.Mappings.Supplier.hbm.xml", + "Northwind.Mappings.Territory.hbm.xml", + "Northwind.Mappings.AnotherEntity.hbm.xml", + "Northwind.Mappings.Role.hbm.xml", + "Northwind.Mappings.User.hbm.xml", + "Northwind.Mappings.TimeSheet.hbm.xml", + "Northwind.Mappings.Animal.hbm.xml", + "Northwind.Mappings.Patient.hbm.xml" + }; } } @@ -106,10 +114,9 @@ configuration.SetProperty(Environment.ConnectionProvider, typeof (DriverConnectionProvider).AssemblyQualifiedName); - string assemblyName = "NHibernate.Test"; - Assembly assembly = Assembly.Load(assemblyName); + Assembly assembly = Assembly.Load(MappingsAssembly); - foreach (string file in Mappings.Select(mf => assemblyName + "." + mf)) + foreach (string file in Mappings.Select(mf => MappingsAssembly + "." + mf)) { configuration.AddResource(file, assembly); } Modified: trunk/nhibernate/src/NHibernate.Test/Linq/LinqTestCase.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/LinqTestCase.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/LinqTestCase.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,7 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; namespace NHibernate.Test.Linq @@ -11,34 +11,29 @@ private Northwind _northwind; private ISession _session; - protected override string MappingsAssembly - { - get { return "NHibernate.Test"; } - } - protected override IList Mappings { get { return new[] - { - "Linq.Mappings.Customer.hbm.xml", - "Linq.Mappings.Employee.hbm.xml", - "Linq.Mappings.Order.hbm.xml", - "Linq.Mappings.OrderLine.hbm.xml", - "Linq.Mappings.Product.hbm.xml", - "Linq.Mappings.ProductCategory.hbm.xml", - "Linq.Mappings.Region.hbm.xml", - "Linq.Mappings.Shipper.hbm.xml", - "Linq.Mappings.Supplier.hbm.xml", - "Linq.Mappings.Territory.hbm.xml", - "Linq.Mappings.AnotherEntity.hbm.xml", - "Linq.Mappings.Role.hbm.xml", - "Linq.Mappings.User.hbm.xml", - "Linq.Mappings.TimeSheet.hbm.xml", - "Linq.Mappings.Animal.hbm.xml", - "Linq.Mappings.Patient.hbm.xml" - }; + { + "Northwind.Mappings.Customer.hbm.xml", + "Northwind.Mappings.Employee.hbm.xml", + "Northwind.Mappings.Order.hbm.xml", + "Northwind.Mappings.OrderLine.hbm.xml", + "Northwind.Mappings.Product.hbm.xml", + "Northwind.Mappings.ProductCategory.hbm.xml", + "Northwind.Mappings.Region.hbm.xml", + "Northwind.Mappings.Shipper.hbm.xml", + "Northwind.Mappings.Supplier.hbm.xml", + "Northwind.Mappings.Territory.hbm.xml", + "Northwind.Mappings.AnotherEntity.hbm.xml", + "Northwind.Mappings.Role.hbm.xml", + "Northwind.Mappings.User.hbm.xml", + "Northwind.Mappings.TimeSheet.hbm.xml", + "Northwind.Mappings.Animal.hbm.xml", + "Northwind.Mappings.Patient.hbm.xml" + }; } } Modified: trunk/nhibernate/src/NHibernate.Test/Linq/MiscellaneousTextFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/MiscellaneousTextFixture.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/MiscellaneousTextFixture.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -2,7 +2,7 @@ using System.Linq; using System.Linq.Expressions; using NHibernate.Linq; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; namespace NHibernate.Test.Linq Modified: trunk/nhibernate/src/NHibernate.Test/Linq/NorthwindDbCreator.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/NorthwindDbCreator.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/NorthwindDbCreator.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -2,7 +2,7 @@ using System.Linq; using System.Collections; using System.Collections.Generic; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; namespace NHibernate.Test.Linq { Modified: trunk/nhibernate/src/NHibernate.Test/Linq/NullComparisonTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/NullComparisonTests.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/NullComparisonTests.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -3,7 +3,7 @@ using System.Linq; using System.Text; using NHibernate.Linq; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; namespace NHibernate.Test.Linq Modified: trunk/nhibernate/src/NHibernate.Test/Linq/ParameterisedQueries.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/ParameterisedQueries.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/ParameterisedQueries.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -4,7 +4,7 @@ using System.Linq; using System.Linq.Expressions; using NHibernate.Linq; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; namespace NHibernate.Test.Linq Modified: trunk/nhibernate/src/NHibernate.Test/Linq/PatientTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/PatientTests.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/PatientTests.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,5 +1,5 @@ using System.Linq; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; namespace NHibernate.Test.Linq Modified: trunk/nhibernate/src/NHibernate.Test/Linq/QueryReuseTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/QueryReuseTests.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/QueryReuseTests.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,6 +1,6 @@ using System.Collections.Generic; using System.Linq; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; namespace NHibernate.Test.Linq Modified: trunk/nhibernate/src/NHibernate.Test/Linq/RegresstionTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/RegresstionTests.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/RegresstionTests.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,6 +1,6 @@ using System.Linq; using NUnit.Framework; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; namespace NHibernate.Test.Linq { Modified: trunk/nhibernate/src/NHibernate.Test/Linq/SelectionTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/SelectionTests.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/SelectionTests.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -1,6 +1,6 @@ using System; using System.Linq; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; namespace NHibernate.Test.Linq Modified: trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/Linq/WhereTests.cs 2010-12-05 08:35:46 UTC (rev 5294) @@ -3,7 +3,7 @@ using System.Linq; using System.Linq.Expressions; using NHibernate.Linq; -using NHibernate.Test.Linq.Entities; +using NHibernate.DomainModel.Northwind.Entities; using NUnit.Framework; using SharpTestsEx; Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-12-05 01:54:39 UTC (rev 5293) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-12-05 08:35:46 UTC (rev 5294) @@ -417,27 +417,6 @@ <Compile Include="Linq\DateTimeTests.cs" /> <Compile Include="Linq\DynamicQueryTests.cs" /> <Compile Include="Linq\EagerLoadTests.cs" /> - <Compile Include="Linq\Entities\Address.cs" /> - <Compile Include="Linq\Entities\Animal.cs" /> - <Compile Include="Linq\Entities\AnotherEntity.cs" /> - <Compile Include="Linq\Entities\Customer.cs" /> - <Compile Include="Linq\Entities\Employee.cs" /> - <Compile Include="Linq\Entities\Entity.cs" /> - <Compile Include="Linq\Entities\Northwind.cs" /> - <Compile Include="Linq\Entities\Order.cs" /> - <Compile Include="Linq\Entities\OrderLine.cs" /> - <Compile Include="Linq\Entities\Patient.cs" /> - <Compile Include="Linq\Entities\Product.cs" /> - <Compile Include="Linq\Entities\ProductCategory.cs" /> - <Compile Include="Linq\Entities\Region.cs" /> - <Compile Include="Linq\Entities\Role.cs" /> - <Compile Include="Linq\Entities\Shipper.cs" /> - <Compile Include="Linq\Entities\Supplier.cs" /> - <Compile Include="Linq\Entities\Territory.cs" /> - <Compile Include="Linq\Entities\Timesheet.cs" /> - <Compile Include="Linq\Entities\User.cs" /> - <Compile Include="Linq\Entities\UserComponent.cs" /> - <Compile Include="Linq\Entities\UserDto.cs" /> <Compile Include="Linq\EnumTests.cs" /> <Compile Include="Linq\ExtensionMethods.cs" /> <Compile Include="Linq\FunctionTests.cs" /> @@ -2430,15 +2409,9 @@ <EmbeddedResource Include="NHSpecificTest\NH1978\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2044\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2030\Mappings.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\Patient.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2055\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2057\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2011\Mappings.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\Animal.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\AnotherEntity.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\Role.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\TimeSheet.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\User.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\ManyToOneFilters20Behaviour\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2000\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2003\Mappings.hbm.xml" /> @@ -2465,16 +2438,6 @@ <EmbeddedResource Include="NHSpecificTest\NH1939\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1911\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1920\Mappings.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\Customer.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\Employee.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\Order.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\OrderLine.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\Product.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\ProductCategory.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\Region.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\Shipper.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\Supplier.hbm.xml" /> - <EmbeddedResource Include="Linq\Mappings\Territory.hbm.xml" /> <EmbeddedResource Include="IdTest\AssignedClass.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1927\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH1928\Mappings.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2010-12-05 01:54:45
|
Revision: 5293 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5293&view=rev Author: patearl Date: 2010-12-05 01:54:39 +0000 (Sun, 05 Dec 2010) Log Message: ----------- Build menu batch file to help newcomers with common tasks. Added Paths: ----------- trunk/nhibernate/ShowBuildMenu.bat Added: trunk/nhibernate/ShowBuildMenu.bat =================================================================== --- trunk/nhibernate/ShowBuildMenu.bat (rev 0) +++ trunk/nhibernate/ShowBuildMenu.bat 2010-12-05 01:54:39 UTC (rev 5293) @@ -0,0 +1,89 @@ +@echo off +set NANT=%~dp0\Tools\nant\bin\NAnt.exe -t:net-3.5 + +echo --- SETUP --- +echo A. Set up for Visual Studio (creates AssemblyInfo.cs files). +echo. +echo --- TESTING --- +echo B. Learn how to set up database and connection string for testing. +echo C. How to increase the window scroll/size so you can see more test output. +echo D. Build and run all tests. +echo. +echo --- BUILD --- +echo E. Build NHibernate (Debug) +echo F. Build NHibernate (Release) +echo G. Build Release Package (Also runs tests and creates documentation) +echo. +choice /C abcdefg + +if errorlevel 255 goto end +if errorlevel 7 goto build-release-package +if errorlevel 6 goto build-release +if errorlevel 5 goto build-debug +if errorlevel 4 goto build-test +if errorlevel 3 goto help-larger-window +if errorlevel 2 goto help-test-setup +if errorlevel 1 goto build-visual-studio +if errorlevel 0 goto end + +:help-test-setup +echo. +echo 1. Install SQL Server 2008 (or use the database included with VS). +echo 2. Edit connection settings in build-common\nhibernate-properties.xml +echo. +echo 3. If you want to run NUnit tests in Visual Studio directly, +echo edit src\NHibernate.Test\App.config and change this property: +echo connection.connection_string +echo Note that you will need a third party tool to run tests in VS. +echo. +echo You will also need to create a database called "nhibernate" +echo if you just run the tests directly from VS. +echo. +goto end + +:help-larger-window +echo. +echo 1. Right click on the title bar of this window. +echo 2. Select "Properties". +echo 3. Select the "Layout" tab. +echo 4. Set the following options. +echo Screen Buffer Size +echo Width: 160 +echo Height: 9999 +echo Window Size +echo Width: 160 +echo Height: 50 +echo. +goto end + +:build-visual-studio +%NANT% visual-studio +goto end + +:build-debug +%NANT% clean build +echo. +echo Assuming the build succeeded, your results will be in the build folder. +echo. +goto end + +:build-release +%NANT% -D:project.config=release clean build +echo. +echo Assuming the build succeeded, your results will be in the build folder. +echo. +goto end + +:build-release-package +%NANT% -D:project.config=release clean package +echo. +echo Assuming the build succeeded, your results will be in the build folder. +echo. +goto end + +:build-test +%NANT% test +goto end + +:end +pause This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2010-12-05 01:15:06
|
Revision: 5292 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5292&view=rev Author: patearl Date: 2010-12-05 01:14:54 +0000 (Sun, 05 Dec 2010) Log Message: ----------- NAnt 0.90 (minus docs, examples, and duplicate libs) Added Paths: ----------- trunk/nhibernate/Tools/nant/ trunk/nhibernate/Tools/nant/COPYING.txt trunk/nhibernate/Tools/nant/README.txt trunk/nhibernate/Tools/nant/bin/ trunk/nhibernate/Tools/nant/bin/NAnt.CompressionTasks.dll trunk/nhibernate/Tools/nant/bin/NAnt.CompressionTasks.xml trunk/nhibernate/Tools/nant/bin/NAnt.Core.dll trunk/nhibernate/Tools/nant/bin/NAnt.Core.xml trunk/nhibernate/Tools/nant/bin/NAnt.DotNetTasks.dll trunk/nhibernate/Tools/nant/bin/NAnt.DotNetTasks.xml trunk/nhibernate/Tools/nant/bin/NAnt.MSNetTasks.dll trunk/nhibernate/Tools/nant/bin/NAnt.MSNetTasks.xml trunk/nhibernate/Tools/nant/bin/NAnt.NUnit.dll trunk/nhibernate/Tools/nant/bin/NAnt.NUnit.xml trunk/nhibernate/Tools/nant/bin/NAnt.NUnit1Tasks.dll trunk/nhibernate/Tools/nant/bin/NAnt.NUnit1Tasks.xml trunk/nhibernate/Tools/nant/bin/NAnt.NUnit2Tasks.dll trunk/nhibernate/Tools/nant/bin/NAnt.NUnit2Tasks.xml trunk/nhibernate/Tools/nant/bin/NAnt.SourceControlTasks.dll trunk/nhibernate/Tools/nant/bin/NAnt.SourceControlTasks.xml trunk/nhibernate/Tools/nant/bin/NAnt.VSNetTasks.dll trunk/nhibernate/Tools/nant/bin/NAnt.VSNetTasks.xml trunk/nhibernate/Tools/nant/bin/NAnt.VisualCppTasks.dll trunk/nhibernate/Tools/nant/bin/NAnt.VisualCppTasks.xml trunk/nhibernate/Tools/nant/bin/NAnt.Win32Tasks.dll trunk/nhibernate/Tools/nant/bin/NAnt.Win32Tasks.xml trunk/nhibernate/Tools/nant/bin/NAnt.exe trunk/nhibernate/Tools/nant/bin/NAnt.exe.config trunk/nhibernate/Tools/nant/bin/NAnt.xml trunk/nhibernate/Tools/nant/bin/NDoc.Documenter.NAnt.dll trunk/nhibernate/Tools/nant/bin/extensions/ trunk/nhibernate/Tools/nant/bin/extensions/common/ trunk/nhibernate/Tools/nant/bin/extensions/common/2.0/ trunk/nhibernate/Tools/nant/bin/extensions/common/2.0/NAnt.MSBuild.dll trunk/nhibernate/Tools/nant/bin/extensions/common/2.0/NAnt.MSBuild.xml trunk/nhibernate/Tools/nant/bin/lib/ trunk/nhibernate/Tools/nant/bin/lib/common/ trunk/nhibernate/Tools/nant/bin/lib/common/neutral/ trunk/nhibernate/Tools/nant/bin/lib/common/neutral/ICSharpCode.SharpCvsLib.Console.dll trunk/nhibernate/Tools/nant/bin/lib/common/neutral/ICSharpCode.SharpCvsLib.dll trunk/nhibernate/Tools/nant/bin/lib/common/neutral/ICSharpCode.SharpZipLib.dll trunk/nhibernate/Tools/nant/bin/lib/common/neutral/NDoc.Core.dll trunk/nhibernate/Tools/nant/bin/lib/common/neutral/NDoc.Documenter.Msdn.dll trunk/nhibernate/Tools/nant/bin/lib/common/neutral/NDoc.ExtendedUI.dll trunk/nhibernate/Tools/nant/bin/lib/common/neutral/NUnitCore.dll trunk/nhibernate/Tools/nant/bin/log4net.dll trunk/nhibernate/Tools/nant/bin/scvs.exe trunk/nhibernate/Tools/nant/schema/ trunk/nhibernate/Tools/nant/schema/nant.xsd Property changes on: trunk/nhibernate/Tools/nant ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Added: trunk/nhibernate/Tools/nant/COPYING.txt =================================================================== --- trunk/nhibernate/Tools/nant/COPYING.txt (rev 0) +++ trunk/nhibernate/Tools/nant/COPYING.txt 2010-12-05 01:14:54 UTC (rev 5292) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Added: trunk/nhibernate/Tools/nant/README.txt =================================================================== --- trunk/nhibernate/Tools/nant/README.txt (rev 0) +++ trunk/nhibernate/Tools/nant/README.txt 2010-12-05 01:14:54 UTC (rev 5292) @@ -0,0 +1,158 @@ +NAnt + +What is it? +----------- +NAnt is a .NET based build tool. In theory it is kind of like make without +make's wrinkles. In practice it's a lot like Ant. + +If you are not familiar with Jakarta Ant you can get more information at the +Ant project web site (http://ant.apache.org/). + + +Why NAnt? +--------- +Because Ant was too Java specific. +Because Ant needed the Java runtime. NAnt only needs the .NET +or Mono runtime. + + +The Latest Version +------------------ +Details of the latest version can be found on the NAnt project web site +http://nant.sourceforge.net/ + + +Files +----- + README.txt - This file. + Makefile - Makefile for compilation with GNU Make. + Makefile.nmake - Makefile for compilation with Microsoft NMake. + + +Compilation and Installation +---------------------------- + + a. Overview + ----------- + The compilation process uses NAnt to build NAnt. + + The approach is to first compile a copy of NAnt (using make/nmake) for + bootstrapping purpose. Next, the bootstrapped version of NAnt is used in + conjunction with NAnt build file (NAnt.build) to build the full version. + + + b. Prerequisites + ---------------- + To build NAnt, you will need the following components: + + Windows + ------- + + * A version of the Microsoft .NET Framework + + Available from http://msdn.microsoft.com/netframework/ + + You will need the .NET Framework SDK as well as the runtime + components if you intend to compile programs. + + Note: NAnt currently supports versions 1.0, 1.1 and 2.0 + of the Microsoft .NET Framework. + + or + + * Mono for Windows (version 1.0 or higher) + + Available from http://www.mono-project.com/downloads/ + + Linux/Unix + ---------- + + * GNU toolchain - including GNU make + + * pkg-config + + Available from: http://www.freedesktop.org/Software/pkgconfig + + * A working Mono installation and development libraries (version 1.0 or higher) + + Available from: http://www.mono-project.com/downloads/ + + + b. Building the Software + ------------------------ + + Build NAnt using Microsoft .NET: + + GNU Make + -------- + make install MONO= MCS=csc prefix=<installation path> [DESTDIR=<staging path>] + + eg. make install MONO= MCS=csc prefix="c:\Program Files" + + NMake + ----- + nmake -f Makefile.nmake install prefix=<installation path> [DESTDIR=<staging path>] + + eg. nmake -f Makefile.nmake install prefix="c:\Program Files" + + + Building NAnt using Mono: + + GNU Make + -------- + make install prefix=<installation path> [DESTDIR=<staging path>] + + eg. make install prefix="c:\Program Files" + + NMake + ----- + nmake -f Makefile.nmake install MONO=mono CSC=mcs prefix=<installation path> [DESTDIR=<staging path>] + + eg. nmake -f Makefile.nmake install MONO=mono CSC=mcs prefix=/usr/local/ + +Note: + +These instructions only apply to the source distribution of NAnt, as the binary distribution +contains pre-built assemblies. + + +Documentation +------------- +Documentation is available in HTML format, in the doc/ directory. + + +License +------- +Copyright (C) 2001-2008 Gerry Shaw + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +As a special exception, the copyright holders of this software give you +permission to link the assemblies with independent modules to produce new +assemblies, regardless of the license terms of these independent modules, +and to copy and distribute the resulting assemblies under terms of your +choice, provided that you also meet, for each linked independent module, +the terms and conditions of the license of that module. An independent +module is a module which is not derived from or based on these assemblies. +If you modify this software, you may extend this exception to your version +of the software, but you are not obligated to do so. If you do not wish to +do so, delete this exception statement from your version. + +A copy of the GNU General Public License is available in the COPYING.txt file +included with all NAnt distributions. + +For more licensing information refer to the GNU General Public License on the +GNU Project web site. +http://www.gnu.org/copyleft/gpl.html Property changes on: trunk/nhibernate/Tools/nant/bin ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Added: trunk/nhibernate/Tools/nant/bin/NAnt.CompressionTasks.dll =================================================================== (Binary files differ) Property changes on: trunk/nhibernate/Tools/nant/bin/NAnt.CompressionTasks.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/nhibernate/Tools/nant/bin/NAnt.CompressionTasks.xml =================================================================== --- trunk/nhibernate/Tools/nant/bin/NAnt.CompressionTasks.xml (rev 0) +++ trunk/nhibernate/Tools/nant/bin/NAnt.CompressionTasks.xml 2010-12-05 01:14:54 UTC (rev 5292) @@ -0,0 +1,711 @@ +<?xml version="1.0"?> +<doc> + <assembly> + <name>NAnt.CompressionTasks</name> + </assembly> + <members> + <member name="T:NAnt.Compression.Tasks.ExpandBaseTask"> + <summary> + Summary description for ExpandTask. + </summary> + </member> + <member name="M:NAnt.Compression.Tasks.ExpandBaseTask.ExtractFile(System.IO.Stream,System.String,System.String,System.DateTime,System.Int64)"> + <summary> + Extracts a file entry from the specified stream. + </summary> + <param name="inputStream">The <see cref="T:System.IO.Stream"/> containing the compressed entry.</param> + <param name="destDirectory">The directory where to store the expanded file.</param> + <param name="entryName">The name of the entry including directory information.</param> + <param name="entryDate">The date of the entry.</param> + <param name="entrySize">The uncompressed size of the entry.</param> + <exception cref="T:NAnt.Core.BuildException"> + <para>The destination directory for the entry could not be created.</para> + <para>-or-</para> + <para>The entry could not be extracted.</para> + </exception> + <remarks> + We cannot rely on the fact that the directory entry of a given file + is created before the file is extracted, so we should create the + directory if it doesn't yet exist. + </remarks> + </member> + <member name="M:NAnt.Compression.Tasks.ExpandBaseTask.ExtractDirectory(System.IO.Stream,System.String,System.String,System.DateTime)"> + <summary> + Extracts a directory entry from the specified stream. + </summary> + <param name="inputStream">The <see cref="T:System.IO.Stream"/> containing the directory entry.</param> + <param name="destDirectory">The directory where to create the subdirectory.</param> + <param name="entryName">The name of the directory entry.</param> + <param name="entryDate">The date of the entry.</param> + <exception cref="T:NAnt.Core.BuildException"> + <para>The destination directory for the entry could not be created.</para> + </exception> + </member> + <member name="P:NAnt.Compression.Tasks.ExpandBaseTask.Overwrite"> + <summary> + Overwrite files, even if they are newer than the corresponding + entries in the archive. The default is <see langword="true" />. + </summary> + </member> + <member name="T:NAnt.Compression.Tasks.GUnzip"> + <summary> + Expands a file packed using GZip compression. + </summary> + <example> + <para>Expands "test.tar.gz" to "test2.tar".</para> + <code> + <![CDATA[ + <gunzip src="test.tar.gz" dest="test.tar" /> + ]]> + </code> + </example> + </member> + <member name="M:NAnt.Compression.Tasks.GUnzip.ExecuteTask"> + <summary> + Extracts the file from the gzip archive. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.GUnzip.SrcFile"> + <summary> + The file to expand. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.GUnzip.DestFile"> + <summary> + The destination file. + </summary> + </member> + <member name="T:NAnt.Compression.Tasks.TarTask"> + <summary> + Creates a tar file from the specified filesets. + </summary> + <remarks> + <para>Uses <see href="http://www.icsharpcode.net/OpenSource/SharpZipLib/">#ziplib</see> (SharpZipLib), an open source Tar/Zip/GZip library written entirely in C#.</para> + </remarks> + <example> + <para> + Tar all files in <c>${build.dir}</c> and <c>${doc.dir}</c> into a file + called "backup.tar.gz", and apply gzip compression to it. + </para> + <code> + <![CDATA[ + <tar destfile="backup.tar.gz" compression="GZip"> + <fileset basedir="${bin.dir}" prefix="bin"> + <include name="**/*" /> + </fileset> + <fileset basedir="${doc.dir}" prefix="doc"> + <include name="**/*" /> + </fileset> + </tar> + ]]> + </code> + </example> + </member> + <member name="M:NAnt.Compression.Tasks.TarTask.ExecuteTask"> + <summary> + Creates the tar file. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.TarTask.DestFile"> + <summary> + The tar file to create. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.TarTask.IncludeEmptyDirs"> + <summary> + Include empty directories in the generated tar file. The default is + <see langword="false" />. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.TarTask.TarFileSets"> + <summary> + The set of files to be included in the archive. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.TarTask.CompressionMethod"> + <summary> + The compression method. The default is <see cref="F:NAnt.Compression.Types.TarCompressionMethod.None"/>. + </summary> + </member> + <member name="T:NAnt.Compression.Tasks.UnTarTask"> + <summary> + Extracts files from a tar archive. + </summary> + <remarks> + <para> + Uses <see href="http://www.icsharpcode.net/OpenSource/SharpZipLib/">#ziplib</see> + (SharpZipLib), an open source Zip/GZip library written entirely in C#. + </para> + </remarks> + <example> + <para>Extracts all files from a gzipped tar, preserving the directory structure.</para> + <code> + <![CDATA[ + <untar src="nant-bin.tar.gz" dest="bin" compression="gzip" /> + ]]> + </code> + </example> + </member> + <member name="M:NAnt.Compression.Tasks.UnTarTask.ExecuteTask"> + <summary> + Extracts the files from the archive. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.UnTarTask.SrcFile"> + <summary> + The archive file to expand. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.UnTarTask.DestinationDirectory"> + <summary> + The directory where to store the expanded file(s). The default is + the project base directory. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.UnTarTask.CompressionMethod"> + <summary> + The compression method. The default is <see cref="F:NAnt.Compression.Types.TarCompressionMethod.None"/>. + </summary> + </member> + <member name="T:NAnt.Compression.Tasks.UnZipTask"> + <summary> + Extracts files from a zip archive. + </summary> + <remarks> + <para> + Uses <see href="http://www.icsharpcode.net/OpenSource/SharpZipLib/">#ziplib</see> + (SharpZipLib), an open source Zip/GZip library written entirely in C#. + </para> + </remarks> + <example> + <para>Extracts all the file from the zip, preserving the directory structure.</para> + <code> + <![CDATA[ + <unzip zipfile="backup.zip"/> + ]]> + </code> + </example> + </member> + <member name="M:NAnt.Compression.Tasks.UnZipTask.ExecuteTask"> + <summary> + Extracts the files from the zip file. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.UnZipTask.ZipFile"> + <summary> + The archive file to expand. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.UnZipTask.ToDirectory"> + <summary> + The directory where the expanded files should be stored. The + default is the project base directory. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.UnZipTask.Encoding"> + <summary> + The character encoding that has been used for filenames inside the + zip file. The default is the system's OEM code page. + </summary> + </member> + <member name="T:NAnt.Compression.Tasks.ZipTask"> + <summary> + Creates a zip file from the specified filesets. + </summary> + <remarks> + <para> + Uses <see href="http://www.icsharpcode.net/OpenSource/SharpZipLib/">#ziplib</see> + (SharpZipLib), an open source Tar/Zip/GZip library written entirely in C#. + </para> + </remarks> + <example> + <para> + Zip all files in <c>${build.dir}</c> and <c>${doc.dir}</c> into a file + called "backup.zip". + </para> + <code> + <![CDATA[ + <zip zipfile="backup.zip"> + <fileset basedir="${bin.dir}" prefix="bin"> + <include name="**/*" /> + </fileset> + <fileset basedir="${doc.dir}" prefix="doc"> + <include name="**/*" /> + </fileset> + </zip> + ]]> + </code> + </example> + </member> + <member name="M:NAnt.Compression.Tasks.ZipTask.ExecuteTask"> + <summary> + Creates the zip file. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.ZipTask.ZipFile"> + <summary> + The zip file to create. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.ZipTask.Comment"> + <summary> + The comment for the file. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.ZipTask.Stamp"> + <summary> + Date/time stamp for the files in the format MM/DD/YYYY HH:MM:SS. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.ZipTask.ZipLevel"> + <summary> + Desired level of compression. Possible values are 0 (STORE only) + to 9 (highest). The default is <c>6</c>. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.ZipTask.IncludeEmptyDirs"> + <summary> + Include empty directories in the generated zip file. The default is + <see langword="false" />. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.ZipTask.ZipFileSets"> + <summary> + The set of files to be included in the archive. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.ZipTask.DuplicateHandling"> + <summary> + Specifies the behaviour when a duplicate file is found. The default + is <see cref="F:NAnt.Compression.Types.DuplicateHandling.Add"/>. + </summary> + </member> + <member name="P:NAnt.Compression.Tasks.ZipTask.Encoding"> + <summary> + The character encoding to use for filenames and comment inside the + zip file. The default is the system's OEM code page. + </summary> + </member> + <member name="T:NAnt.Compression.Types.DuplicateHandling"> + <summary> + Specifies how entries with the same name should be processed. + </summary> + </member> + <member name="F:NAnt.Compression.Types.DuplicateHandling.Add"> + <summary> + Overwrite existing entry with same name. + </summary> + </member> + <member name="F:NAnt.Compression.Types.DuplicateHandling.Preserve"> + <summary> + Preserve existing entry with the same name. + </summary> + </member> + <member name="F:NAnt.Compression.Types.DuplicateHandling.Fail"> + <summary> + Report failure when two entries have the same name. + </summary> + </member> + <member name="T:NAnt.Compression.Types.DuplicateHandlingConverter"> + <summary> + Specialized <see cref="T:System.ComponentModel.EnumConverter"/> for <see cref="T:NAnt.Compression.Types.TarCompressionMethod"/> + that ignores case when converting from string. + </summary> + </member> + <member name="M:NAnt.Compression.Types.DuplicateHandlingConverter.#ctor"> + <summary> + Initializes a new instance of the <see cref="T:NAnt.Compression.Types.DuplicateHandlingConverter"/> + class. + </summary> + </member> + <member name="M:NAnt.Compression.Types.DuplicateHandlingConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object)"> + <summary> + Converts the given object to the type of this converter, using the + specified context and culture information. + </summary> + <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"/> that provides a format context.</param> + <param name="culture">A <see cref="T:System.Globalization.CultureInfo"/> object. If a <see langword="null"/> is passed, the current culture is assumed.</param> + <param name="value">The <see cref="T:System.Object"/> to convert.</param> + <returns> + An <see cref="T:System.Object"/> that represents the converted value. + </returns> + </member> + <member name="T:NAnt.Compression.Types.TarCompressionMethod"> + <summary> + Specifies the compression methods supported by <see cref="T:NAnt.Compression.Tasks.TarTask"/> + and <see cref="T:NAnt.Compression.Tasks.UnTarTask"/>. + </summary> + </member> + <member name="F:NAnt.Compression.Types.TarCompressionMethod.None"> + <summary> + No compression. + </summary> + </member> + <member name="F:NAnt.Compression.Types.TarCompressionMethod.GZip"> + <summary> + GZIP compression. + </summary> + </member> + <member name="F:NAnt.Compression.Types.TarCompressionMethod.BZip2"> + <summary> + BZIP2 compression. + </summary> + </member> + <member name="T:NAnt.Compression.Types.TarCompressionMethodConverter"> + <summary> + Specialized <see cref="T:System.ComponentModel.EnumConverter"/> for <see cref="T:NAnt.Compression.Types.TarCompressionMethod"/> + that ignores case when converting from string. + </summary> + </member> + <member name="M:NAnt.Compression.Types.TarCompressionMethodConverter.#ctor"> + <summary> + Initializes a new instance of the <see cref="T:NAnt.Compression.Types.TarCompressionMethodConverter"/> + class. + </summary> + </member> + <member name="M:NAnt.Compression.Types.TarCompressionMethodConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object)"> + <summary> + Converts the given object to the type of this converter, using the + specified context and culture information. + </summary> + <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"/> that provides a format context.</param> + <param name="culture">A <see cref="T:System.Globalization.CultureInfo"/> object. If a <see langword="null"/> is passed, the current culture is assumed.</param> + <param name="value">The <see cref="T:System.Object"/> to convert.</param> + <returns> + An <see cref="T:System.Object"/> that represents the converted value. + </returns> + </member> + <member name="T:NAnt.Compression.Types.TarFileSet"> + <summary> + A <see cref="T:NAnt.Compression.Types.TarFileSet"/> is a <see cref="T:NAnt.Core.Types.FileSet"/> with extra + attributes useful in the context of the <see cref="T:NAnt.Compression.Tasks.TarTask"/>. + </summary> + </member> + <member name="P:NAnt.Compression.Types.TarFileSet.FileMode"> + <summary> + A 3 digit octal string, specify the user, group and other modes + in the standard Unix fashion. Only applies to plain files. The + default is <c>644</c>. + </summary> + </member> + <member name="P:NAnt.Compression.Types.TarFileSet.DirMode"> + <summary> + A 3 digit octal string, specify the user, group and other modes + in the standard Unix fashion. Only applies to directories. The + default is <c>755</c>. + </summary> + </member> + <member name="P:NAnt.Compression.Types.TarFileSet.UserName"> + <summary> + The username for the tar entry. + </summary> + </member> + <member name="P:NAnt.Compression.Types.TarFileSet.Uid"> + <summary> + The user identifier (UID) for the tar entry. + </summary> + </member> + <member name="P:NAnt.Compression.Types.TarFileSet.GroupName"> + <summary> + The groupname for the tar entry. + </summary> + </member> + <member name="P:NAnt.Compression.Types.TarFileSet.Gid"> + <summary> + The group identifier (GID) for the tar entry. + </summary> + </member> + <member name="P:NAnt.Compression.Types.TarFileSet.Prefix"> + <summary> + The top level directory prefix. If set, all file and directory paths + in the fileset will have this value prepended. Can either be a single + directory name or a "/" separated path. + </summary> + </member> + <member name="T:NAnt.Compression.Types.TarFileSetCollection"> + <summary> + Contains a collection of <see cref="T:NAnt.Compression.Types.TarFileSet"/> elements. + </summary> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetCollection.#ctor"> + <summary> + Initializes a new instance of the <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/> class. + </summary> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetCollection.#ctor(NAnt.Compression.Types.TarFileSetCollection)"> + <summary> + Initializes a new instance of the <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/> class + with the specified <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/> instance. + </summary> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetCollection.#ctor(NAnt.Compression.Types.TarFileSet[])"> + <summary> + Initializes a new instance of the <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/> class + with the specified array of <see cref="T:NAnt.Compression.Types.TarFileSet"/> instances. + </summary> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetCollection.Add(NAnt.Compression.Types.TarFileSet)"> + <summary> + Adds a <see cref="T:NAnt.Compression.Types.TarFileSet"/> to the end of the collection. + </summary> + <param name="item">The <see cref="T:NAnt.Compression.Types.TarFileSet"/> to be added to the end of the collection.</param> + <returns>The position into which the new element was inserted.</returns> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetCollection.AddRange(NAnt.Compression.Types.TarFileSet[])"> + <summary> + Adds the elements of a <see cref="T:NAnt.Compression.Types.TarFileSet"/> array to the end of the collection. + </summary> + <param name="items">The array of <see cref="T:NAnt.Compression.Types.TarFileSet"/> elements to be added to the end of the collection.</param> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetCollection.AddRange(NAnt.Compression.Types.TarFileSetCollection)"> + <summary> + Adds the elements of a <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/> to the end of the collection. + </summary> + <param name="items">The <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/> to be added to the end of the collection.</param> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetCollection.Contains(NAnt.Compression.Types.TarFileSet)"> + <summary> + Determines whether a <see cref="T:NAnt.Compression.Types.TarFileSet"/> is in the collection. + </summary> + <param name="item">The <see cref="T:NAnt.Compression.Types.TarFileSet"/> to locate in the collection.</param> + <returns> + <see langword="true"/> if <paramref name="item"/> is found in the + collection; otherwise, <see langword="false"/>. + </returns> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetCollection.CopyTo(NAnt.Compression.Types.TarFileSet[],System.Int32)"> + <summary> + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. + </summary> + <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param> + <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetCollection.IndexOf(NAnt.Compression.Types.TarFileSet)"> + <summary> + Retrieves the index of a specified <see cref="T:NAnt.Compression.Types.TarFileSet"/> object in the collection. + </summary> + <param name="item">The <see cref="T:NAnt.Compression.Types.TarFileSet"/> object for which the index is returned.</param> + <returns> + The index of the specified <see cref="T:NAnt.Compression.Types.TarFileSet"/>. If the <see cref="T:NAnt.Compression.Types.TarFileSet"/> is not currently a member of the collection, it returns -1. + </returns> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetCollection.Insert(System.Int32,NAnt.Compression.Types.TarFileSet)"> + <summary> + Inserts a <see cref="T:NAnt.Compression.Types.TarFileSet"/> into the collection at the specified index. + </summary> + <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param> + <param name="item">The <see cref="T:NAnt.Compression.Types.TarFileSet"/> to insert.</param> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetCollection.GetEnumerator"> + <summary> + Returns an enumerator that can iterate through the collection. + </summary> + <returns> + A <see cref="T:NAnt.Compression.Types.TarFileSetEnumerator"/> for the entire collection. + </returns> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetCollection.Remove(NAnt.Compression.Types.TarFileSet)"> + <summary> + Removes a member from the collection. + </summary> + <param name="item">The <see cref="T:NAnt.Compression.Types.TarFileSet"/> to remove from the collection.</param> + </member> + <member name="P:NAnt.Compression.Types.TarFileSetCollection.Item(System.Int32)"> + <summary> + Gets or sets the element at the specified index. + </summary> + <param name="index">The zero-based index of the element to get or set.</param> + </member> + <member name="P:NAnt.Compression.Types.TarFileSetCollection.FileCount"> + <summary> + Get the total number of files that are represented by the + filesets in this collection. + </summary> + </member> + <member name="T:NAnt.Compression.Types.TarFileSetEnumerator"> + <summary> + Enumerates the <see cref="T:NAnt.Compression.Types.TarFileSet"/> elements of a <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/>. + </summary> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetEnumerator.#ctor(NAnt.Compression.Types.TarFileSetCollection)"> + <summary> + Initializes a new instance of the <see cref="T:NAnt.Compression.Types.TarFileSetEnumerator"/> class + with the specified <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/>. + </summary> + <param name="TarFileSets">The collection that should be enumerated.</param> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetEnumerator.MoveNext"> + <summary> + Advances the enumerator to the next element of the collection. + </summary> + <returns> + <see langword="true" /> if the enumerator was successfully advanced + to the next element; <see langword="false" /> if the enumerator has + passed the end of the collection. + </returns> + </member> + <member name="M:NAnt.Compression.Types.TarFileSetEnumerator.Reset"> + <summary> + Sets the enumerator to its initial position, which is before the + first element in the collection. + </summary> + </member> + <member name="P:NAnt.Compression.Types.TarFileSetEnumerator.Current"> + <summary> + Gets the current element in the collection. + </summary> + <returns> + The current element in the collection. + </returns> + </member> + <member name="T:NAnt.Compression.Types.ZipFileSet"> + <summary> + A <see cref="T:NAnt.Compression.Types.ZipFileSet"/> is a <see cref="T:NAnt.Core.Types.FileSet"/> with extra + attributes useful in the context of the <see cref="T:NAnt.Compression.Tasks.ZipTask"/>. + </summary> + </member> + <member name="P:NAnt.Compression.Types.ZipFileSet.Prefix"> + <summary> + The top level directory prefix. If set, all file and directory paths + in the fileset will have this value prepended. Can either be a single + directory name or a "/" separated path. + </summary> + </member> + <member name="T:NAnt.Compression.Types.ZipFileSetCollection"> + <summary> + Contains a collection of <see cref="T:NAnt.Compression.Types.ZipFileSet"/> elements. + </summary> + </member> + <member name="M:NAnt.Compression.Types.ZipFileSetCollection.#ctor"> + <summary> + Initializes a new instance of the <see cref="T:NAnt.Compression.Types.ZipFileSetCollection"/> class. + </summary> + </member> + <member name="M:NAnt.Compression.Types.ZipFileSetCollection.#ctor(NAnt.Compression.Types.ZipFileSetCollection)"> + <summary> + Initializes a new instance of the <see cref="T:NAnt.Compression.Types.ZipFileSetCollection"/> class + with the specified <see cref="T:NAnt.Compression.Types.ZipFileSetCollection"/> instance. + </summary> + </member> + <member name="M:NAnt.Compression.Types.ZipFileSetCollection.#ctor(NAnt.Compression.Types.ZipFileSet[])"> + <summary> + Initializes a new instance of the <see cref="T:NAnt.Compression.Types.ZipFileSetCollection"/> class + with the specified array of <see cref="T:NAnt.Compression.Types.ZipFileSet"/> instances. + </summary> + </member> + <member name="M:NAnt.Compression.Types.ZipFileSetCollection.Add(NAnt.Compression.Types.ZipFileSet)"> + <summary> + Adds a <see cref="T:NAnt.Compression.Types.ZipFileSet"/> to the end of the collection. + </summary> + <param name="item">The <see cref="T:NAnt.Compression.Types.ZipFileSet"/> to be added to the end of the collection.</param> + <returns>The position into which the new element was inserted.</returns> + </member> + <member name="M:NAnt.Compression.Types.ZipFileSetCollection.AddRange(NAnt.Compression.Types.ZipFileSet[])"> + <summary> + Adds the elements of a <see cref="T:NAnt.Compression.Types.ZipFileSet"/> array to the end of the collection. + </summary> + <param name="items">The array of <see cref="T:NAnt.Compression.Types.ZipFileSet"/> elements to be added to the end of the collection.</param> + </member> + <member name="M:NAnt.Compression.Types.ZipFileSetCollection.AddRange(NAnt.Compression.Types.ZipFileSetCollection)"> + <summary> + Adds the elements of a <see cref="T:NAnt.Compression.Types.ZipFileSetCollection"/> to the end of the collection. + </summary> + <param name="items">The <see cref="T:NAnt.Compression.Types.ZipFileSetCollection"/> to be added to the end of the collection.</param> + </member> + <member name="M:NAnt.Compression.Types.ZipFileSetCollection.Contains(NAnt.Compression.Types.ZipFileSet)"> + <summary> + Determines whether a <see cref="T:NAnt.Compression.Types.ZipFileSet"/> is in the collection. + </summary> + <param name="item">The <see cref="T:NAnt.Compression.Types.ZipFileSet"/> to locate in the collection.</param> + <returns> + <see langword="true"/> if <paramref name="item"/> is found in the + collection; otherwise, <see langword="false"/>. + </returns> + </member> + <member name="M:NAnt.Compression.Types.ZipFileSetCollection.CopyTo(NAnt.Compression.Types.ZipFileSet[],System.Int32)"> + <summary> + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. + </summary> + <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param> + <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param> + </member> + <member name="M:NAnt.Compression.Types.ZipFileSetCollection.IndexOf(NAnt.Compression.Types.ZipFileSet)"> + <summary> + Retrieves the index of a specified <see cref="T:NAnt.Compression.Types.ZipFileSet"/> object in the collection. + </summary> + <param name="item">The <see cref="T:NAnt.Compression.Types.ZipFileSet"/> object for which the index is returned.</param> + <returns> + The index of the specified <see c... [truncated message content] |
From: <fab...@us...> - 2010-12-04 18:46:36
|
Revision: 5291 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5291&view=rev Author: fabiomaulo Date: 2010-12-04 18:46:30 +0000 (Sat, 04 Dec 2010) Log Message: ----------- tag release Added Paths: ----------- tags/3.0.0GA/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-12-04 18:44:15
|
Revision: 5290 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5290&view=rev Author: fabiomaulo Date: 2010-12-04 18:44:09 +0000 (Sat, 04 Dec 2010) Log Message: ----------- Release note updated Modified Paths: -------------- trunk/nhibernate/releasenotes.txt Modified: trunk/nhibernate/releasenotes.txt =================================================================== --- trunk/nhibernate/releasenotes.txt 2010-12-04 13:59:17 UTC (rev 5289) +++ trunk/nhibernate/releasenotes.txt 2010-12-04 18:44:09 UTC (rev 5290) @@ -13,6 +13,32 @@ * [NH-2284] - Obsolete members removed * Related to [NH-2358]: DateTimeOffset type now works as a DateTimeOffset instead a "surrogate" of DateTime +Build 3.0.0.GA (rev5290) +============================= + +** Bug + * [NH-2222] - Wrong type for constant/parameter value used + * [NH-2234] - Query on Property mapped with IUserType + * [NH-2244] - Linq provider does not has full supporting of components in queries. + * [NH-2370] - NHibernate.Linq simple where clause results in a table scan. + * [NH-2394] - Comparing an enum (stored as a string with a user type) to an enum literal fails + * [NH-2398] - Null equality uses non-boolean expression + * [NH-2402] - LINQ equality should map to SQL equality + * [NH-2403] - Linq boolean constants are of wrong type (integer) + * [NH-2409] - Using WithClause in Criteria API causes NH to mix up query parameters + * [NH-2416] - NHibernate.Linq does not support queries against <map> elements + * [NH-2417] - NHibernate fails to correctly load a child collection if the parent contains a many-to-one + * [NH-2420] - Cannot use distributed transactions while providing connection to the session + * [NH-2438] - LINQ 'in' query not fully interpreted + +** Improvement + * [NH-2423] - NHibernate.Linq queries against Dictionaries with ContainsKey + + +** Patch + * [NH-2413] - Micro optimization in DefaultFlushEntityEventListener + * [NH-2437] - Typo + Build 3.0.0.CR1 (rev5265) ============================= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fab...@us...> - 2010-12-04 13:59:23
|
Revision: 5289 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5289&view=rev Author: fabiomaulo Date: 2010-12-04 13:59:17 +0000 (Sat, 04 Dec 2010) Log Message: ----------- Preparing release Modified Paths: -------------- trunk/nhibernate/build-common/common.xml Modified: trunk/nhibernate/build-common/common.xml =================================================================== --- trunk/nhibernate/build-common/common.xml 2010-12-04 02:27:02 UTC (rev 5288) +++ trunk/nhibernate/build-common/common.xml 2010-12-04 13:59:17 UTC (rev 5289) @@ -84,7 +84,7 @@ effectively SP0). --> - <property name="project.version" value="3.0.0.CR1" overwrite="false" /> + <property name="project.version" value="3.0.0.GA" 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: <jul...@us...> - 2010-12-04 02:27:10
|
Revision: 5288 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5288&view=rev Author: julian-maughan Date: 2010-12-04 02:27:02 +0000 (Sat, 04 Dec 2010) Log Message: ----------- Added some Linq support for Dictionary collections (ref. NH-2416, NH-2423). Based on a patch from Diego Mijelshon. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs trunk/nhibernate/src/NHibernate/Linq/Functions/DefaultLinqToHqlGeneratorsRegistry.cs trunk/nhibernate/src/NHibernate/NHibernate.csproj trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/BasicClass.cs trunk/nhibernate/src/NHibernate.DomainModel/NHSpecific/BasicClass.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicClassFixture.cs Added Paths: ----------- trunk/nhibernate/src/NHibernate/Linq/Functions/DictionaryGenerator.cs Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs 2010-12-03 09:20:26 UTC (rev 5287) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeBuilder.cs 2010-12-04 02:27:02 UTC (rev 5288) @@ -5,430 +5,440 @@ namespace NHibernate.Hql.Ast { - public class HqlTreeBuilder - { - private readonly IASTFactory _factory; + public class HqlTreeBuilder + { + private readonly IASTFactory _factory; - public HqlTreeBuilder() - { - _factory = new ASTFactory(new ASTTreeAdaptor()); - } + public HqlTreeBuilder() + { + _factory = new ASTFactory(new ASTTreeAdaptor()); + } - public HqlQuery Query() - { - return new HqlQuery(_factory); - } + public HqlQuery Query() + { + return new HqlQuery(_factory); + } - public HqlQuery Query(HqlSelectFrom selectFrom) - { - return new HqlQuery(_factory, selectFrom); - } + public HqlQuery Query(HqlSelectFrom selectFrom) + { + return new HqlQuery(_factory, selectFrom); + } - public HqlQuery Query(HqlSelectFrom selectFrom, HqlWhere where) - { - return new HqlQuery(_factory, selectFrom, where); - } + public HqlQuery Query(HqlSelectFrom selectFrom, HqlWhere where) + { + return new HqlQuery(_factory, selectFrom, where); + } - public HqlTreeNode Query(HqlSelectFrom selectFrom, HqlWhere where, HqlOrderBy orderBy) - { - return new HqlQuery(_factory, selectFrom, where, orderBy); - } + public HqlTreeNode Query(HqlSelectFrom selectFrom, HqlWhere where, HqlOrderBy orderBy) + { + return new HqlQuery(_factory, selectFrom, where, orderBy); + } - public HqlSelectFrom SelectFrom() - { - return new HqlSelectFrom(_factory); - } + public HqlSelectFrom SelectFrom() + { + return new HqlSelectFrom(_factory); + } - public HqlSelectFrom SelectFrom(HqlSelect select) - { - return new HqlSelectFrom(_factory, select); - } + public HqlSelectFrom SelectFrom(HqlSelect select) + { + return new HqlSelectFrom(_factory, select); + } - public HqlSelectFrom SelectFrom(HqlFrom @from, HqlSelect select) - { - return new HqlSelectFrom(_factory, @from, select); - } + public HqlSelectFrom SelectFrom(HqlFrom @from, HqlSelect select) + { + return new HqlSelectFrom(_factory, @from, select); + } - public HqlSelectFrom SelectFrom(HqlFrom @from) - { - return new HqlSelectFrom(_factory, @from); - } + public HqlSelectFrom SelectFrom(HqlFrom @from) + { + return new HqlSelectFrom(_factory, @from); + } - public HqlFrom From(HqlRange range) - { - return new HqlFrom(_factory, range); - } + public HqlFrom From(HqlRange range) + { + return new HqlFrom(_factory, range); + } - public HqlFrom From() - { - return new HqlFrom(_factory); - } + public HqlFrom From() + { + return new HqlFrom(_factory); + } - public HqlRange Range(HqlIdent ident) - { - return new HqlRange(_factory, ident); - } + public HqlRange Range(HqlIdent ident) + { + return new HqlRange(_factory, ident); + } - public HqlRange Range(HqlTreeNode ident, HqlAlias alias) - { - return new HqlRange(_factory, ident, alias); - } + public HqlRange Range(HqlTreeNode ident, HqlAlias alias) + { + return new HqlRange(_factory, ident, alias); + } - public HqlIdent Ident(string ident) - { - return new HqlIdent(_factory, ident); - } + public HqlIdent Ident(string ident) + { + return new HqlIdent(_factory, ident); + } - public HqlIdent Ident(System.Type type) - { - return new HqlIdent(_factory, type); - } + public HqlIdent Ident(System.Type type) + { + return new HqlIdent(_factory, type); + } - public HqlAlias Alias(string alias) - { - return new HqlAlias(_factory, alias); - } + public HqlAlias Alias(string alias) + { + return new HqlAlias(_factory, alias); + } - public HqlEquality Equality(HqlExpression lhs, HqlExpression rhs) - { - return new HqlEquality(_factory, lhs, rhs); - } + public HqlEquality Equality(HqlExpression lhs, HqlExpression rhs) + { + return new HqlEquality(_factory, lhs, rhs); + } - public HqlBooleanAnd BooleanAnd(HqlBooleanExpression lhs, HqlBooleanExpression rhs) - { - return new HqlBooleanAnd(_factory, lhs, rhs); - } + public HqlBooleanAnd BooleanAnd(HqlBooleanExpression lhs, HqlBooleanExpression rhs) + { + return new HqlBooleanAnd(_factory, lhs, rhs); + } - public HqlBooleanOr BooleanOr(HqlBooleanExpression lhs, HqlBooleanExpression rhs) - { - return new HqlBooleanOr(_factory, lhs, rhs); - } + public HqlBooleanOr BooleanOr(HqlBooleanExpression lhs, HqlBooleanExpression rhs) + { + return new HqlBooleanOr(_factory, lhs, rhs); + } - public HqlAdd Add(HqlExpression lhs, HqlExpression rhs) - { - return new HqlAdd(_factory, lhs, rhs); - } + public HqlAdd Add(HqlExpression lhs, HqlExpression rhs) + { + return new HqlAdd(_factory, lhs, rhs); + } - public HqlSubtract Subtract(HqlExpression lhs, HqlExpression rhs) - { - return new HqlSubtract(_factory, lhs, rhs); - } + public HqlSubtract Subtract(HqlExpression lhs, HqlExpression rhs) + { + return new HqlSubtract(_factory, lhs, rhs); + } - public HqlMultiplty Multiply(HqlExpression lhs, HqlExpression rhs) - { - return new HqlMultiplty(_factory, lhs, rhs); - } + public HqlMultiplty Multiply(HqlExpression lhs, HqlExpression rhs) + { + return new HqlMultiplty(_factory, lhs, rhs); + } - public HqlDivide Divide(HqlExpression lhs, HqlExpression rhs) - { - return new HqlDivide(_factory, lhs, rhs); - } + public HqlDivide Divide(HqlExpression lhs, HqlExpression rhs) + { + return new HqlDivide(_factory, lhs, rhs); + } - public HqlDot Dot(HqlExpression lhs, HqlExpression rhs) - { - return new HqlDot(_factory, lhs, rhs); - } + public HqlDot Dot(HqlExpression lhs, HqlExpression rhs) + { + return new HqlDot(_factory, lhs, rhs); + } - public HqlParameter Parameter(string name) - { - return new HqlParameter(_factory, name); - } + public HqlParameter Parameter(string name) + { + return new HqlParameter(_factory, name); + } - public HqlWhere Where(HqlExpression expression) - { - return new HqlWhere(_factory, expression); - } + public HqlWhere Where(HqlExpression expression) + { + return new HqlWhere(_factory, expression); + } - // TODO - constant will be removed when we have parameter handling done properly. Particularly bad datetime handling here, so it'll be good to delete it :) - public HqlConstant Constant(object value) - { - if (value == null) - { - return new HqlNull(_factory); - } + // TODO - constant will be removed when we have parameter handling done properly. Particularly bad datetime handling here, so it'll be good to delete it :) + public HqlConstant Constant(object value) + { + if (value == null) + { + return new HqlNull(_factory); + } - switch (System.Type.GetTypeCode(value.GetType())) - { - case TypeCode.Int16: - case TypeCode.Int32: - case TypeCode.Int64: - return new HqlIntegerConstant(_factory, value.ToString()); - case TypeCode.Single: - return new HqlFloatConstant(_factory, value.ToString()); - case TypeCode.Double: - return new HqlDoubleConstant(_factory, value.ToString()); - case TypeCode.Decimal: - return new HqlDecimalConstant(_factory, value.ToString()); - case TypeCode.String: - case TypeCode.Char: - return new HqlStringConstant(_factory, "\'" + value + "\'"); - case TypeCode.DateTime: - return new HqlStringConstant(_factory, "\'" + (DateTime)value + "\'"); - case TypeCode.Boolean: - return new HqlStringConstant(_factory, "\'" + ((bool)value ? "true" : "false") + "\'"); - default: - throw new NotSupportedException(string.Format("The constant for '{0}' is not supported", value)); - } - } + switch (System.Type.GetTypeCode(value.GetType())) + { + case TypeCode.Int16: + case TypeCode.Int32: + case TypeCode.Int64: + return new HqlIntegerConstant(_factory, value.ToString()); + case TypeCode.Single: + return new HqlFloatConstant(_factory, value.ToString()); + case TypeCode.Double: + return new HqlDoubleConstant(_factory, value.ToString()); + case TypeCode.Decimal: + return new HqlDecimalConstant(_factory, value.ToString()); + case TypeCode.String: + case TypeCode.Char: + return new HqlStringConstant(_factory, "\'" + value + "\'"); + case TypeCode.DateTime: + return new HqlStringConstant(_factory, "\'" + (DateTime)value + "\'"); + case TypeCode.Boolean: + return new HqlStringConstant(_factory, "\'" + ((bool)value ? "true" : "false") + "\'"); + default: + throw new NotSupportedException(string.Format("The constant for '{0}' is not supported", value)); + } + } - public HqlOrderBy OrderBy() - { - return new HqlOrderBy(_factory); - } + public HqlOrderBy OrderBy() + { + return new HqlOrderBy(_factory); + } - public HqlSelect Select(HqlExpression expression) - { - return new HqlSelect(_factory, expression); - } + public HqlSelect Select(HqlExpression expression) + { + return new HqlSelect(_factory, expression); + } - public HqlSelect Select(params HqlExpression[] expression) - { - return new HqlSelect(_factory, expression); - } + public HqlSelect Select(params HqlExpression[] expression) + { + return new HqlSelect(_factory, expression); + } - public HqlSelect Select(IEnumerable<HqlExpression> expressions) - { - return new HqlSelect(_factory, expressions.ToArray()); - } + public HqlSelect Select(IEnumerable<HqlExpression> expressions) + { + return new HqlSelect(_factory, expressions.ToArray()); + } - public HqlCase Case(HqlWhen[] whenClauses) - { - return new HqlCase(_factory, whenClauses, null); - } + public HqlCase Case(HqlWhen[] whenClauses) + { + return new HqlCase(_factory, whenClauses, null); + } - public HqlCase Case(HqlWhen[] whenClauses, HqlExpression ifFalse) - { - return new HqlCase(_factory, whenClauses, ifFalse); - } + public HqlCase Case(HqlWhen[] whenClauses, HqlExpression ifFalse) + { + return new HqlCase(_factory, whenClauses, ifFalse); + } - public HqlWhen When(HqlExpression predicate, HqlExpression ifTrue) - { - return new HqlWhen(_factory, predicate, ifTrue); - } + public HqlWhen When(HqlExpression predicate, HqlExpression ifTrue) + { + return new HqlWhen(_factory, predicate, ifTrue); + } - public HqlElse Else(HqlExpression ifFalse) - { - return new HqlElse(_factory, ifFalse); - } + public HqlElse Else(HqlExpression ifFalse) + { + return new HqlElse(_factory, ifFalse); + } - public HqlInequality Inequality(HqlExpression lhs, HqlExpression rhs) - { - return new HqlInequality(_factory, lhs, rhs); - } + public HqlInequality Inequality(HqlExpression lhs, HqlExpression rhs) + { + return new HqlInequality(_factory, lhs, rhs); + } - public HqlLessThan LessThan(HqlExpression lhs, HqlExpression rhs) - { - return new HqlLessThan(_factory, lhs, rhs); - } + public HqlLessThan LessThan(HqlExpression lhs, HqlExpression rhs) + { + return new HqlLessThan(_factory, lhs, rhs); + } - public HqlLessThanOrEqual LessThanOrEqual(HqlExpression lhs, HqlExpression rhs) - { - return new HqlLessThanOrEqual(_factory, lhs, rhs); - } + public HqlLessThanOrEqual LessThanOrEqual(HqlExpression lhs, HqlExpression rhs) + { + return new HqlLessThanOrEqual(_factory, lhs, rhs); + } - public HqlGreaterThan GreaterThan(HqlExpression lhs, HqlExpression rhs) - { - return new HqlGreaterThan(_factory, lhs, rhs); - } + public HqlGreaterThan GreaterThan(HqlExpression lhs, HqlExpression rhs) + { + return new HqlGreaterThan(_factory, lhs, rhs); + } - public HqlGreaterThanOrEqual GreaterThanOrEqual(HqlExpression lhs, HqlExpression rhs) - { - return new HqlGreaterThanOrEqual(_factory, lhs, rhs); - } + public HqlGreaterThanOrEqual GreaterThanOrEqual(HqlExpression lhs, HqlExpression rhs) + { + return new HqlGreaterThanOrEqual(_factory, lhs, rhs); + } - public HqlCount Count() - { - return new HqlCount(_factory); - } + public HqlCount Count() + { + return new HqlCount(_factory); + } - public HqlCount Count(HqlExpression child) - { - return new HqlCount(_factory, child); - } + public HqlCount Count(HqlExpression child) + { + return new HqlCount(_factory, child); + } - public HqlRowStar RowStar() - { - return new HqlRowStar(_factory); - } + public HqlRowStar RowStar() + { + return new HqlRowStar(_factory); + } - public HqlCast Cast(HqlExpression expression, System.Type type) - { - return new HqlCast(_factory, expression, type); - } + public HqlCast Cast(HqlExpression expression, System.Type type) + { + return new HqlCast(_factory, expression, type); + } - public HqlBitwiseNot BitwiseNot() - { - return new HqlBitwiseNot(_factory); - } + public HqlBitwiseNot BitwiseNot() + { + return new HqlBitwiseNot(_factory); + } - public HqlBooleanNot BooleanNot(HqlBooleanExpression operand) - { - return new HqlBooleanNot(_factory, operand); - } + public HqlBooleanNot BooleanNot(HqlBooleanExpression operand) + { + return new HqlBooleanNot(_factory, operand); + } - public HqlAverage Average(HqlExpression expression) - { - return new HqlAverage(_factory, expression); - } + public HqlAverage Average(HqlExpression expression) + { + return new HqlAverage(_factory, expression); + } - public HqlSum Sum(HqlExpression expression) - { - return new HqlSum(_factory, expression); - } + public HqlSum Sum(HqlExpression expression) + { + return new HqlSum(_factory, expression); + } - public HqlMin Min(HqlExpression expression) - { - return new HqlMin(_factory, expression); - } + public HqlMin Min(HqlExpression expression) + { + return new HqlMin(_factory, expression); + } - public HqlMax Max(HqlExpression expression) - { - return new HqlMax(_factory, expression); - } + public HqlMax Max(HqlExpression expression) + { + return new HqlMax(_factory, expression); + } - public HqlJoin Join(HqlExpression expression, HqlAlias @alias) - { - return new HqlJoin(_factory, expression, @alias); - } + public HqlJoin Join(HqlExpression expression, HqlAlias @alias) + { + return new HqlJoin(_factory, expression, @alias); + } - public HqlAny Any() - { - return new HqlAny(_factory); - } + public HqlAny Any() + { + return new HqlAny(_factory); + } - public HqlExists Exists(HqlQuery query) - { - return new HqlExists(_factory, query); - } + public HqlExists Exists(HqlQuery query) + { + return new HqlExists(_factory, query); + } - public HqlElements Elements() - { - return new HqlElements(_factory); - } + public HqlElements Elements() + { + return new HqlElements(_factory); + } - public HqlDistinct Distinct() - { - return new HqlDistinct(_factory); - } + public HqlDistinct Distinct() + { + return new HqlDistinct(_factory); + } - public HqlDirectionAscending Ascending() - { - return new HqlDirectionAscending(_factory); - } + public HqlDirectionAscending Ascending() + { + return new HqlDirectionAscending(_factory); + } - public HqlDirectionDescending Descending() - { - return new HqlDirectionDescending(_factory); - } + public HqlDirectionDescending Descending() + { + return new HqlDirectionDescending(_factory); + } - public HqlGroupBy GroupBy(HqlExpression expression) - { - return new HqlGroupBy(_factory, expression); - } + public HqlGroupBy GroupBy(HqlExpression expression) + { + return new HqlGroupBy(_factory, expression); + } public HqlAll All() - { - return new HqlAll(_factory); - } + { + return new HqlAll(_factory); + } - public HqlLike Like(HqlExpression lhs, HqlExpression rhs) - { - return new HqlLike(_factory, lhs, rhs); - } + public HqlLike Like(HqlExpression lhs, HqlExpression rhs) + { + return new HqlLike(_factory, lhs, rhs); + } - public HqlConcat Concat(params HqlExpression[] args) - { - return new HqlConcat(_factory, args); - } + public HqlConcat Concat(params HqlExpression[] args) + { + return new HqlConcat(_factory, args); + } - public HqlMethodCall MethodCall(string methodName, IEnumerable<HqlExpression> parameters) - { - return new HqlMethodCall(_factory, methodName, parameters); - } + public HqlMethodCall MethodCall(string methodName, IEnumerable<HqlExpression> parameters) + { + return new HqlMethodCall(_factory, methodName, parameters); + } - public HqlMethodCall MethodCall(string methodName, params HqlExpression[] parameters) - { - return new HqlMethodCall(_factory, methodName, parameters); - } + public HqlMethodCall MethodCall(string methodName, params HqlExpression[] parameters) + { + return new HqlMethodCall(_factory, methodName, parameters); + } - public HqlBooleanMethodCall BooleanMethodCall(string methodName, IEnumerable<HqlExpression> parameters) - { - return new HqlBooleanMethodCall(_factory, methodName, parameters); - } + public HqlBooleanMethodCall BooleanMethodCall(string methodName, IEnumerable<HqlExpression> parameters) + { + return new HqlBooleanMethodCall(_factory, methodName, parameters); + } - public HqlDistinctHolder DistinctHolder(params HqlTreeNode[] children) - { - return new HqlDistinctHolder(_factory, children); - } + public HqlDistinctHolder DistinctHolder(params HqlTreeNode[] children) + { + return new HqlDistinctHolder(_factory, children); + } - public HqlIsNull IsNull(HqlExpression lhs) - { - return new HqlIsNull(_factory, lhs); - } + public HqlIsNull IsNull(HqlExpression lhs) + { + return new HqlIsNull(_factory, lhs); + } - public HqlIsNotNull IsNotNull(HqlExpression lhs) - { - return new HqlIsNotNull(_factory, lhs); - } + public HqlIsNotNull IsNotNull(HqlExpression lhs) + { + return new HqlIsNotNull(_factory, lhs); + } - public HqlTreeNode ExpressionList(IEnumerable<HqlExpression> expressions) - { - return new HqlExpressionList(_factory, expressions); - } + public HqlTreeNode ExpressionList(IEnumerable<HqlExpression> expressions) + { + return new HqlExpressionList(_factory, expressions); + } - public HqlStar Star() - { - return new HqlStar(_factory); - } + public HqlStar Star() + { + return new HqlStar(_factory); + } - public HqlTrue True() - { - return new HqlTrue(_factory); - } + public HqlTrue True() + { + return new HqlTrue(_factory); + } - public HqlFalse False() - { - return new HqlFalse(_factory); - } + public HqlFalse False() + { + return new HqlFalse(_factory); + } - public HqlIn In(HqlExpression itemExpression, HqlTreeNode source) - { - return new HqlIn(_factory, itemExpression, source); - } + public HqlIn In(HqlExpression itemExpression, HqlTreeNode source) + { + return new HqlIn(_factory, itemExpression, source); + } - public HqlLeftJoin LeftJoin(HqlExpression expression, HqlAlias @alias) - { - return new HqlLeftJoin(_factory, expression, @alias); - } + public HqlLeftJoin LeftJoin(HqlExpression expression, HqlAlias @alias) + { + return new HqlLeftJoin(_factory, expression, @alias); + } - public HqlFetchJoin FetchJoin(HqlExpression expression, HqlAlias @alias) - { - return new HqlFetchJoin(_factory, expression, @alias); - } + public HqlFetchJoin FetchJoin(HqlExpression expression, HqlAlias @alias) + { + return new HqlFetchJoin(_factory, expression, @alias); + } - public HqlLeftFetchJoin LeftFetchJoin(HqlExpression expression, HqlAlias @alias) - { - return new HqlLeftFetchJoin(_factory, expression, @alias); - } + public HqlLeftFetchJoin LeftFetchJoin(HqlExpression expression, HqlAlias @alias) + { + return new HqlLeftFetchJoin(_factory, expression, @alias); + } - public HqlClass Class() - { - return new HqlClass(_factory); - } + public HqlClass Class() + { + return new HqlClass(_factory); + } - public HqlBitwiseAnd BitwiseAnd(HqlExpression lhs, HqlExpression rhs) - { - return new HqlBitwiseAnd(_factory, lhs, rhs); - } + public HqlBitwiseAnd BitwiseAnd(HqlExpression lhs, HqlExpression rhs) + { + return new HqlBitwiseAnd(_factory, lhs, rhs); + } - public HqlBitwiseOr BitwiseOr(HqlExpression lhs, HqlExpression rhs) - { - return new HqlBitwiseOr(_factory, lhs, rhs); - } + public HqlBitwiseOr BitwiseOr(HqlExpression lhs, HqlExpression rhs) + { + return new HqlBitwiseOr(_factory, lhs, rhs); + } - public HqlTreeNode Coalesce(HqlExpression lhs, HqlExpression rhs) - { - return new HqlCoalesce(_factory, lhs, rhs); - } - } + public HqlTreeNode Coalesce(HqlExpression lhs, HqlExpression rhs) + { + return new HqlCoalesce(_factory, lhs, rhs); + } + + public HqlTreeNode DictionaryItem(HqlExpression dictionary, HqlExpression index) + { + return new HqlDictionaryIndex(_factory, dictionary, index); + } + + public HqlTreeNode Indices(HqlExpression dictionary) + { + return new HqlIndices(_factory, dictionary); + } + } } \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs 2010-12-03 09:20:26 UTC (rev 5287) +++ trunk/nhibernate/src/NHibernate/Hql/Ast/HqlTreeNode.cs 2010-12-04 02:27:02 UTC (rev 5288) @@ -6,598 +6,596 @@ namespace NHibernate.Hql.Ast { - public class HqlTreeNode - { - public IASTFactory Factory { get; private set; } - private readonly IASTNode _node; - private readonly List<HqlTreeNode> _children; + public class HqlTreeNode + { + public IASTFactory Factory { get; private set; } + private readonly IASTNode _node; + private readonly List<HqlTreeNode> _children; - protected HqlTreeNode(int type, string text, IASTFactory factory, IEnumerable<HqlTreeNode> children) - { - Factory = factory; - _node = factory.CreateNode(type, text); - _children = new List<HqlTreeNode>(); + protected HqlTreeNode(int type, string text, IASTFactory factory, IEnumerable<HqlTreeNode> children) + { + Factory = factory; + _node = factory.CreateNode(type, text); + _children = new List<HqlTreeNode>(); - AddChildren(children); - } + AddChildren(children); + } - protected HqlTreeNode(int type, string text, IASTFactory factory, params HqlTreeNode[] children) : this(type, text, factory, (IEnumerable<HqlTreeNode>) children) - { - } + protected HqlTreeNode(int type, string text, IASTFactory factory, params HqlTreeNode[] children) : this(type, text, factory, (IEnumerable<HqlTreeNode>) children) + { + } - private void AddChildren(IEnumerable<HqlTreeNode> children) - { - foreach (var child in children) - { - if (child != null) - { - if (child is HqlDistinctHolder) - { - AddChildren(child.Children); - } - else - { - _children.Add(child); - _node.AddChild(child.AstNode); - } - } - } - } + private void AddChildren(IEnumerable<HqlTreeNode> children) + { + foreach (var child in children) + { + if (child != null) + { + if (child is HqlDistinctHolder) + { + AddChildren(child.Children); + } + else + { + _children.Add(child); + _node.AddChild(child.AstNode); + } + } + } + } - public IEnumerable<HqlTreeNode> NodesPreOrder - { - get - { - yield return this; + public IEnumerable<HqlTreeNode> NodesPreOrder + { + get + { + yield return this; - foreach (var child in _children) - { - foreach (var node in child.NodesPreOrder) - { - yield return node; - } - } - } - } + foreach (var child in _children) + { + foreach (var node in child.NodesPreOrder) + { + yield return node; + } + } + } + } - public IEnumerable<HqlTreeNode> NodesPostOrder - { - get - { - foreach (var child in _children) - { - foreach (var node in child.NodesPostOrder) - { - yield return node; - } - } + public IEnumerable<HqlTreeNode> NodesPostOrder + { + get + { + foreach (var child in _children) + { + foreach (var node in child.NodesPostOrder) + { + yield return node; + } + } - yield return this; - } - } + yield return this; + } + } - public IEnumerable<HqlTreeNode> Children - { - get { return _children; } - } + public IEnumerable<HqlTreeNode> Children + { + get { return _children; } + } - public void ClearChildren() - { - _children.Clear(); - _node.ClearChildren(); - } + public void ClearChildren() + { + _children.Clear(); + _node.ClearChildren(); + } - protected void SetText(string text) - { - _node.Text = text; - } + protected void SetText(string text) + { + _node.Text = text; + } - internal IASTNode AstNode - { - get { return _node; } - } + internal IASTNode AstNode + { + get { return _node; } + } - internal void AddChild(HqlTreeNode child) - { - if (child is HqlDistinctHolder) - { - AddChildren(child.Children); - } - else - { - _children.Add(child); - _node.AddChild(child.AstNode); - } - } - } + internal void AddChild(HqlTreeNode child) + { + if (child is HqlDistinctHolder) + { + AddChildren(child.Children); + } + else + { + _children.Add(child); + _node.AddChild(child.AstNode); + } + } + } - public static class HqlTreeNodeExtensions - { - public static HqlExpression AsExpression(this HqlTreeNode node) - { - // TODO - nice error handling if cast fails - return (HqlExpression)node; - } + public static class HqlTreeNodeExtensions + { + public static HqlExpression AsExpression(this HqlTreeNode node) + { + // TODO - nice error handling if cast fails + return (HqlExpression)node; + } - public static HqlBooleanExpression AsBooleanExpression(this HqlTreeNode node) - { - if (node is HqlDot) - { - return new HqlBooleanDot(node.Factory, (HqlDot) node); - } + public static HqlBooleanExpression AsBooleanExpression(this HqlTreeNode node) + { + if (node is HqlDot) + { + return new HqlBooleanDot(node.Factory, (HqlDot) node); + } - // TODO - nice error handling if cast fails - return (HqlBooleanExpression)node; - } - - } + // TODO - nice error handling if cast fails + return (HqlBooleanExpression)node; + } + + } - public abstract class HqlStatement : HqlTreeNode - { - protected HqlStatement(int type, string text, IASTFactory factory, params HqlTreeNode[] children) - : base(type, text, factory, children) - { - } + public abstract class HqlStatement : HqlTreeNode + { + protected HqlStatement(int type, string text, IASTFactory factory, params HqlTreeNode[] children) + : base(type, text, factory, children) + { + } - protected HqlStatement(int type, string text, IASTFactory factory, IEnumerable<HqlTreeNode> children) - : base(type, text, factory, children) - { - } - } + protected HqlStatement(int type, string text, IASTFactory factory, IEnumerable<HqlTreeNode> children) + : base(type, text, factory, children) + { + } + } - public abstract class HqlExpression : HqlTreeNode - { - protected HqlExpression(int type, string text, IASTFactory factory, IEnumerable<HqlTreeNode> children) - : base(type, text, factory, children) - { - } + public abstract class HqlExpression : HqlTreeNode + { + protected HqlExpression(int type, string text, IASTFactory factory, IEnumerable<HqlTreeNode> children) + : base(type, text, factory, children) + { + } - protected HqlExpression(int type, string text, IASTFactory factory, params HqlTreeNode[] children) - : base(type, text, factory, children) - { - } - } + protected HqlExpression(int type, string text, IASTFactory factory, params HqlTreeNode[] children) + : base(type, text, factory, children) + { + } + } - public abstract class HqlBooleanExpression : HqlExpression - { - protected HqlBooleanExpression(int type, string text, IASTFactory factory, IEnumerable<HqlTreeNode> children) - : base(type, text, factory, children) - { - } + public abstract class HqlBooleanExpression : HqlExpression + { + protected HqlBooleanExpression(int type, string text, IASTFactory factory, IEnumerable<HqlTreeNode> children) + : base(type, text, factory, children) + { + } - protected HqlBooleanExpression(int type, string text, IASTFactory factory, params HqlTreeNode[] children) - : base(type, text, factory, children) - { - } - } + protected HqlBooleanExpression(int type, string text, IASTFactory factory, params HqlTreeNode[] children) + : base(type, text, factory, children) + { + } + } - public class HqlQuery : HqlExpression - { - internal HqlQuery(IASTFactory factory, params HqlStatement[] children) - : base(HqlSqlWalker.QUERY, "query", factory, children) - { - } - } + public class HqlQuery : HqlExpression + { + internal HqlQuery(IASTFactory factory, params HqlStatement[] children) + : base(HqlSqlWalker.QUERY, "query", factory, children) + { + } + } - public class HqlIdent : HqlExpression - { - internal HqlIdent(IASTFactory factory, string ident) - : base(HqlSqlWalker.IDENT, ident, factory) - { - } + public class HqlIdent : HqlExpression + { + internal HqlIdent(IASTFactory factory, string ident) + : base(HqlSqlWalker.IDENT, ident, factory) + { + } - internal HqlIdent(IASTFactory factory, System.Type type) - : base(HqlSqlWalker.IDENT, "", factory) - { - if (IsNullableType(type)) - { - type = ExtractUnderlyingTypeFromNullable(type); - } + internal HqlIdent(IASTFactory factory, System.Type type) + : base(HqlSqlWalker.IDENT, "", factory) + { + if (IsNullableType(type)) + { + type = ExtractUnderlyingTypeFromNullable(type); + } - switch (System.Type.GetTypeCode(type)) - { + switch (System.Type.GetTypeCode(type)) + { case TypeCode.Boolean: - SetText("bool"); - break; + SetText("bool"); + break; case TypeCode.Int16: - SetText("short"); - break; + SetText("short"); + break; case TypeCode.Int32: - SetText("integer"); - break; - case TypeCode.Int64: - SetText("long"); - break; - case TypeCode.Decimal: - SetText("decimal"); - break; - case TypeCode.DateTime: - SetText("datetime"); - break; + SetText("integer"); + break; + case TypeCode.Int64: + SetText("long"); + break; + case TypeCode.Decimal: + SetText("decimal"); + break; + case TypeCode.DateTime: + SetText("datetime"); + break; case TypeCode.String: - SetText("string"); - break; - case TypeCode.Double: - SetText("double"); - break; - default: + SetText("string"); + break; + case TypeCode.Double: + SetText("double"); + break; + default: if (type == typeof(Guid)) { SetText("guid"); break; } - throw new NotSupportedException(string.Format("Don't currently support idents of type {0}", type.Name)); - } - } + throw new NotSupportedException(string.Format("Don't currently support idents of type {0}", type.Name)); + } + } - private static System.Type ExtractUnderlyingTypeFromNullable(System.Type type) - { - return type.GetGenericArguments()[0]; - } + private static System.Type ExtractUnderlyingTypeFromNullable(System.Type type) + { + return type.GetGenericArguments()[0]; + } - // TODO - code duplicated in LinqExtensionMethods - private static bool IsNullableType(System.Type type) - { - return (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)); - } + // TODO - code duplicated in LinqExtensionMethods + private static bool IsNullableType(System.Type type) + { + return (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)); + } + } - } + public class HqlRange : HqlStatement + { + internal HqlRange(IASTFactory factory, params HqlTreeNode[] children) + : base(HqlSqlWalker.RANGE, "range", factory, children) + { + } + } - public class HqlRange : HqlStatement - { - internal HqlRange(IASTFactory factory, params HqlTreeNode[] children) - : base(HqlSqlWalker.RANGE, "range", factory, children) - { - } - } + public class HqlFrom : HqlStatement + { + internal HqlFrom(IASTFactory factory, params HqlTreeNode[] children) + : base(HqlSqlWalker.FROM, "from", factory, children) + { + } + } - public class HqlFrom : HqlStatement - { - internal HqlFrom(IASTFactory factory, params HqlTreeNode[] children) - : base(HqlSqlWalker.FROM, "from", factory, children) - { - } - } + public class HqlSelectFrom : HqlStatement + { + internal HqlSelectFrom(IASTFactory factory, params HqlTreeNode[] children) + : base(HqlSqlWalker.SELECT_FROM, "select_from", factory, children) + { + } + } - public class HqlSelectFrom : HqlStatement - { - internal HqlSelectFrom(IASTFactory factory, params HqlTreeNode[] children) - : base(HqlSqlWalker.SELECT_FROM, "select_from", factory, children) - { - } - } + public class HqlAlias : HqlExpression + { + public HqlAlias(IASTFactory factory, string @alias) + : base(HqlSqlWalker.ALIAS, alias, factory) + { + } + } - public class HqlAlias : HqlExpression - { - public HqlAlias(IASTFactory factory, string @alias) - : base(HqlSqlWalker.ALIAS, alias, factory) - { - } - } + public class HqlDivide : HqlExpression + { + public HqlDivide(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) + : base(HqlSqlWalker.DIV, "/", factory, lhs, rhs) + { + } + } - public class HqlDivide : HqlExpression - { - public HqlDivide(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) - : base(HqlSqlWalker.DIV, "/", factory, lhs, rhs) - { - } - } + public class HqlMultiplty : HqlExpression + { + public HqlMultiplty(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) + : base(HqlSqlWalker.STAR, "*", factory, lhs, rhs) + { + } + } - public class HqlMultiplty : HqlExpression - { - public HqlMultiplty(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) - : base(HqlSqlWalker.STAR, "*", factory, lhs, rhs) - { - } - } + public class HqlSubtract : HqlExpression + { + public HqlSubtract(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) + : base(HqlSqlWalker.MINUS, "-", factory, lhs, rhs) + { + } + } - public class HqlSubtract : HqlExpression - { - public HqlSubtract(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) - : base(HqlSqlWalker.MINUS, "-", factory, lhs, rhs) - { - } - } + public class HqlAdd : HqlExpression + { + public HqlAdd(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) + : base(HqlSqlWalker.PLUS, "+", factory, lhs, rhs) + { + } + } - public class HqlAdd : HqlExpression - { - public HqlAdd(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) - : base(HqlSqlWalker.PLUS, "+", factory, lhs, rhs) - { - } - } + public class HqlBooleanOr : HqlBooleanExpression + { + public HqlBooleanOr(IASTFactory factory, HqlBooleanExpression lhs, HqlBooleanExpression rhs) + : base(HqlSqlWalker.OR, "or", factory, lhs, rhs) + { + } + } - public class HqlBooleanOr : HqlBooleanExpression - { - public HqlBooleanOr(IASTFactory factory, HqlBooleanExpression lhs, HqlBooleanExpression rhs) - : base(HqlSqlWalker.OR, "or", factory, lhs, rhs) - { - } - } + public class HqlBooleanAnd : HqlBooleanExpression + { + public HqlBooleanAnd(IASTFactory factory, HqlBooleanExpression lhs, HqlBooleanExpression rhs) + : base(HqlSqlWalker.AND, "and", factory, lhs, rhs) + { + } + } - public class HqlBooleanAnd : HqlBooleanExpression - { - public HqlBooleanAnd(IASTFactory factory, HqlBooleanExpression lhs, HqlBooleanExpression rhs) - : base(HqlSqlWalker.AND, "and", factory, lhs, rhs) - { - } - } + public class HqlEquality : HqlBooleanExpression + { + public HqlEquality(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) + : base(HqlSqlWalker.EQ, "==", factory, lhs, rhs) + { + } + } - public class HqlEquality : HqlBooleanExpression - { - public HqlEquality(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) - : base(HqlSqlWalker.EQ, "==", factory, lhs, rhs) - { - } - } - - public class HqlParameter : HqlExpression - { - public HqlParameter(IASTFactory factory, string name) - : base(HqlSqlWalker.COLON, ":", factory) - { + public class HqlParameter : HqlExpression + { + public HqlParameter(IASTFactory factory, string name) + : base(HqlSqlWalker.COLON, ":", factory) + { AddChild(new HqlIdent(factory, name)); - } - } + } + } - public class HqlDot : HqlExpression - { - public HqlDot(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) - : base(HqlSqlWalker.DOT, ".", factory, lhs, rhs) - { - } - } + public class HqlDot : HqlExpression + { + public HqlDot(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) + : base(HqlSqlWalker.DOT, ".", factory, lhs, rhs) + { + } + } - public class HqlBooleanDot : HqlBooleanExpression - { - public HqlBooleanDot(IASTFactory factory, HqlDot dot) : base(dot.AstNode.Type, dot.AstNode.Text, factory, dot.Children) - { - } - } + public class HqlBooleanDot : HqlBooleanExpression + { + public HqlBooleanDot(IASTFactory factory, HqlDot dot) : base(dot.AstNode.Type, dot.AstNode.Text, factory, dot.Children) + { + } + } - public class HqlWhere : HqlStatement - { - public HqlWhere(IASTFactory factory, HqlExpression expression) - : base(HqlSqlWalker.WHERE, "where", factory, expression) - { - } - } + public class HqlWhere : HqlStatement + { + public HqlWhere(IASTFactory factory, HqlExpression expression) + : base(HqlSqlWalker.WHERE, "where", factory, expression) + { + } + } - public class HqlConstant : HqlExpression - { - public HqlConstant(IASTFactory factory, int type, string value) - : base(type, value, factory) - { - } - } + public class HqlConstant : HqlExpression + { + public HqlConstant(IASTFactory factory, int type, string value) + : base(type, value, factory) + { + } + } - public class HqlStringConstant : HqlConstant - { - public HqlStringConstant(IASTFactory factory, string s) - : base(factory, HqlSqlWalker.QUOTED_String, s) - { - } - } + public class HqlStringConstant : HqlConstant + { + public HqlStringConstant(IASTFactory factory, string s) + : base(factory, HqlSqlWalker.QUOTED_String, s) + { + } + } - public class HqlDoubleConstant : HqlConstant - { - public HqlDoubleConstant(IASTFactory factory, string s) - : base(factory, HqlSqlWalker.NUM_DOUBLE, s) - { - } - } + public class HqlDoubleConstant : HqlConstant + { + public HqlDoubleConstant(IASTFactory factory, string s) + : base(factory, HqlSqlWalker.NUM_DOUBLE, s) + { + } + } - public class HqlFloatConstant : HqlConstant - { - public HqlFloatConstant(IASTFactory factory, string s) - : base(factory, HqlSqlWalker.NUM_FLOAT, s) - { - } - } + public class HqlFloatConstant : HqlConstant + { + public HqlFloatConstant(IASTFactory factory, string s) + : base(factory, HqlSqlWalker.NUM_FLOAT, s) + { + } + } - public class HqlIntegerConstant : HqlConstant - { - public HqlIntegerConstant(IASTFactory factory, string s) - : base(factory, HqlSqlWalker.NUM_INT, s) - { - } - } + public class HqlIntegerConstant : HqlConstant + { + public HqlIntegerConstant(IASTFactory factory, string s) + : base(factory, HqlSqlWalker.NUM_INT, s) + { + } + } - public class HqlDecimalConstant : HqlConstant - { - public HqlDecimalConstant(IASTFactory factory, string s) - : base(factory, HqlSqlWalker.NUM_DECIMAL, s) - { - } - } + public class HqlDecimalConstant : HqlConstant + { + public HqlDecimalConstant(IASTFactory factory, string s) + : base(factory, HqlSqlWalker.NUM_DECIMAL, s) + { + } + } - public class HqlFalse : HqlConstant - { - public HqlFalse(IASTFactory factory) - : base(factory, HqlSqlWalker.FALSE, "false") - { - } - } + public class HqlFalse : HqlConstant + { + public HqlFalse(IASTFactory factory) + : base(factory, HqlSqlWalker.FALSE, "false") + { + } + } - public class HqlTrue : HqlConstant - { - public HqlTrue(IASTFactory factory) - : base(factory, HqlSqlWalker.TRUE, "true") - { - } - } + public class HqlTrue : HqlConstant + { + public HqlTrue(IASTFactory factory) + : base(factory, HqlSqlWalker.TRUE, "true") + { + } + } + public class HqlNull : HqlConstant + { + public HqlNull(IASTFactory factory) + : base(factory, HqlSqlWalker.NULL, "null") + { + } + } - public class HqlNull : HqlConstant - { - public HqlNull(IASTFactory factory) - : base(factory, HqlSqlWalker.NULL, "null") - { - } - } + public class HqlOrderBy : HqlStatement + { + public HqlOrderBy(IASTFactory factory) + : base(HqlSqlWalker.ORDER, "order by", factory) + { + } + } - public class HqlOrderBy : HqlStatement - { - public HqlOrderBy(IASTFactory factory) - : base(HqlSqlWalker.ORDER, "order by", factory) - { - } - } + public enum HqlDirection + { + Ascending, + Descending + } - public enum HqlDirection - { - Ascending, - Descending - } + public class HqlDirectionStatement : HqlStatement + { + public HqlDirectionStatement(int type, string text, IASTFactory factory) + : base(type, text, factory) + { + } + } - public class HqlDirectionStatement : HqlStatement - { - public HqlDirectionStatement(int type, string text, IASTFactory factory) - : base(type, text, factory) - { - } - } + public class HqlDirectionAscending : HqlDirectionStatement + { + public HqlDirectionAscending(IASTFactory factory) + : base(HqlSqlWalker.ASCENDING, "asc", factory) + { + } + } - public class HqlDirectionAscending : HqlDirectionStatement - { - public HqlDirectionAscending(IASTFactory factory) - : base(HqlSqlWalker.ASCENDING, "asc", factory) - { - } - } + public class HqlDirectionDescending : HqlDirectionStatement + { + public HqlDirectionDescending(IASTFactory factory) + : base(HqlSqlWalker.DESCENDING, "desc", factory) + { + } + } - public class HqlDirectionDescending : HqlDirectionStatement - { - public HqlDirectionDescending(IASTFactory factory) - : base(HqlSqlWalker.DESCENDING, "desc", factory) - { - } - } + public class HqlSelect : HqlStatement + { + public HqlSelect(IASTFactory factory, params HqlExpression[] expression) + : base(HqlSqlWalker.SELECT, "select", factory, expression) + { + } + } - public class HqlSelect : HqlStatement - { - public HqlSelect(IASTFactory factory, params HqlExpression[] expression) - : base(HqlSqlWalker.SELECT, "select", factory, expression) - { - } - } + public class HqlElse : HqlStatement + { + public HqlElse(IASTFactory factory, HqlExpression ifFalse) + : base(HqlSqlWalker.ELSE, "else", factory, ifFalse) + { + } + } - public class HqlElse : HqlStatement - { - public HqlElse(IASTFactory factory, HqlExpression ifFalse) - : base(HqlSqlWalker.ELSE, "else", factory, ifFalse) - { - } - } + public class HqlWhen : HqlStatement + { + public HqlWhen(IASTFactory factory, HqlExpression predicate, HqlExpression ifTrue) + : base(HqlSqlWalker.WHEN, "when", factory, predicate, ifTrue) + { + } + } - public class HqlWhen : HqlStatement - { - public HqlWhen(IASTFactory factory, HqlExpression predicate, HqlExpression ifTrue) - : base(HqlSqlWalker.WHEN, "when", factory, predicate, ifTrue) - { - } - } + public class HqlCase : HqlExpression + { + public HqlCase(IASTFactory factory, HqlWhen[] whenClauses, HqlExpression ifFalse) + : base(HqlSqlWalker.CASE, "case", factory, whenClauses) + { + if (ifFalse != null) + { + AddChild(new HqlElse(factory, ifFalse)); + } + } + } - public class HqlCase : HqlExpression - { - public HqlCase(IASTFactory factory, HqlWhen[] whenClauses, HqlExpression ifFalse) - : base(HqlSqlWalker.CASE, "case", factory, whenClauses) - { - if (ifFalse != null) - { - AddChild(new HqlElse(factory, ifFalse)); - } - } - } + public class HqlGreaterThanOrEqual : HqlBooleanExpression + { + public HqlGreaterThanOrEqual(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) + : base(HqlSqlWalker.GE, "ge", factory, lhs, rhs) + { + } + } - public class HqlGreaterThanOrEqual : HqlBooleanExpression - { - public HqlGreaterThanOrEqual(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) - : base(HqlSqlWalker.GE, "ge", factory, lhs, rhs) - { - } - } + public class HqlGreaterThan : HqlBooleanExpression + { + public HqlGreaterThan(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) + : base(HqlSqlWalker.GT, "gt", factory, lhs, rhs) + { + } + } - public class HqlGreaterThan : HqlBooleanExpression - { - public HqlGreaterThan(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) - : base(HqlSqlWalker.GT, "gt", factory, lhs, rhs) - { - } - } + public class HqlLessThanOrEqual : HqlBooleanExpression + { + public HqlLessThanOrEqual(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) + : base(HqlSqlWalker.LE, "le", factory, lhs, rhs) + { + } + } - public class HqlLessThanOrEqual : HqlBooleanExpression - { - public HqlLessThanOrEqual(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) - : base(HqlSqlWalker.LE, "le", factory, lhs, rhs) - { - } - } + public class HqlLessThan : HqlBooleanExpression + { + public HqlLessThan(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) + : base(HqlSqlWalker.LT, "lt", factory, lhs, rhs) + { + } + } - public class HqlLessThan : HqlBooleanExpression - { - public HqlLessThan(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) - : base(HqlSqlWalker.LT, "lt", factory, lhs, rhs) - { - } - } + public class HqlInequality : HqlBooleanExpression + { + public HqlInequality(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) + : base(HqlSqlWalker.NE, "ne", factory, lhs, rhs) + { + } + } - public class HqlInequality : HqlBooleanExpression - { - public HqlInequality(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) - : base(HqlSqlWalker.NE, "ne", factory, lhs, rhs) - { - } - } + public class HqlRowStar : HqlStatement + { + public HqlRowStar(IASTFactory factory) + : base(HqlSqlWalker.ROW_STAR, "*", factory) + { + } + } - public class HqlRowStar : HqlStatement - { - public HqlRowStar(IASTFactory factory) - : base(HqlSqlWalker.ROW_STAR, "*", factory) - { - } - } + public class HqlCount : HqlExpression + { + public HqlCount(IASTFactory factory) + : base(HqlSqlWalker.COUNT, "count", factory) + { + } - public class HqlCount : HqlExpression - { - public HqlCount(IASTFactory factory) - : base(HqlSqlWalker.COUNT, "count", factory) - { - } + public HqlCount(IASTFactory factory, HqlExpression child) + : base(HqlSqlWalker.COUNT, "count", factory, child) + { + } + } - public HqlCount(IASTFactory factory, HqlExpression child) - : base(HqlSqlWalker.COUNT, "count", factory, child) - { - } - } + public class HqlAs : HqlExpression + { + public HqlAs(IASTFactory factory, HqlExpression expression, System.Type type) + : base(HqlSqlWalker.AS, "as", factory, expression) + { + switch (System.Type.GetTypeCode(type)) + { + case TypeCode.Int32: + AddChild(new HqlIdent(factory, "integer")); + break; + default: + throw new InvalidOperationException(); + } + } + } - public class HqlAs : HqlExpression - { - public HqlAs(IASTFactory factory, HqlExpression expression, System.Type type) - : base(HqlSqlWalker.AS, "as", factory, expression) - { - switch (System.Type.GetTypeCode(type)) - { - case TypeCode.Int32: - AddChild(new HqlIdent(factory, "integer")); - break; - default: - throw new InvalidOperationException(); - } - } - } + public class HqlCast : HqlExpression + { + public HqlCast(IASTFactory factory, HqlExpression expression, System.Type type) + : base(HqlSqlWalker.METHOD_CALL, "method", factory) + { + AddChild(new HqlIdent(factory, "cast")); + AddChild(new HqlExpressionList(factory, expression, new HqlIdent(factory, type))); + } + } - public class HqlCast : HqlExpression - { - public HqlCast(IASTFactory factory, HqlExpression expression, System.Type type) - : base(HqlSqlWalker.METHOD_CALL, "method", factory) - { - AddChild(new HqlIdent(factory, "cast")); - AddChild(new HqlExpressionList(factory, expression, new HqlIdent(factory, type))); - } - } - public class HqlCoalesce : HqlExpression { public HqlCoalesce(IASTFactory factory, HqlExpression lhs, HqlExpression rhs) @@ -608,264 +606,280 @@ } } - public class HqlExpressionList : HqlStatement - { - public HqlExpressionList(IASTFactory factory, params HqlExpression[] expressions) - : base(HqlSqlWalker.EXPR_LIST, "expr_list", factory, expressions) - { - } + public class HqlDictionaryIndex : HqlExpression + { + public HqlDictionaryIndex(IASTFactory factory, HqlExpression dictionary, HqlExpression index) + : base(HqlSqlWalker.INDEX_OP, "[", factory, dictionary, index) + { + } + } - public HqlExpressionList(IASTFactory factory, IEnumerable<HqlExpression> expressions) - : base(HqlSqlWalker.EXPR_LIST, "expr_list", factory, expressions.Cast<HqlTreeNode>()) - { - } - } + public class HqlIndices : HqlExpression + { + public HqlIndices(IASTFactory factory, HqlExpression dictionary) + : base(HqlSqlWalker.INDICES, "indices", factory, dictionary) + { + } + } - public class HqlBooleanNot : HqlBooleanExpression - { - public HqlBooleanNot(IASTFactory factory, HqlBooleanExpression operand) - : base(HqlSqlWalker.NOT, "not", factory, operand) - { - } - } + public class HqlExpressionList : HqlStatement + { + public HqlExpressionList(IASTFactory factory, params HqlExpression[] expressions) + : base(HqlSqlWalker.EXPR_LIST, "expr_list", factory, expressions) + { + } - public class HqlAverage : HqlExpression - { - public HqlAverage(IASTFactory factory, HqlExpression expression) - : base(HqlSqlWalker.AGGREGATE, "avg", factory, expression) - { - } - } + public HqlExpressionList(IASTFactory factory, IEnumerable<HqlExpression> expressions) + : base(HqlSqlWalker.EXPR_LIST, "expr_list", factory, expressions.Cast<HqlTreeNode>()) + { + } + } - public class HqlBitwiseNot : HqlExpression - { - public HqlBitwiseNot(IASTFactory factory) : base(HqlSqlWalker.BNOT, "not", factory) - { - } - } + public class HqlBooleanNot : HqlBooleanExpression + { + public HqlBooleanNot(IASTFactory factory, HqlBooleanExpression operand) + : base(HqlSqlWalker.NOT, "not", factory, operand) + { + } + } - public class HqlSum : HqlExpression - { - public HqlSum(IASTFactory factory) - : base(HqlSqlWalker.AGGREGATE, "sum", factory) - { - } + public class HqlAverage : HqlExpression + { + public HqlAverage(IASTFactory factory, HqlExpression expression) + : base(HqlSqlWalker.AGGREGATE, "avg", factory, expression) + { + } + } - public HqlSum(IASTFactory factory, HqlExpression expression) - : base(HqlSqlWalker.AGGREGATE, "sum", factory, expression) - { - } - } + public class HqlBitwiseNot : HqlExpression + { + public HqlBitwiseNot(IASTFactory factory) : base(HqlSqlWalker.BNOT, "not", factory) + { + } + } - public class HqlMax : HqlExpression - { - public HqlMax(IASTFactory factory, HqlExpression expression) - : base(HqlSqlWalker.AGGREGATE, "max", factory, expression) - { - } + public class HqlSum : HqlExpression + { + public HqlSum(IASTFactory factory) + : base(HqlSqlWalker.AGGREGATE, "sum", factory) + { + } + + public HqlSum(IASTFactory factory, HqlExpression expression) + : base(HqlSqlWalker.AGGREGATE, "sum", factory, expression) + { + } + } + + public class HqlMax : HqlExpression + { + public HqlMax(IASTFactory factory, HqlExpression expression) + : base(HqlSqlWalker.AGGREGATE, "max", factory, expression) + { + } } - public class HqlMin : HqlExpression - { - public HqlMin(IASTFactory factory, HqlExpression expression) - : base(HqlSqlWalker.AGGREGATE, "min", factory, expression) - { - } - } + public class HqlMin : HqlExpression + { + public HqlMin(IASTFactory factory, HqlExpression expression) + : base(HqlSqlWalker.AGGREGATE, "min", factory, expression) + { + } + } - public class HqlJoin : HqlStatement - { - public HqlJoin(IASTFactory factory, HqlExpression expression, HqlAlias @alias) : base(HqlSqlWalker.JOIN, "join", factory, expression, @alias) - { - } - } + public class HqlJoin : HqlStatement + { + public HqlJoin(IASTFactory factory, HqlExpression expression, HqlAlias @alias) : base(HqlSqlWalker.JOIN, "join", factory, expression, @alias) + { + } + } - public class HqlLeftJoin : HqlTreeNode - { - public HqlLeftJoin(IASTFactory factory, HqlExpression expression, HqlAlias @alias) : base(HqlSqlWalker.JOIN, "join", factory, new HqlLeft(factory), expression, @alias) - { - } - } + public class HqlLeftJoin : HqlTreeNode + { + public HqlLeftJoin(IASTFactory factory, HqlExpression expression, HqlAlias @alias) : base(HqlSqlWalker.JOIN, "join", factory, new HqlLeft(factory), expression, @alias) + { + } + } - public class HqlFetchJoin : HqlTreeNode - { - public HqlFetchJoin(IASTFactory factory, HqlExpression expression, HqlAlias @alias) - : base(HqlSqlWalker.JOIN, "join", factory, new HqlFetch(factory), expression, @alias) - { - } - } + public class HqlFetchJoin : HqlTreeNode + { + public HqlFetchJoin(IASTFactory factory, HqlExpression expression, HqlAlias @alias) + : base(HqlSqlWalker.JOIN, "join", factory, new HqlFetch(factory), expression, @alias) + { + } + } - public class HqlLeftFetchJoin : HqlTreeNode - { - public HqlLeftFetchJoin(IASTFactory factory, HqlExpression ... [truncated message content] |
From: <jul...@us...> - 2010-12-03 09:20:32
|
Revision: 5287 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5287&view=rev Author: julian-maughan Date: 2010-12-03 09:20:26 +0000 (Fri, 03 Dec 2010) Log Message: ----------- Typo correction Modified Paths: -------------- trunk/nhibernate/doc/reference/modules/persistent_classes.xml Modified: trunk/nhibernate/doc/reference/modules/persistent_classes.xml =================================================================== --- trunk/nhibernate/doc/reference/modules/persistent_classes.xml 2010-12-02 11:46:19 UTC (rev 5286) +++ trunk/nhibernate/doc/reference/modules/persistent_classes.xml 2010-12-03 09:20:26 UTC (rev 5287) @@ -181,7 +181,7 @@ </para> <para> - Even if both objecs <literal>a</literal> and <literal>b</literal> are the same database row + Even if both objects <literal>a</literal> and <literal>b</literal> are the same database row (they have the same primary key value as their identifier), we can't guarantee that they are the same object instance outside of a particular <literal>ISession</literal> context. </para> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jul...@us...> - 2010-12-02 11:46:25
|
Revision: 5286 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5286&view=rev Author: julian-maughan Date: 2010-12-02 11:46:19 +0000 (Thu, 02 Dec 2010) Log Message: ----------- Minor tidy-ups following on from r5267. No functional changes. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Criterion/BetweenExpression.cs trunk/nhibernate/src/NHibernate/Criterion/InExpression.cs trunk/nhibernate/src/NHibernate/Engine/QueryParameters.cs trunk/nhibernate/src/NHibernate/Loader/Criteria/CriteriaQueryTranslator.cs trunk/nhibernate/src/NHibernate/Type/TypeHelper.cs Modified: trunk/nhibernate/src/NHibernate/Criterion/BetweenExpression.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Criterion/BetweenExpression.cs 2010-12-01 16:03:31 UTC (rev 5285) +++ trunk/nhibernate/src/NHibernate/Criterion/BetweenExpression.cs 2010-12-02 11:46:19 UTC (rev 5286) @@ -20,9 +20,9 @@ /// <summary> /// Initializes a new instance of the <see cref="BetweenExpression"/> class. /// </summary> - /// <param name="_projection">The _projection.</param> - /// <param name="_lo">The _lo.</param> - /// <param name="_hi">The _hi.</param> + /// <param name="projection">The _projection.</param> + /// <param name="lo">The _lo.</param> + /// <param name="hi">The _hi.</param> public BetweenExpression(IProjection projection, object lo, object hi) { this._projection = projection; Modified: trunk/nhibernate/src/NHibernate/Criterion/InExpression.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Criterion/InExpression.cs 2010-12-01 16:03:31 UTC (rev 5285) +++ trunk/nhibernate/src/NHibernate/Criterion/InExpression.cs 2010-12-02 11:46:19 UTC (rev 5286) @@ -26,7 +26,7 @@ /// Initializes a new instance of the <see cref="InExpression"/> class. /// </summary> /// <param name="projection">The projection.</param> - /// <param name="_values">The _values.</param> + /// <param name="values">The _values.</param> public InExpression(IProjection projection, object[] values) { _projection = projection; Modified: trunk/nhibernate/src/NHibernate/Engine/QueryParameters.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Engine/QueryParameters.cs 2010-12-01 16:03:31 UTC (rev 5285) +++ trunk/nhibernate/src/NHibernate/Engine/QueryParameters.cs 2010-12-02 11:46:19 UTC (rev 5286) @@ -43,7 +43,6 @@ private bool _readOnly; private int? limitParameterIndex = null; private int? offsetParameterIndex = null; - private int wildcardSubqueryLimitParameterIndex = -1; private IDictionary<int, int> _adjustedParameterLocations; private IDictionary<int, int> _tempPagingParameterIndexes; private IDictionary<int, int> _pagingParameterIndexMap; Modified: trunk/nhibernate/src/NHibernate/Loader/Criteria/CriteriaQueryTranslator.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Loader/Criteria/CriteriaQueryTranslator.cs 2010-12-01 16:03:31 UTC (rev 5285) +++ trunk/nhibernate/src/NHibernate/Loader/Criteria/CriteriaQueryTranslator.cs 2010-12-02 11:46:19 UTC (rev 5286) @@ -20,12 +20,15 @@ { public static readonly string RootSqlAlias = CriteriaSpecification.RootAlias + '_'; + private static readonly IInternalLogger logger = LoggerProvider.LoggerFor(typeof(CriteriaQueryTranslator)); + + private const int AliasCount = 0; + private readonly ICriteriaQuery outerQueryTranslator; - private readonly CriteriaImpl rootCriteria; private readonly string rootEntityName; private readonly string rootSQLAlias; - private const int aliasCount = 0; + private int indexForAlias = 0; private int _tempPagingParameterIndex = -1; private IDictionary<int, int> _tempPagingParameterIndexes = new Dictionary<int, int>(); @@ -36,18 +39,12 @@ new Dictionary<string, ICriteriaInfoProvider>(); private readonly ISet<ICollectionPersister> criteriaCollectionPersisters = new HashedSet<ICollectionPersister>(); - private readonly IDictionary<ICriteria, string> criteriaSQLAliasMap = new Dictionary<ICriteria, string>(); private readonly IDictionary<string, ICriteria> aliasCriteriaMap = new Dictionary<string, ICriteria>(); private readonly IDictionary<string, ICriteria> associationPathCriteriaMap = new LinkedHashMap<string, ICriteria>(); private readonly IDictionary<string, JoinType> associationPathJoinTypesMap = new LinkedHashMap<string, JoinType>(); private readonly IDictionary<string, ICriterion> withClauseMap = new Dictionary<string, ICriterion>(); - private readonly ISessionFactoryImplementor sessionFactory; - private int indexForAlias = 0; - private static readonly IInternalLogger logger = LoggerProvider.LoggerFor(typeof(CriteriaQueryTranslator)); - - private readonly List<TypedValue> usedTypedValues = new List<TypedValue>(); private SessionFactoryHelper helper; public CriteriaQueryTranslator(ISessionFactoryImplementor factory, CriteriaImpl criteria, string rootEntityName, @@ -282,7 +279,7 @@ public string GenerateSQLAlias() { - return StringHelper.GenerateAlias(rootSQLAlias, aliasCount); + return StringHelper.GenerateAlias(rootSQLAlias, AliasCount); } private ICriteria GetAliasedCriteria(string alias) Modified: trunk/nhibernate/src/NHibernate/Type/TypeHelper.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Type/TypeHelper.cs 2010-12-01 16:03:31 UTC (rev 5285) +++ trunk/nhibernate/src/NHibernate/Type/TypeHelper.cs 2010-12-02 11:46:19 UTC (rev 5286) @@ -205,8 +205,8 @@ /// <para>If it is determined that no fields are dirty, null is returned.</para> /// </summary> /// <param name="properties">The property definitions</param> - /// <param name="x">The current state of the entity</param> - /// <param name="y">The baseline state of the entity</param> + /// <param name="currentState">The current state of the entity</param> + /// <param name="previousState">The baseline state of the entity</param> /// <param name="includeColumns">Columns to be included in the dirty checking, per property</param> /// <param name="anyUninitializedProperties">Does the entity currently hold any uninitialized property values?</param> /// <param name="session">The session from which the dirty check request originated.</param> @@ -256,8 +256,8 @@ /// <para>If it is determined that no fields are dirty, null is returned.</para> /// </summary> /// <param name="properties">The property definitions</param> - /// <param name="x">The current state of the entity</param> - /// <param name="y">The baseline state of the entity</param> + /// <param name="currentState">The current state of the entity</param> + /// <param name="previousState">The baseline state of the entity</param> /// <param name="includeColumns">Columns to be included in the mod checking, per property</param> /// <param name="anyUninitializedProperties">Does the entity currently hold any uninitialized property values?</param> /// <param name="session">The session from which the dirty check request originated.</param> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jul...@us...> - 2010-12-01 16:03:38
|
Revision: 5285 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5285&view=rev Author: julian-maughan Date: 2010-12-01 16:03:31 +0000 (Wed, 01 Dec 2010) Log Message: ----------- Fix to correctly set the IsInActiveTransaction property of a Session's TransactionContext, on TransactionCompletion. This prevent an exception from being thrown by ConnectionManager.Disconnect. Occurs when a database connection enlisted in a distributed transaction is passed to the NHibernate Session (ref. NH-2420) Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Transaction/AdoNetWithDistributedTransactionFactory.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/DummyEnlistment.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/MyTable.cs Modified: trunk/nhibernate/src/NHibernate/Transaction/AdoNetWithDistributedTransactionFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Transaction/AdoNetWithDistributedTransactionFactory.cs 2010-11-29 12:59:16 UTC (rev 5284) +++ trunk/nhibernate/src/NHibernate/Transaction/AdoNetWithDistributedTransactionFactory.cs 2010-12-01 16:03:31 UTC (rev 5285) @@ -42,6 +42,8 @@ { using (new SessionIdLoggingContext(session.SessionId)) { + ((DistributedTransactionContext)session.TransactionContext).IsInActiveTransaction = false; + bool wasSuccessful = false; try { @@ -134,7 +136,7 @@ using (new SessionIdLoggingContext(sessionImplementor.SessionId)) { logger.Debug("committing DTC transaction"); - // we have nothing to do here, since it is the actual + // we have nothing to do here, since it is the actual // DB connection that will commit the transaction enlistment.Done(); IsInActiveTransaction = false; Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/DummyEnlistment.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/DummyEnlistment.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/DummyEnlistment.cs 2010-12-01 16:03:31 UTC (rev 5285) @@ -0,0 +1,30 @@ +using System; +using System.Transactions; + +namespace NHibernate.Test.NHSpecificTest.NH2420 +{ + public class DummyEnlistment : IEnlistmentNotification + { + public static readonly Guid Id = new Guid("E2D35055-4187-4ff5-82A1-F1F161A008D0"); + + public void Prepare(PreparingEnlistment preparingEnlistment) + { + preparingEnlistment.Prepared(); + } + + public void Commit(Enlistment enlistment) + { + enlistment.Done(); + } + + public void Rollback(Enlistment enlistment) + { + enlistment.Done(); + } + + public void InDoubt(Enlistment enlistment) + { + enlistment.Done(); + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/Fixture.cs 2010-12-01 16:03:31 UTC (rev 5285) @@ -0,0 +1,69 @@ +using System.Data; +using System.Data.SqlClient; +using System.Transactions; + +using NHibernate.Criterion; +using NHibernate.Dialect; +using NUnit.Framework; + +namespace NHibernate.Test.NHSpecificTest.NH2420 +{ + [TestFixture] + public class Fixture : BugTestCase + { + public override string BugNumber + { + get { return "NH2420"; } + } + + protected override bool AppliesTo(NHibernate.Dialect.Dialect dialect) + { + return (dialect is NHibernate.Dialect.MsSql2008Dialect || dialect is NHibernate.Dialect.MsSql2005Dialect); + } + + [Test] + [Explicit("Requires the Microsoft DTC service. Also, the exception thrown by this test when it fails is on a ThreadPool thread which is not visible to NUnit. So although the test accurately reproduces the issue, it passes anyway.")] + public void Bug() + { + string connectionString = cfg.GetProperty("connection.connection_string"); + int id = -1; + + using (TransactionScope ts = new TransactionScope()) + { + // Enlisting DummyEnlistment as a durable resource manager will start + // a DTC transaction + System.Transactions.Transaction.Current.EnlistDurable( + DummyEnlistment.Id, + new DummyEnlistment(), + EnlistmentOptions.None); + + using (IDbConnection connection = new SqlConnection(connectionString)) + { + connection.Open(); + using (ISession s = Sfi.OpenSession(connection)) + { + id = (int)s.Save(new MyTable() { String = "hello!" }); + } + connection.Close(); + } + + // Prior to the patch, an InvalidOperationException exception would occur in the + // TransactionCompleted delegate at this point with the message, "Disconnect cannot + // be called while a transaction is in progress". Although the exception can be + // seen reported in the IDE, NUnit fails to see it, and the test passes. The + // TransactionCompleted event fires *after* the transaction is committed and so + // it doesn't affect the success of the transaction + ts.Complete(); + } + } + + protected override void OnTearDown() + { + using (ISession s = OpenSession()) + { + s.Delete("from MyTable"); + s.Flush(); + } + } + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/Mappings.hbm.xml 2010-12-01 16:03:31 UTC (rev 5285) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping + xmlns="urn:nhibernate-mapping-2.2" + assembly="NHibernate.Test" + namespace="NHibernate.Test.NHSpecificTest.NH2420"> + + <class name="MyTable" table="MyTable"> + <id name="Id"> + <generator class="native" /> + </id> + <property name="String"/> + </class> + +</hibernate-mapping> \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/MyTable.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/MyTable.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2420/MyTable.cs 2010-12-01 16:03:31 UTC (rev 5285) @@ -0,0 +1,10 @@ +using System; + +namespace NHibernate.Test.NHSpecificTest.NH2420 +{ + public class MyTable + { + public virtual int Id { get; private set; } + public virtual string String { get; set; } + } +} \ No newline at end of file Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-11-29 12:59:16 UTC (rev 5284) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-12-01 16:03:31 UTC (rev 5285) @@ -556,6 +556,9 @@ <Compile Include="NHSpecificTest\NH2409\Message.cs" /> <Compile Include="NHSpecificTest\NH2409\MessageReading.cs" /> <Compile Include="NHSpecificTest\NH2409\User.cs" /> + <Compile Include="NHSpecificTest\NH2420\DummyEnlistment.cs" /> + <Compile Include="NHSpecificTest\NH2420\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2420\MyTable.cs" /> <Compile Include="PolymorphicGetAndLoad\Domain.cs" /> <Compile Include="PolymorphicGetAndLoad\PolymorphicGetAndLoadTest.cs" /> <Compile Include="TypesTest\CharClass.cs" /> @@ -1849,6 +1852,7 @@ <EmbeddedResource Include="NHSpecificTest\NH1869\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2392\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2409\Mappings.hbm.xml" /> + <EmbeddedResource Include="NHSpecificTest\NH2420\Mappings.hbm.xml" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\NHibernate.ByteCode.Castle\NHibernate.ByteCode.Castle.csproj"> @@ -2715,6 +2719,7 @@ <EmbeddedResource Include="DynamicEntity\Tuplizer\Customer.hbm.xml" /> </ItemGroup> <ItemGroup> + <Folder Include="NHSpecificTest\NH2420" /> <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-11-29 12:59:22
|
Revision: 5284 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5284&view=rev Author: fabiomaulo Date: 2010-11-29 12:59:16 +0000 (Mon, 29 Nov 2010) Log Message: ----------- Fixed compilation errors Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/Linq/NullComparisonTests.cs Modified: trunk/nhibernate/src/NHibernate.Test/Linq/NullComparisonTests.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/Linq/NullComparisonTests.cs 2010-11-29 02:29:12 UTC (rev 5283) +++ trunk/nhibernate/src/NHibernate.Test/Linq/NullComparisonTests.cs 2010-11-29 12:59:16 UTC (rev 5284) @@ -293,8 +293,8 @@ private void Expect(IQueryable<AnotherEntity> q, params AnotherEntity[] entities) { - IList<AnotherEntity> results = q.ToList().OrderBy(Key).ToList(); - IList<AnotherEntity> check = entities.OrderBy(Key).ToList(); + IList<AnotherEntity> results = q.ToList().OrderBy(l=> Key(l)).ToList(); + IList<AnotherEntity> check = entities.OrderBy(l => Key(l)).ToList(); Assert.AreEqual(check.Count, results.Count); for(int i=0; i<check.Count; i++) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2010-11-29 02:29:18
|
Revision: 5283 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5283&view=rev Author: patearl Date: 2010-11-29 02:29:12 +0000 (Mon, 29 Nov 2010) Log Message: ----------- Added test for component equality in Linq. (NH-2244) Also allowed VS to remove a couple useless lines from the project. Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/A.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/PhoneNumber.cs Copied: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/A.cs (from rev 5280, trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/A.cs) =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/A.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/A.cs 2010-11-29 02:29:12 UTC (rev 5283) @@ -0,0 +1,11 @@ +using System; +using System.Collections; + +namespace NHibernate.Test.NHSpecificTest.NH2244 +{ + public class A + { + public int? Id { get; set; } + public PhoneNumber Phone { get; set; } + } +} Copied: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/Fixture.cs (from rev 5280, trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/Fixture.cs) =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/Fixture.cs 2010-11-29 02:29:12 UTC (rev 5283) @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using NHibernate.Criterion; +using NUnit.Framework; +using NHibernate.Linq; +using System.Linq; +using NHibernate.Linq.Functions; + +namespace NHibernate.Test.NHSpecificTest.NH2244 +{ + [TestFixture] + public class Fixture : BugTestCase + { + protected override void OnTearDown() + { + using (ISession s = sessions.OpenSession()) + { + s.Delete("from A"); + s.Flush(); + } + } + + [Test] + public void LinqComponentTypeEquality() + { + ISession s = OpenSession(); + try + { + s.Save(new A { Phone = new PhoneNumber(1, "555-1111") }); + s.Save(new A { Phone = new PhoneNumber(1, "555-2222") }); + s.Save(new A { Phone = new PhoneNumber(1, "555-3333") }); + s.Flush(); + } + finally + { + s.Close(); + } + + s = OpenSession(); + try + { + A item = s.Query<A>().Where(a => a.Phone == new PhoneNumber(1, "555-2222")).Single(); + Assert.AreEqual("555-2222", item.Phone.Number); + } + finally + { + s.Close(); + } + } + } +} Copied: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/Mappings.hbm.xml (from rev 5280, trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/Mappings.hbm.xml) =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/Mappings.hbm.xml 2010-11-29 02:29:12 UTC (rev 5283) @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" namespace="NHibernate.Test.NHSpecificTest.NH2244"> + <class name="A" lazy="false"> + <id name="Id" column="id" unsaved-value="null"> + <generator class="native" /> + </id> + <component name="Phone" class="PhoneNumber"> + <property name="CountryCode"/> + <property name="Number"/> + </component> + </class> +</hibernate-mapping> Copied: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/PhoneNumber.cs (from rev 5280, trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/PhoneNumber.cs) =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/PhoneNumber.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2244/PhoneNumber.cs 2010-11-29 02:29:12 UTC (rev 5283) @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NHibernate.Test.NHSpecificTest.NH2244 +{ + public class PhoneNumber + { + public PhoneNumber() + { + + } + + public PhoneNumber(int countryCode, string number) + { + CountryCode = countryCode; + Number = number; + } + + public int CountryCode { get; set; } + public string Number { get; set; } + } +} Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-11-28 21:02:39 UTC (rev 5282) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-11-29 02:29:12 UTC (rev 5283) @@ -494,6 +494,9 @@ <Compile Include="NHSpecificTest\NH2202\Model.cs" /> <Compile Include="NHSpecificTest\NH2224\Domain.cs" /> <Compile Include="NHSpecificTest\NH2224\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2244\A.cs" /> + <Compile Include="NHSpecificTest\NH2244\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2244\PhoneNumber.cs" /> <Compile Include="NHSpecificTest\NH2245\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2245\Model.cs" /> <Compile Include="NHSpecificTest\NH2266\Domain.cs" /> @@ -2334,6 +2337,7 @@ <EmbeddedResource Include="NHSpecificTest\NH1291AnonExample\Mappings.hbm.xml" /> </ItemGroup> <ItemGroup> + <EmbeddedResource Include="NHSpecificTest\NH2244\Mappings.hbm.xml" /> <EmbeddedResource Include="NHSpecificTest\NH2394\Mappings.hbm.xml" /> <EmbeddedResource Include="DynamicEntity\Interceptor\Customer.hbm.xml" /> <EmbeddedResource Include="Any\Person.hbm.xml" /> @@ -2711,8 +2715,6 @@ <EmbeddedResource Include="DynamicEntity\Tuplizer\Customer.hbm.xml" /> </ItemGroup> <ItemGroup> - <Folder Include="NHSpecificTest\NH2392" /> - <Folder Include="NHSpecificTest\NH2409" /> <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: <pa...@us...> - 2010-11-28 21:02:47
|
Revision: 5282 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5282&view=rev Author: patearl Date: 2010-11-28 21:02:39 +0000 (Sun, 28 Nov 2010) Log Message: ----------- Linq: Enabled a previously ignored test (NH-2234). Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2234/Fixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2234/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2234/Fixture.cs 2010-11-28 20:40:57 UTC (rev 5281) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2234/Fixture.cs 2010-11-28 21:02:39 UTC (rev 5282) @@ -11,7 +11,7 @@ public virtual MyUsertype Relation { get; set; } } - [TestFixture, Ignore("Not fixed yet.")] + [TestFixture] public class Fixture: BugTestCase { [Test] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2010-11-28 20:41:04
|
Revision: 5281 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5281&view=rev Author: patearl Date: 2010-11-28 20:40:57 +0000 (Sun, 28 Nov 2010) Log Message: ----------- Backed out the ContextualNhExpressionTreeVisitor from revision 5276. I discovered a simpler implementation strategy and didn't need the context anymore. Revision Links: -------------- http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5276&view=rev Modified Paths: -------------- trunk/nhibernate/src/NHibernate/NHibernate.csproj Removed Paths: ------------- trunk/nhibernate/src/NHibernate/Linq/Visitors/ContextualNhExpressionTreeVisitor.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/VisitorContext.cs Deleted: trunk/nhibernate/src/NHibernate/Linq/Visitors/ContextualNhExpressionTreeVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/ContextualNhExpressionTreeVisitor.cs 2010-11-28 20:14:01 UTC (rev 5280) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/ContextualNhExpressionTreeVisitor.cs 2010-11-28 20:40:57 UTC (rev 5281) @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Text; -using NHibernate.Linq.Visitors; - -namespace NHibernate.Linq -{ - public class ContextualNhExpressionTreeVisitor : NhExpressionTreeVisitor - { - private Stack<VisitorContext> _contextStack; - - public ContextualNhExpressionTreeVisitor() - { - _contextStack = new Stack<VisitorContext>(); - _contextStack.Push(null); - } - - public override Expression VisitExpression(Expression expression) - { - if (expression == null) - return null; - - VisitorContext context = new VisitorContext(_contextStack.Peek(), expression); - _contextStack.Push(context); - - Expression result = base.VisitExpression(expression); - - _contextStack.Pop(); - - return result; - } - - protected VisitorContext Context - { - get { return _contextStack.Peek(); } - } - } -} Deleted: trunk/nhibernate/src/NHibernate/Linq/Visitors/VisitorContext.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/VisitorContext.cs 2010-11-28 20:14:01 UTC (rev 5280) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/VisitorContext.cs 2010-11-28 20:40:57 UTC (rev 5281) @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Text; - -namespace NHibernate.Linq.Visitors -{ - public class VisitorContext - { - public VisitorContext(VisitorContext parent, Expression expression) - { - Parent = parent; - Expression = expression; - } - - public VisitorContext Parent { get; private set; } - public Expression Expression { get; private set; } - } -} Modified: trunk/nhibernate/src/NHibernate/NHibernate.csproj =================================================================== --- trunk/nhibernate/src/NHibernate/NHibernate.csproj 2010-11-28 20:14:01 UTC (rev 5280) +++ trunk/nhibernate/src/NHibernate/NHibernate.csproj 2010-11-28 20:40:57 UTC (rev 5281) @@ -241,8 +241,6 @@ <Compile Include="ISessionFactory.cs" /> <Compile Include="ITransaction.cs" /> <Compile Include="LazyInitializationException.cs" /> - <Compile Include="Linq\Visitors\ContextualNhExpressionTreeVisitor.cs" /> - <Compile Include="Linq\Visitors\VisitorContext.cs" /> <Compile Include="Loader\Loader.cs" /> <Compile Include="Loader\OuterJoinLoader.cs" /> <Compile Include="LockMode.cs" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2010-11-28 20:14:08
|
Revision: 5280 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5280&view=rev Author: patearl Date: 2010-11-28 20:14:01 +0000 (Sun, 28 Nov 2010) Log Message: ----------- Linq: Let HQL figure out the type of non-null parameters. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionParameterVisitor.cs trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj Added Paths: ----------- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/A.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/EnumStringUserType.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/Fixture.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/Mappings.hbm.xml trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/PhoneNumber.cs trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/PhoneNumberUserType.cs Modified: trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs 2010-11-28 19:18:45 UTC (rev 5279) +++ trunk/nhibernate/src/NHibernate/Linq/NhQueryProvider.cs 2010-11-28 20:14:01 UTC (rev 5280) @@ -137,9 +137,13 @@ { query.SetParameterList(parameterName, (ICollection) param.First); } + else if (param.Second != null) + { + query.SetParameter(parameterName, param.First, param.Second); + } else { - query.SetParameter(parameterName, param.First); + query.SetParameter(parameterName, param.First); } } } Modified: trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionParameterVisitor.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionParameterVisitor.cs 2010-11-28 19:18:45 UTC (rev 5279) +++ trunk/nhibernate/src/NHibernate/Linq/Visitors/ExpressionParameterVisitor.cs 2010-11-28 20:14:01 UTC (rev 5280) @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; +using NHibernate.Type; namespace NHibernate.Linq.Visitors { @@ -25,7 +26,20 @@ { if (!typeof(IQueryable).IsAssignableFrom(expression.Type) && !IsNullObject(expression)) { - _parameters.Add(expression, new NamedParameter("p" + (_parameters.Count + 1), expression.Value, NHibernateUtil.GuessType(expression.Type))); + // We use null for the type to indicate that the caller should let HQL figure it out. + IType type = null; + + // We have a bit more information about the null parameter value. + // Figure out a type so that HQL doesn't break on the null. (Related to NH-2430) + if (expression.Value == null) + type = NHibernateUtil.GuessType(expression.Type); + + // There is more information available in the Linq expression than to HQL directly. + // In some cases it might be advantageous to use the extra info. Assuming this + // comes up, it would be nice to combine the HQL parameter type determination code + // and the Expression information. + + _parameters.Add(expression, new NamedParameter("p" + (_parameters.Count + 1), expression.Value, type)); } return base.VisitConstantExpression(expression); Property changes on: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394 ___________________________________________________________________ Added: bugtraq:url + http://jira.nhibernate.org/browse/%BUGID% Added: bugtraq:logregex + NH-\d+ Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/A.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/A.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/A.cs 2010-11-28 20:14:01 UTC (rev 5280) @@ -0,0 +1,30 @@ +using System; +using System.Collections; + +namespace NHibernate.Test.NHSpecificTest.NH2394 +{ + public interface IA + { + int? Id { get; set; } + TypeOfA Type { get; set; } + TypeOfA? NullableType { get; set; } + PhoneNumber Phone { get; set; } + bool IsNice { get; set; } + } + + public class A : IA + { + public int? Id { get; set; } + public TypeOfA Type { get; set; } + public TypeOfA? NullableType { get; set; } + public PhoneNumber Phone { get; set; } + public bool IsNice { get; set; } + } + + public enum TypeOfA + { + Awesome, + Boring, + Cool + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/EnumStringUserType.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/EnumStringUserType.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/EnumStringUserType.cs 2010-11-28 20:14:01 UTC (rev 5280) @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using NHibernate.SqlTypes; +using NHibernate.Type; +using NHibernate.UserTypes; + +namespace NHibernate.Test.NHSpecificTest.NH2394 +{ + public class EnumStringUserType : EnumStringType<TypeOfA> + { + } +} \ No newline at end of file Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/Fixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/Fixture.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/Fixture.cs 2010-11-28 20:14:01 UTC (rev 5280) @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using NHibernate.Criterion; +using NUnit.Framework; +using NHibernate.Linq; +using System.Linq; +using NHibernate.Linq.Functions; + +namespace NHibernate.Test.NHSpecificTest.NH2394 +{ + [TestFixture] + public class Fixture : BugTestCase + { + protected override void OnTearDown() + { + using (ISession s = sessions.OpenSession()) + { + s.Delete("from A"); + s.Flush(); + } + } + + [Test] + public void LinqUserTypeEquality() + { + ISession s = OpenSession(); + try + { + s.Save(new A { Type = TypeOfA.Awesome, Phone = new PhoneNumber(1, "555-1111") }); + s.Save(new A { Type = TypeOfA.Boring, NullableType = TypeOfA.Awesome, Phone = new PhoneNumber(1, "555-2222") }); + s.Save(new A { Type = TypeOfA.Cool, Phone = new PhoneNumber(1, "555-3333") }); + s.Flush(); + } + finally + { + s.Close(); + } + + s = OpenSession(); + try + { + A item; + + Assert.AreEqual(3, s.CreateQuery("from A a where a.IsNice = ?").SetParameter(0, false).List().Count); + Assert.AreEqual(3, s.Query<A>().Count(a => a.IsNice == false)); + + item = s.CreateQuery("from A a where a.Type = ?").SetParameter(0, TypeOfA.Awesome).UniqueResult<A>(); + Assert.AreEqual(TypeOfA.Awesome, item.Type); + Assert.AreEqual("555-1111", item.Phone.Number); + + item = s.Query<A>().Where(a => a.Type == TypeOfA.Awesome).Single(); + Assert.AreEqual(TypeOfA.Awesome, item.Type); + Assert.AreEqual("555-1111", item.Phone.Number); + + item = s.Query<A>().Where(a => TypeOfA.Awesome == a.Type).Single(); + Assert.AreEqual(TypeOfA.Awesome, item.Type); + Assert.AreEqual("555-1111", item.Phone.Number); + + IA interfaceItem = s.Query<IA>().Where(a => a.Type == TypeOfA.Awesome).Single(); + Assert.AreEqual(TypeOfA.Awesome, interfaceItem.Type); + Assert.AreEqual("555-1111", interfaceItem.Phone.Number); + + item = s.CreateQuery("from A a where a.NullableType = ?").SetParameter(0, TypeOfA.Awesome).UniqueResult<A>(); + Assert.AreEqual(TypeOfA.Boring, item.Type); + Assert.AreEqual("555-2222", item.Phone.Number); + Assert.AreEqual(TypeOfA.Awesome, item.NullableType); + + item = s.Query<A>().Where(a => a.NullableType == TypeOfA.Awesome).Single(); + Assert.AreEqual(TypeOfA.Boring, item.Type); + Assert.AreEqual("555-2222", item.Phone.Number); + Assert.AreEqual(TypeOfA.Awesome, item.NullableType); + + Assert.AreEqual(2, s.Query<A>().Count(a => a.NullableType == null)); + + item = s.CreateQuery("from A a where a.Phone = ?").SetParameter(0, new PhoneNumber(1, "555-2222")).UniqueResult<A>(); + Assert.AreEqual(TypeOfA.Boring, item.Type); + Assert.AreEqual("555-2222", item.Phone.Number); + + item = s.Query<A>().Where(a => a.Phone == new PhoneNumber(1, "555-2222")).Single(); + Assert.AreEqual(TypeOfA.Boring, item.Type); + Assert.AreEqual("555-2222", item.Phone.Number); + } + finally + { + s.Close(); + } + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/Mappings.hbm.xml =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/Mappings.hbm.xml (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/Mappings.hbm.xml 2010-11-28 20:14:01 UTC (rev 5280) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" namespace="NHibernate.Test.NHSpecificTest.NH2394"> + <class name="A" table="a" lazy="false" optimistic-lock="dirty" dynamic-update="true"> + <id name="Id" column="id" unsaved-value="null"> + <generator class="native" /> + </id> + <property name="Phone" type="NHibernate.Test.NHSpecificTest.NH2394.PhoneNumberUserType, NHibernate.Test"> + <column name="PhoneCountryCode"/> + <column name="PhoneNumber"/> + </property> + <property name="Type" type="NHibernate.Test.NHSpecificTest.NH2394.EnumStringUserType, NHibernate.Test"/> + <property name="NullableType" type="NHibernate.Test.NHSpecificTest.NH2394.EnumStringUserType, NHibernate.Test"/> + <property name="IsNice" type="TrueFalse"/> + </class> +</hibernate-mapping> Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/PhoneNumber.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/PhoneNumber.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/PhoneNumber.cs 2010-11-28 20:14:01 UTC (rev 5280) @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NHibernate.Test.NHSpecificTest.NH2394 +{ + public class PhoneNumber + { + public PhoneNumber(int countryCode, string number) + { + CountryCode = countryCode; + Number = number; + } + + public int CountryCode { get; private set; } + public string Number { get; private set; } + + public override bool Equals(object obj) + { + if (obj == null) + return false; + + if (obj.GetType() != GetType()) + return false; + + PhoneNumber that = (PhoneNumber) obj; + + return + CountryCode == that.CountryCode && + Number == that.Number; + } + + public override int GetHashCode() + { + return CountryCode.GetHashCode() ^ (Number ?? "").GetHashCode(); + } + } +} Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/PhoneNumberUserType.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/PhoneNumberUserType.cs (rev 0) +++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2394/PhoneNumberUserType.cs 2010-11-28 20:14:01 UTC (rev 5280) @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using NHibernate.Engine; +using NHibernate.Type; +using NHibernate.UserTypes; + +namespace NHibernate.Test.NHSpecificTest.NH2394 +{ + class PhoneNumberUserType : ICompositeUserType + { + public string[] PropertyNames + { + get { return new[] { "CountryCode", "Number" }; } + } + + public IType[] PropertyTypes + { + get { return new[] { NHibernateUtil.Int32, NHibernateUtil.String }; } + } + + public object GetPropertyValue(object component, int property) + { + PhoneNumber phone = (PhoneNumber)component; + + switch (property) + { + case 0: return phone.CountryCode; + case 1: return phone.Number; + default: throw new NotImplementedException(); + } + } + + public void SetPropertyValue(object component, int property, object value) + { + throw new NotImplementedException(); + } + + public System.Type ReturnedClass + { + get { return typeof(PhoneNumber); } + } + + bool ICompositeUserType.Equals(object x, object y) + { + if (ReferenceEquals(x, null) && ReferenceEquals(y, null)) + return true; + + if (ReferenceEquals(x, null) || ReferenceEquals(y, null)) + return false; + + return x.Equals(y); + } + + public int GetHashCode(object x) + { + return x.GetHashCode(); + } + + public object NullSafeGet(IDataReader dr, string[] names, ISessionImplementor session, object owner) + { + if (dr.IsDBNull(dr.GetOrdinal(names[0]))) + return null; + + return new PhoneNumber( + (int)NHibernateUtil.Int32.NullSafeGet(dr, names[0], session, owner), + (string)NHibernateUtil.String.NullSafeGet(dr, names[1], session, owner)); + } + + public void NullSafeSet(IDbCommand cmd, object value, int index, bool[] settable, ISessionImplementor session) + { + object countryCode = value == null ? null : (int?)((PhoneNumber)value).CountryCode; + object number = value == null ? null : ((PhoneNumber)value).Number; + + if (settable[0]) NHibernateUtil.Int32.NullSafeSet(cmd, countryCode, index++, session); + if (settable[1]) NHibernateUtil.String.NullSafeSet(cmd, number, index, session); + } + + public object DeepCopy(object value) + { + return value; + } + + public bool IsMutable + { + get { return false; } + } + + public object Disassemble(object value, ISessionImplementor session) + { + return value; + } + + public object Assemble(object cached, ISessionImplementor session, object owner) + { + return cached; + } + + public object Replace(object original, object target, ISessionImplementor session, object owner) + { + return original; + } + } +} Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj =================================================================== --- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-11-28 19:18:45 UTC (rev 5279) +++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2010-11-28 20:14:01 UTC (rev 5280) @@ -543,6 +543,11 @@ <Compile Include="NHSpecificTest\NH2392\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2392\PhoneNumber.cs" /> <Compile Include="NHSpecificTest\NH2392\PhoneNumberUserType.cs" /> + <Compile Include="NHSpecificTest\NH2394\A.cs" /> + <Compile Include="NHSpecificTest\NH2394\EnumStringUserType.cs" /> + <Compile Include="NHSpecificTest\NH2394\Fixture.cs" /> + <Compile Include="NHSpecificTest\NH2394\PhoneNumber.cs" /> + <Compile Include="NHSpecificTest\NH2394\PhoneNumberUserType.cs" /> <Compile Include="NHSpecificTest\NH2409\Contest.cs" /> <Compile Include="NHSpecificTest\NH2409\Fixture.cs" /> <Compile Include="NHSpecificTest\NH2409\Message.cs" /> @@ -2329,6 +2334,7 @@ <EmbeddedResource Include="NHSpecificTest\NH1291AnonExample\Mappings.hbm.xml" /> </ItemGroup> <ItemGroup> + <EmbeddedResource Include="NHSpecificTest\NH2394\Mappings.hbm.xml" /> <EmbeddedResource Include="DynamicEntity\Interceptor\Customer.hbm.xml" /> <EmbeddedResource Include="Any\Person.hbm.xml" /> <EmbeddedResource Include="Any\Properties.hbm.xml" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pa...@us...> - 2010-11-28 19:18:52
|
Revision: 5279 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5279&view=rev Author: patearl Date: 2010-11-28 19:18:45 +0000 (Sun, 28 Nov 2010) Log Message: ----------- Fixed AbstractQueryImpl.VerifyParameters when used with composite type parameters. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Impl/AbstractQueryImpl.cs Modified: trunk/nhibernate/src/NHibernate/Impl/AbstractQueryImpl.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Impl/AbstractQueryImpl.cs 2010-11-28 19:12:13 UTC (rev 5278) +++ trunk/nhibernate/src/NHibernate/Impl/AbstractQueryImpl.cs 2010-11-28 19:18:45 UTC (rev 5279) @@ -108,7 +108,7 @@ throw new QueryException("Unset positional parameter at position: " + i, QueryString); } } - positionalValueSpan += ((IType)obj).GetColumnSpan(session.Factory); + positionalValueSpan++; } if (parameterMetadata.OrdinalParameterCount != positionalValueSpan) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |