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: Michael D. <mik...@us...> - 2004-07-15 19:05:22
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1832/NHibernate/Persister Modified Files: EntityPersister.cs Log Message: Fixed problem with Loading using LockModes because of missing columns with Forumlas. Index: EntityPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/EntityPersister.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** EntityPersister.cs 5 Jul 2004 19:19:00 -0000 1.19 --- EntityPersister.cs 15 Jul 2004 19:05:14 -0000 1.20 *************** *** 582,586 **** builder.SetTableName(TableName) .AddColumns(IdentifierColumnNames) ! .AddColumns(subclassColumnClosure, subclassColumnAliasClosure); if (HasSubclasses) builder.AddColumn(DiscriminatorColumnName); --- 582,587 ---- builder.SetTableName(TableName) .AddColumns(IdentifierColumnNames) ! .AddColumns(subclassColumnClosure, subclassColumnAliasClosure) ! .AddColumns(subclassFormulaClosure, subclassFormulaAliasClosure); if (HasSubclasses) builder.AddColumn(DiscriminatorColumnName); |
From: Michael D. <mik...@us...> - 2004-07-14 21:27:16
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10570/NHibernate.Test Modified Files: FooBarTest.cs Log Message: Implemented more tests. Index: FooBarTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FooBarTest.cs,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** FooBarTest.cs 13 Jul 2004 21:01:01 -0000 1.43 --- FooBarTest.cs 14 Jul 2004 21:27:05 -0000 1.44 *************** *** 1026,1032 **** [Test] ! [Ignore("Test not written yet.")] public void PersistCollections() { } --- 1026,1208 ---- [Test] ! //[Ignore("Test not written yet.")] public void PersistCollections() { + ISession s = sessions.OpenSession(); + + IEnumerator enumer = s.Enumerable("select count(*) from b in class Bar").GetEnumerator(); + enumer.MoveNext(); + Assert.AreEqual( 0, enumer.Current ); + + Baz baz = new Baz(); + s.Save(baz); + baz.SetDefaults(); + baz.StringArray = new string[] { "stuff" }; + IDictionary bars = new Hashtable(); + bars.Add( new Bar(), new object() ); + baz.CascadingBars = bars; + IDictionary sgm = new Hashtable(); + sgm["a"] = new Glarch(); + sgm["b"] = new Glarch(); + baz.StringGlarchMap = sgm; + s.Flush(); + s.Close(); + + s = sessions.OpenSession(); + baz = (Baz) ( (object[])s.Find("select baz, baz from baz in class NHibernate.DomainModel.Baz")[0] )[1]; + Foo foo = new Foo(); + s.Save(foo); + Foo foo2 = new Foo(); + s.Save(foo2); + baz.FooArray = new Foo[] { foo, foo, null, foo2 } ; + baz.FooSet.Add(foo, new object() ); + baz.Customs.Add( new string[] {"new", "custom"} ); + baz.StringArray = null; + baz.StringList[0] = "new value"; + baz.StringSet = new Hashtable(); + // TODO: baz.TimeArray[2] = new DateTime( + + Assert.AreEqual( 1, baz.StringGlarchMap.Count ); + IList list; + + // disable this for dbs with no subselects + if( !(dialect is Dialect.MySQLDialect) + // && !(dialect is Dialect.HSQLDialect) && !(dialect is Dialect.PointbaseDialect) + ) + { + list = s.Find("select foo from foo in class NHibernate.DomainModel.Foo, baz in class NHibernate.DomainModel.Baz where foo in baz.FooArray.elements and 3 = some baz.IntArray.elements and 4 > all baz.IntArray.indices"); + Assert.AreEqual( 2, list.Count, "collection.elements find" ); + } + + // sapdb doesn't like distinct with binary type + //if( !(dialect is Dialect.SAPDBDialect) ) + //{ + list = s.Find("select distinct foo from baz in class NHibernate.DomainModel.Baz, foo in baz.FooArray.elements"); + Assert.AreEqual( 2, list.Count, "collection.elements find" ); + //} + + list = s.Find("select foo from baz in class NHibernate.DomainModel.Baz, foo in baz.FooSet.elements"); + Assert.AreEqual( 1, list.Count, "association.elements find"); + + s.Flush(); + s.Close(); + + s = sessions.OpenSession(); + baz = (Baz)s.Find("select baz from baz in class NHibernate.DomainModel.Baz order by baz")[0]; + Assert.AreEqual(4, baz.Customs.Count, "collection of custom types - added element"); + Assert.IsNotNull(baz.Customs[0], "collection of custom types - added element"); + Assert.IsNotNull(baz.Components[1].Subcomponent, "component of component in collection"); + Assert.AreSame(baz, baz.Components[1].Baz); + + IEnumerator fooSetEnumer = baz.FooSet.Keys.GetEnumerator(); + fooSetEnumer.MoveNext(); + Assert.IsTrue( ((FooProxy)fooSetEnumer.Current).Key.Equals( foo.Key ) , "set of objects" ); + Assert.AreEqual( 0, baz.StringArray.Length, "collection removed" ); + Assert.AreEqual( "new value", baz.StringList[0], "changed element" ); + Assert.AreEqual( 0, baz.StringSet.Count, "replaced set" ); + // todo: populate time array + //Assert.IsNotNull( baz.TimeArray[2], "array element changed" ); + + baz.StringSet.Add( "two", new object() ); + baz.StringSet.Add( "one", new object() ); + baz.Bag.Add("three"); + s.Flush(); + s.Close(); + + s = sessions.OpenSession(); + baz = (Baz)s.Find("select baz from baz in class NHibernate.DomainModel.Baz order by baz")[0]; + Assert.AreEqual( 2, baz.StringSet.Count ); + int i = 0; + foreach(string key in baz.StringSet.Keys ) + { + // h2.0.3 doesn't have this because the Set has a first() and last() method + i++; + if(i==1) Assert.AreEqual( "one", key ); + if(i==2) Assert.AreEqual( "two", key ); + if(i>2) Assert.Fail("should not be more than 2 items in StringSet"); + } + Assert.AreEqual( 5, baz.Bag.Count ); + baz.StringSet.Remove("two"); + baz.Bag.Remove("duplicate"); + s.Flush(); + s.Close(); + + s = sessions.OpenSession(); + baz = (Baz)s.Load( typeof(Baz), baz.Code ); + Bar bar = new Bar(); + Bar bar2 = new Bar(); + s.Save(bar); + s.Save(bar2); + baz.TopFoos = new Hashtable(); + baz.TopFoos.Add( bar, new object() ); + baz.TopFoos.Add( bar2, new object() ); + baz.TopGlarchez = new Hashtable(); + GlarchProxy g = new Glarch(); + s.Save(g); + baz.TopGlarchez['g'] = g; + Hashtable map = new Hashtable(); + map[bar] = g; + map[bar2] = g; + baz.FooToGlarch = map; + map = new Hashtable(); + map[new FooComponent("name", 123, null, null)] = bar; + map[new FooComponent("nameName", 12, null, null)] = bar; + baz.FooComponentToFoo = map; + map = new Hashtable(); + map[bar] = g; + baz.GlarchToFoo = map; + s.Flush(); + s.Close(); + + s = sessions.OpenSession(); + baz = (Baz)s.Find("select baz from baz in class NHibernate.DomainModel.Baz order by baz")[0]; + ISession s2 = sessions.OpenSession(); + baz = (Baz)s.Find("select baz from baz in class NHibernate.DomainModel.Baz order by baz")[0]; + object o = baz.FooComponentToFoo[new FooComponent("name", 123, null, null)]; + Assert.IsNotNull( o ); + Assert.AreEqual( o, baz.FooComponentToFoo[new FooComponent("nameName", 12, null, null)] ); + s2.Close(); + Assert.AreEqual( 2, baz.TopFoos.Count ); + Assert.AreEqual( 1, baz.TopGlarchez.Count ); + enumer = baz.TopFoos.GetEnumerator(); + Assert.IsTrue( enumer.MoveNext() ); + Assert.IsNotNull( enumer.Current ); + Assert.AreEqual( 1, baz.StringSet.Count ); + Assert.AreEqual( 4, baz.Bag.Count ); + Assert.AreEqual( 2, baz.FooToGlarch.Count ); + Assert.AreEqual( 2, baz.FooComponentToFoo.Count ); + Assert.AreEqual( 1, baz.GlarchToFoo.Count ); + + enumer = baz.FooToGlarch.Keys.GetEnumerator(); + for( int j=0; j<2; j++ ) + { + enumer.MoveNext(); + Assert.IsTrue( enumer.Current is BarProxy ); + } + enumer = baz.FooComponentToFoo.Keys.GetEnumerator(); + enumer.MoveNext(); + FooComponent fooComp = (FooComponent)enumer.Current; + Assert.IsTrue ( + (fooComp.Count==123 && fooComp.Name.Equals("name")) + || (fooComp.Count==12 && fooComp.Name.Equals("nameName")) + ); + Assert.IsTrue( baz.FooComponentToFoo[fooComp] is BarProxy ); + + Glarch g2 = new Glarch(); + s.Save(g2); + g = (GlarchProxy)baz.TopGlarchez['G']; + baz.TopGlarchez['H'] = g; + baz.TopGlarchez['G'] = g2; + s.Flush(); + s.Close(); + + s = sessions.OpenSession(); + baz = (Baz)s.Find("select baz from baz in class NHibernate.DomainModel.Baz order by baz")[0]; + Assert.AreEqual( 2, baz.TopGlarchez.Count ); + s.Disconnect(); + + //TODO: add test for deserialization of ISession here! + + s.Close(); } |
From: Michael D. <mik...@us...> - 2004-07-14 21:26:44
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10476/NHibernate/Collection Modified Files: Set.cs SortedSet.cs Log Message: Fixed problem with a SortedSet not being lazily initialized correctly that caused a Null Reference Exception during a flush. Index: SortedSet.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/SortedSet.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SortedSet.cs 27 Apr 2004 15:49:21 -0000 1.4 --- SortedSet.cs 14 Jul 2004 21:26:35 -0000 1.5 *************** *** 54,58 **** /// <param name="session"></param> /// <param name="comparer">The IComparer to user for Sorting.</param> ! public SortedSet(ISessionImplementor session, IComparer comparer) : base(session, new SortedList(comparer)) { this.comparer = comparer; --- 54,58 ---- /// <param name="session"></param> /// <param name="comparer">The IComparer to user for Sorting.</param> ! public SortedSet(ISessionImplementor session, IComparer comparer) : base(session) { this.comparer = comparer; Index: Set.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Set.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Set.cs 3 Jun 2004 13:29:32 -0000 1.8 --- Set.cs 14 Jul 2004 21:26:34 -0000 1.9 *************** *** 74,77 **** --- 74,85 ---- public Set(ISessionImplementor session) : base(session) { } + /// <summary> + /// Creates a new Set initialized to the values in the Map. + /// </summary> + /// <param name="session"></param> + /// <param name="map"></param> + /// <remarks> + /// Only call this constructor if you consider the map initialized. + /// </remarks> public Set(ISessionImplementor session, IDictionary map) : base(session) { this.map = map; |
From: Michael D. <mik...@us...> - 2004-07-14 21:25:01
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10016/NHibernate/Impl Modified Files: SessionFactoryImpl.cs Log Message: removed some TODO comments that no longer apply Index: SessionFactoryImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/SessionFactoryImpl.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** SessionFactoryImpl.cs 12 Jul 2004 01:31:10 -0000 1.21 --- SessionFactoryImpl.cs 14 Jul 2004 21:24:51 -0000 1.22 *************** *** 109,115 **** try { - //TODO: need to add ctor that takes properties dl = HibernateDialect.GetDialect(properties); - //dl = HibernateDialect.GetDialect(); IDictionary temp = new Hashtable(); --- 109,113 ---- |
From: Michael D. <mik...@us...> - 2004-07-14 21:24:20
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9924/NHibernate.DomainModel Modified Files: StringComparator.cs Log Message: Added null checks. Index: StringComparator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/StringComparator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StringComparator.cs 8 Apr 2004 17:22:08 -0000 1.1 --- StringComparator.cs 14 Jul 2004 21:24:10 -0000 1.2 *************** *** 10,13 **** --- 10,24 ---- public int Compare(object x, object y) { + if(x==null && y==null) + { + return 0; + } + + if(x==null) + { + return -1; + } + + return ( (String) x ).ToLower().CompareTo( ( (String) y ).ToLower() ); } |
From: Michael D. <mik...@us...> - 2004-07-14 21:22:26
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9535/NHibernate/Persister Modified Files: NormalizedEntityPersister.cs Log Message: removed some TODO comments that no longer apply Index: NormalizedEntityPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/NormalizedEntityPersister.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** NormalizedEntityPersister.cs 5 Jul 2004 19:19:00 -0000 1.19 --- NormalizedEntityPersister.cs 14 Jul 2004 21:22:17 -0000 1.20 *************** *** 282,288 **** this.propertyColumnSpans = new int[this.hydrateSpan]; - // TODO: SYNCHISSUE: in latest Hibernate version this is a HashSet not an array list. There are - // some local variables to do with naturalOrderPropertyTables and naturalOrderTableNames Hashtable thisClassProperties = new Hashtable(); object thisClassPropertiesObject = new object(); --- 282,287 ---- this.propertyColumnSpans = new int[this.hydrateSpan]; Hashtable thisClassProperties = new Hashtable(); + // just a dummy object for the value so I can treat Hashtable like a Set object thisClassPropertiesObject = new object(); *************** *** 994,998 **** { bool[] notNull = GetNotNullInsertableColumns(fields); - // TODO: this signature has not been built return Insert(fields, notNull, GenerateInsertStrings(true, notNull), obj, session); } --- 993,996 ---- |
From: Michael D. <mik...@us...> - 2004-07-14 21:22:26
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Engine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9535/NHibernate/Engine Modified Files: ISessionImplementor.cs Log Message: removed some TODO comments that no longer apply Index: ISessionImplementor.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Engine/ISessionImplementor.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ISessionImplementor.cs 6 May 2004 13:14:02 -0000 1.19 --- ISessionImplementor.cs 14 Jul 2004 21:22:16 -0000 1.20 *************** *** 351,355 **** /// <param name="coll"></param> /// <returns></returns> - //TODO: write this code... ICollection GetOrphans(PersistentCollection coll); --- 351,354 ---- |
From: Michael D. <mik...@us...> - 2004-07-13 21:01:09
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10980/NHibernate.Test Modified Files: FooBarTest.cs Log Message: Continued to work on CollectionsInSelect. Index: FooBarTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FooBarTest.cs,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** FooBarTest.cs 13 Jul 2004 06:47:32 -0000 1.42 --- FooBarTest.cs 13 Jul 2004 21:01:01 -0000 1.43 *************** *** 846,850 **** [Test] ! [Ignore("Test is failing becuase items in Arrays are being deleted.")] public void CollectionsInSelect() { --- 846,850 ---- [Test] ! [Ignore("Test is failing because sub selects are not working. http://jira.nhibernate.org:8080/browse/NH-69")] public void CollectionsInSelect() { *************** *** 907,913 **** s.Find("select count(*) from Bar as bar, bar.Component.Glarch.ProxyArray as g where g.id in indices(bar.Baz.FooArray)"); s.Find("select max( elements(bar.Baz.FooArray) ) from Bar as bar, bar.Component.Glarch.ProxyArray as g where g.id in indices(bar.Baz.FooArray)"); ! //s.Find("select count(*) from Bar as bar where 1 in (from bar.Component.Glarch.ProxyArray g where g.Name='foo')"); ! //s.Find("select count(*) from Bar as bar where 1 in (from g in bar.Component.Glarch.ProxyArray.elements where g.Name='foo')"); ! //s.Find("select count(*) from Bar as bar left outer join bar.Component.Glarch.ProxyArray as pg where 1 in (from g in bar.Component.Glarch.ProxyArray)"); } --- 907,913 ---- s.Find("select count(*) from Bar as bar, bar.Component.Glarch.ProxyArray as g where g.id in indices(bar.Baz.FooArray)"); s.Find("select max( elements(bar.Baz.FooArray) ) from Bar as bar, bar.Component.Glarch.ProxyArray as g where g.id in indices(bar.Baz.FooArray)"); ! // s.Find("select count(*) from Bar as bar where 1 in (from bar.Component.Glarch.ProxyArray g where g.Name='foo')"); ! // s.Find("select count(*) from Bar as bar where 1 in (from g in bar.Component.Glarch.ProxyArray.elements where g.Name='foo')"); ! // s.Find("select count(*) from Bar as bar left outer join bar.Component.Glarch.ProxyArray as pg where 1 in (from g in bar.Component.Glarch.ProxyArray)"); } *************** *** 916,920 **** Assert.AreEqual( 2, ((object[])list[0]).Length ); - //TODO: flush is causing array delete list = s.Find("select baz.Name from Bar bar inner join bar.Baz baz inner join baz.FooSet foo where baz.Name = bar.String"); s.Find("SELECT baz.Name FROM Bar AS bar INNER JOIN bar.Baz AS baz INNER JOIN baz.FooSet AS foo WHERE baz.Name = bar.String"); --- 916,919 ---- *************** *** 941,951 **** Assert.AreEqual( 1, s.Find("from Bar bar join bar.Baz.FooArray foo").Count ); ! //Assert.AreEqual( 0, s.Find("from bar in class Bar, foo in bar.Baz.FooSet.elements").Count ); ! //Assert.AreEqual( 1, s.Find("from bar in class Bar, foo in elements( bar.Baz.FooArray )").Count ); s.Delete(bar); - - s.Delete(baz); s.Delete(baz2); --- 940,948 ---- Assert.AreEqual( 1, s.Find("from Bar bar join bar.Baz.FooArray foo").Count ); ! Assert.AreEqual( 0, s.Find("from bar in class Bar, foo in bar.Baz.FooSet.elements").Count ); ! Assert.AreEqual( 1, s.Find("from bar in class Bar, foo in elements( bar.Baz.FooArray )").Count ); s.Delete(bar); s.Delete(baz); s.Delete(baz2); |
From: Michael D. <mik...@us...> - 2004-07-13 20:55:24
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9772/NHibernate/Impl Modified Files: SessionImpl.cs Log Message: Fixed bug with array based collections having the records deleted from the many-to-many table when fetched with hql. Index: SessionImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/SessionImpl.cs,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** SessionImpl.cs 13 Jul 2004 06:48:30 -0000 1.34 --- SessionImpl.cs 13 Jul 2004 20:55:15 -0000 1.35 *************** *** 193,197 **** /// </remarks> [Serializable] ! internal class SessionImpl : ISessionImplementor, IDisposable { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(SessionImpl)); --- 193,197 ---- /// </remarks> [Serializable] ! internal class SessionImpl : ISessionImplementor { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(SessionImpl)); *************** *** 3346,3353 **** foreach (LoadingCollectionEntry lce in loadingCollections.Values) { ! //lce.collection.EndRead(); ! lce.Collection.EndRead(persister, lce.Owner); ! AddInitializedCollection(lce.Collection, persister, lce.Id); ! persister.Cache(lce.Id, lce.Collection, this); } --- 3346,3355 ---- foreach (LoadingCollectionEntry lce in loadingCollections.Values) { ! if(lce.Initialize) ! { ! lce.Collection.EndRead(persister, lce.Owner); ! AddInitializedCollection(lce.Collection, persister, lce.Id); ! persister.Cache(lce.Id, lce.Collection, this); ! } } *************** *** 3578,3585 **** } ! //~SessionImpl() { void IDisposable.Dispose() { ! log.Debug("running Session.Finalize()"); // it was never disconnected --- 3580,3591 ---- } ! #region System.IDisposable Members ! ! /// <summary> ! /// Just in case the user forgot to Commit() or Close() ! /// </summary> void IDisposable.Dispose() { ! log.Debug("running ISession.Dispose()"); // it was never disconnected *************** *** 3600,3603 **** --- 3606,3612 ---- } + #endregion + + public static void Handle(Exception e) { |
From: Michael D. <mik...@us...> - 2004-07-13 20:53:34
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9443/NHibernate Modified Files: ISession.cs Log Message: Added IDisposable to ISession instead of directly implementing it on SessionImpl. Index: ISession.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ISession.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ISession.cs 10 Feb 2004 18:26:21 -0000 1.7 --- ISession.cs 13 Jul 2004 20:53:26 -0000 1.8 *************** *** 65,69 **** /// </para> /// </remarks> ! public interface ISession { /// <summary> --- 65,69 ---- /// </para> /// </remarks> ! public interface ISession : IDisposable { /// <summary> |
From: Michael D. <mik...@us...> - 2004-07-13 19:37:34
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23303/NHibernate.Test Modified Files: CriteriaTest.cs Log Message: made SetUp's call to ExportSchema just like all other setups Index: CriteriaTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/CriteriaTest.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CriteriaTest.cs 9 Jun 2004 01:05:46 -0000 1.4 --- CriteriaTest.cs 13 Jul 2004 19:37:25 -0000 1.5 *************** *** 10,23 **** [TestFixture] ! public class CriteriaTest : TestCase { ! [SetUp] ! public void SetUp() { ! ExportSchema( new string[] { "Simple.hbm.xml"}, true ); } [Test] ! public void SimpleSelectTest() { ! // create the objects to search on ISession s1 = sessions.OpenSession(); --- 10,24 ---- [TestFixture] ! public class CriteriaTest : TestCase ! { [SetUp] ! public void SetUp() ! { ! ExportSchema( new string[] { "Simple.hbm.xml"}); } [Test] ! public void SimpleSelectTest() ! { // create the objects to search on ISession s1 = sessions.OpenSession(); *************** *** 66,72 **** s2.Close(); } - - - } } --- 67,70 ---- |
From: Michael D. <mik...@us...> - 2004-07-13 06:48:56
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6596/src/NHibernate/Collection Modified Files: ArrayHolder.cs Log Message: synched with h2.0.3 Index: ArrayHolder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/ArrayHolder.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ArrayHolder.cs 24 Jun 2004 15:26:12 -0000 1.9 --- ArrayHolder.cs 13 Jul 2004 06:48:47 -0000 1.10 *************** *** 29,33 **** int length = /*(array==null) ? temp.Count :*/ ((System.Array)array).Length; object result = System.Array.CreateInstance(persister.ElementClass, length); ! for (int i=0; i<length; i++) { object elt = /*(array==null) ? temp[i] :*/ ((System.Array)array).GetValue(i); try --- 29,34 ---- int length = /*(array==null) ? temp.Count :*/ ((System.Array)array).Length; object result = System.Array.CreateInstance(persister.ElementClass, length); ! for (int i=0; i<length; i++) ! { object elt = /*(array==null) ? temp[i] :*/ ((System.Array)array).GetValue(i); try *************** *** 55,59 **** ! public ArrayHolder(ISessionImplementor session, CollectionPersister persister) : base(session) { elementClass = persister.ElementClass; --- 56,61 ---- ! public ArrayHolder(ISessionImplementor session, CollectionPersister persister) ! : base(session) { elementClass = persister.ElementClass; *************** *** 79,83 **** public override ICollection Elements() { ! if (array==null) return tempList; int length = ((System.Array)array).Length; IList list = new ArrayList(length); --- 81,85 ---- public override ICollection Elements() { ! //if (array==null) return tempList; int length = ((System.Array)array).Length; IList list = new ArrayList(length); *************** *** 162,174 **** public override object GetInitialValue(bool lazy) { - tempList = new ArrayList(); base.GetInitialValue(false); - array = System.Array.CreateInstance( elementClass, tempList.Count ); - for (int i=0; i<tempList.Count; i++) - { - ((System.Array)array).SetValue(tempList[i],i); - } session.AddArrayHolder(this); - tempList=null; return array; } --- 164,169 ---- *************** *** 188,192 **** } ! public ArrayHolder(ISessionImplementor session, CollectionPersister persister, object disassembled, object owner) : base(session) { object[] cached = (object[]) disassembled; --- 183,188 ---- } ! public ArrayHolder(ISessionImplementor session, CollectionPersister persister, object disassembled, object owner) ! : base(session) { object[] cached = (object[]) disassembled; *************** *** 198,210 **** ((System.Array)array).SetValue( persister.ElementType.Assemble(cached[i], session, owner), i); } } public override object Disassemble(CollectionPersister persister) { ! int length = tempList.Count; object[] result = new object[length]; for (int i=0; i<length; i++) { ! result[i] = persister.ElementType.Disassemble( tempList[i], session); } return result; --- 194,207 ---- ((System.Array)array).SetValue( persister.ElementType.Assemble(cached[i], session, owner), i); } + initialized = true; } public override object Disassemble(CollectionPersister persister) { ! int length = ((System.Array)array).Length; object[] result = new object[length]; for (int i=0; i<length; i++) { ! result[i] = persister.ElementType.Disassemble( ((System.Array)array).GetValue(i) , session); } return result; *************** *** 235,240 **** for (int i=0; i<end; i++) { ! if ( ((System.Array)array).GetValue(i)==null && ((System.Array)sn).GetValue(i)!=null ) deletes.Add( i ); } return deletes; --- 232,239 ---- for (int i=0; i<end; i++) { ! if ( ((System.Array)array).GetValue(i)==null && ((System.Array)sn).GetValue(i)!=null ) ! { deletes.Add( i ); + } } return deletes; |
From: Michael D. <mik...@us...> - 2004-07-13 06:48:38
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6557/src/NHibernate/Impl Modified Files: SessionImpl.cs Log Message: finished synching with h2.0.3 Index: SessionImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/SessionImpl.cs,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** SessionImpl.cs 7 Jul 2004 05:20:28 -0000 1.33 --- SessionImpl.cs 13 Jul 2004 06:48:30 -0000 1.34 *************** *** 1985,1990 **** } ! //TODO: Resume synch with H2.0.3 here... ! public object Load(System.Type clazz, object id) { if (id==null) throw new NullReferenceException("null is not a valid identifier"); object result = DoLoadByClass(clazz, id, true, true); --- 1985,1990 ---- } ! public object Load(System.Type clazz, object id) [...2145 lines suppressed...] ! ! private static readonly ICollection EmptyCollection = new ArrayList(0); ! ! public ICollection GetOrphans(PersistentCollection coll) { ! CollectionEntry ce = GetCollectionEntry(coll); ! return ce.IsNew ? EmptyCollection : coll.GetOrphans(ce.Snapshot); } - } } --- 3911,3918 ---- } ! public object GetVersion(object entity) { ! return GetEntry(entity).Version; } } } |
From: Michael D. <mik...@us...> - 2004-07-13 06:47:40
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6423/src/NHibernate.Test Modified Files: FooBarTest.cs Log Message: Implemented more tests - still stuck on CollectionInSelect Index: FooBarTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FooBarTest.cs,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** FooBarTest.cs 8 Jul 2004 00:22:54 -0000 1.41 --- FooBarTest.cs 13 Jul 2004 06:47:32 -0000 1.42 *************** *** 846,850 **** [Test] ! [Ignore("Test is failing becuase of Arrays in hql and a reference to them.")] public void CollectionsInSelect() { --- 846,850 ---- [Test] ! [Ignore("Test is failing becuase items in Arrays are being deleted.")] public void CollectionsInSelect() { *************** *** 886,894 **** Assert.AreEqual( baz.Name, r.Name ); Assert.AreEqual( 1, r.Count ); // TODO: figure out a better way // in hibernate this is hard coded as 696969696969696938l which is very dependant upon // how the test are run because it is calculated on a global static variable... // maybe a better way to test this would be to assume that the first ! Assert.AreEqual( 696969696969696969L, r.Amount ); s.Find("select max( elements(bar.Baz.FooArray) ) from Bar as bar"); --- 886,895 ---- Assert.AreEqual( baz.Name, r.Name ); Assert.AreEqual( 1, r.Count ); + // TODO: figure out a better way // in hibernate this is hard coded as 696969696969696938l which is very dependant upon // how the test are run because it is calculated on a global static variable... // maybe a better way to test this would be to assume that the first ! //Assert.AreEqual( 696969696969696969L, r.Amount ); s.Find("select max( elements(bar.Baz.FooArray) ) from Bar as bar"); *************** *** 910,919 **** //s.Find("select count(*) from Bar as bar left outer join bar.Component.Glarch.ProxyArray as pg where 1 in (from g in bar.Component.Glarch.ProxyArray)"); } ! // TODO: it looks like we are having problems with arrays - FooArray to foo and then getting a property of the item ! // in the array. list = s.Find("from Baz baz left join baz.FooToGlarch join fetch baz.FooArray foo left join fetch foo.TheFoo"); Assert.AreEqual( 1, list.Count ); Assert.AreEqual( 2, ((object[])list[0]).Length ); s.Delete(bar); --- 911,946 ---- //s.Find("select count(*) from Bar as bar left outer join bar.Component.Glarch.ProxyArray as pg where 1 in (from g in bar.Component.Glarch.ProxyArray)"); } ! list = s.Find("from Baz baz left join baz.FooToGlarch join fetch baz.FooArray foo left join fetch foo.TheFoo"); Assert.AreEqual( 1, list.Count ); Assert.AreEqual( 2, ((object[])list[0]).Length ); + //TODO: flush is causing array delete + list = s.Find("select baz.Name from Bar bar inner join bar.Baz baz inner join baz.FooSet foo where baz.Name = bar.String"); + s.Find("SELECT baz.Name FROM Bar AS bar INNER JOIN bar.Baz AS baz INNER JOIN baz.FooSet AS foo WHERE baz.Name = bar.String"); + + s.Find("select baz.Name from Bar bar join bar.Baz baz left outer join baz.FooSet foo where baz.Name = bar.String"); + + s.Find("select baz.Name from Bar bar, bar.Baz baz, baz.FooSet foo where baz.Name = bar.String"); + s.Find("SELECT baz.Name FROM Bar AS bar, bar.Baz AS baz, baz.FooSet AS foo WHERE baz.Name = bar.String"); + + s.Find("select baz.Name from Bar bar left join bar.Baz baz left join baz.FooSet foo where baz.Name = bar.String"); + s.Find("select foo.String from Bar bar left join bar.Baz.FooSet foo where bar.String = foo.String"); + + s.Find("select baz.Name from Bar bar left join bar.Baz baz left join baz.FooArray foo where baz.Name = bar.String"); + s.Find("select foo.String from Bar bar left join bar.Baz.FooArray foo where bar.String = foo.String"); + + s.Find("select bar.String, foo.String from bar in class Bar inner join bar.Baz as baz inner join elements(baz.FooSet) as foo where baz.Name = 'name'"); + s.Find("select foo from bar in class Bar inner join bar.Baz as baz inner join baz.FooSet as foo"); + s.Find("select foo from bar in class Bar inner join bar.Baz.FooSet as foo"); + + s.Find("select bar.String, foo.String from bar in class Bar, bar.Baz as baz, elements(baz.FooSet) as foo where baz.Name = 'name'"); + s.Find("select foo from bar in class Bar, bar.Baz as baz, baz.FooSet as foo"); + s.Find("select foo from bar in class Bar, bar.Baz.FooSet as foo"); + + Assert.AreEqual( 1, s.Find("from Bar bar join bar.Baz.FooArray foo").Count ); + + //Assert.AreEqual( 0, s.Find("from bar in class Bar, foo in bar.Baz.FooSet.elements").Count ); + //Assert.AreEqual( 1, s.Find("from bar in class Bar, foo in elements( bar.Baz.FooArray )").Count ); s.Delete(bar); |
From: Michael D. <mik...@us...> - 2004-07-13 06:47:06
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6310/src/NHibernate.DomainModel Modified Files: FooBar.hbm.xml Log Message: formatting of hbm.xml to ease readability in vs.net Index: FooBar.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FooBar.hbm.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** FooBar.hbm.xml 11 Jul 2004 21:07:24 -0000 1.9 --- FooBar.hbm.xml 13 Jul 2004 06:46:57 -0000 1.10 *************** *** 177,199 **** proxy="NHibernate.DomainModel.BarProxy, NHibernate.DomainModel" --> ! <many-to-one name="Baz"/> ! <property name="BarString"> ! <column name="bar_String" length="24"/> ! </property> ! <property name="Name" column="name_name"/> ! <component name="BarComponent" class="NHibernate.DomainModel.FooComponent, NHibernate.DomainModel"> ! <parent name="Parent"/> ! <property name="Count" column="bar_count"/> ! <property name="Name" length="64"/> ! <array name="ImportantDates"> ! <key column="id" /> ! <index column="i"/> ! <element column="date_" type="DateTime"/> ! </array> ! </component> ! <any name="Object" id-type="Int64" cascade="all"> ! <column name="clazz" length="100"/> ! <column name="gen_id"/> ! </any> </subclass> </subclass> --- 177,199 ---- proxy="NHibernate.DomainModel.BarProxy, NHibernate.DomainModel" --> ! <many-to-one name="Baz"/> ! <property name="BarString"> ! <column name="bar_String" length="24"/> ! </property> ! <property name="Name" column="name_name"/> ! <component name="BarComponent" class="NHibernate.DomainModel.FooComponent, NHibernate.DomainModel"> ! <parent name="Parent"/> ! <property name="Count" column="bar_count"/> ! <property name="Name" length="64"/> ! <array name="ImportantDates"> ! <key column="id" /> ! <index column="i"/> ! <element column="date_" type="DateTime"/> ! </array> ! </component> ! <any name="Object" id-type="Int64" cascade="all"> ! <column name="clazz" length="100"/> ! <column name="gen_id"/> ! </any> </subclass> </subclass> |
From: Michael D. <mik...@us...> - 2004-07-13 03:05:45
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12090/src/NHibernate/Hql Modified Files: FromParser.cs Log Message: Fixed problem with collections in select Index: FromParser.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/FromParser.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** FromParser.cs 30 Apr 2004 08:57:59 -0000 1.8 --- FromParser.cs 13 Jul 2004 03:05:36 -0000 1.9 *************** *** 49,53 **** if (!afterJoinType) { ! if (!expectingJoin|expectingAs) throw new QueryException("unexpected token: join"); // inner joings can be abbreviated to 'join' joinType = JoinType.InnerJoin; --- 49,53 ---- if (!afterJoinType) { ! if ( !(expectingJoin|expectingAs) ) throw new QueryException("unexpected token: join"); // inner joings can be abbreviated to 'join' joinType = JoinType.InnerJoin; |
From: Michael D. <mik...@us...> - 2004-07-12 21:21:39
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20364/NHibernate/Util Modified Files: SequencedHashMap.cs Log Message: Added ctor that takes a IHashCodeProvider and IComparer. Index: SequencedHashMap.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/SequencedHashMap.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SequencedHashMap.cs 28 Jun 2004 03:41:34 -0000 1.3 --- SequencedHashMap.cs 12 Jul 2004 21:21:30 -0000 1.4 *************** *** 196,199 **** --- 196,211 ---- } + /// <summary> + /// Creates an empty Hashtable with the default initial capacity and using the default load factor, + /// the specified hash code provider and the specified comparer + /// </summary> + /// <param name="hcp"></param> + /// <param name="comparer"></param> + public SequencedHashMap(IHashCodeProvider hcp, IComparer comparer) + { + _sentinel = CreateSentinel(); + _entries = new Hashtable(hcp, comparer); + } + /// <summary> |
From: Michael D. <mik...@us...> - 2004-07-12 21:18:56
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/UtilityTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19423/UtilityTest Modified Files: IdentityMapFixture.cs Added Files: IdentityMapSequencedFixture.cs Log Message: Added another test fixture to test the Sequenced version of the IdentityMap. Index: IdentityMapFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/UtilityTest/IdentityMapFixture.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IdentityMapFixture.cs 28 Jun 2004 03:40:34 -0000 1.5 --- IdentityMapFixture.cs 12 Jul 2004 21:18:17 -0000 1.6 *************** *** 42,45 **** --- 42,49 ---- } + protected virtual IDictionary GetIdentityMap() + { + return IdentityMap.Instantiate(); + } /// <summary> *************** *** 50,55 **** public void AddNoHashCode() { ! //IDictionary map = IdentityMap.Instantiate(); ! IDictionary map = IdentityMap.InstantiateSequenced(); map.Add(noHashCode1, value1); --- 54,58 ---- public void AddNoHashCode() { ! IDictionary map = GetIdentityMap(); map.Add(noHashCode1, value1); *************** *** 64,69 **** public void ConcurrentEntries() { ! //IDictionary map = IdentityMap.Instantiate(); ! IDictionary map = IdentityMap.InstantiateSequenced(); map.Add(noHashCode1, value1); --- 67,71 ---- public void ConcurrentEntries() { ! IDictionary map = GetIdentityMap(); map.Add(noHashCode1, value1); *************** *** 99,104 **** object value4 = new object(); ! //IDictionary map = IdentityMap.Instantiate(); ! IDictionary map = IdentityMap.InstantiateSequenced(); map.Add(noHashCode1, value1); map.Add(noHashCode2, value2); --- 101,105 ---- object value4 = new object(); ! IDictionary map = GetIdentityMap(); map.Add(noHashCode1, value1); map.Add(noHashCode2, value2); *************** *** 128,133 **** public void AddValueTypeException() { ! //IDictionary map = IdentityMap.Instantiate(); ! IDictionary map = IdentityMap.InstantiateSequenced(); int intKey = 3; object objectValue = new object(); --- 129,133 ---- public void AddValueTypeException() { ! IDictionary map = GetIdentityMap(); int intKey = 3; object objectValue = new object(); *************** *** 139,144 **** public void Count() { ! //IDictionary map = IdentityMap.Instantiate(); ! IDictionary map = IdentityMap.InstantiateSequenced(); map.Add(new object(), new object()); map.Add(new object(), new object()); --- 139,143 ---- public void Count() { ! IDictionary map = GetIdentityMap(); map.Add(new object(), new object()); map.Add(new object(), new object()); *************** *** 155,160 **** public void ContainsSameObjectByRef() { ! //IDictionary map = IdentityMap.Instantiate(); ! IDictionary map = IdentityMap.InstantiateSequenced(); MutableHashCode item1Copy = item1; --- 154,158 ---- public void ContainsSameObjectByRef() { ! IDictionary map = GetIdentityMap(); MutableHashCode item1Copy = item1; *************** *** 174,179 **** public void ContainsSameObjectWithDiffEquals() { ! //IDictionary map = IdentityMap.Instantiate(); ! IDictionary map = IdentityMap.InstantiateSequenced(); map.Add(item1, new object()); --- 172,176 ---- public void ContainsSameObjectWithDiffEquals() { ! IDictionary map = GetIdentityMap(); map.Add(item1, new object()); *************** *** 192,197 **** public void ContainsDiffObjectWithEquals() { ! //IDictionary map = IdentityMap.Instantiate(); ! IDictionary map = IdentityMap.InstantiateSequenced(); item1.HashCodeField = 4; item2.HashCodeField = 4; --- 189,193 ---- public void ContainsDiffObjectWithEquals() { ! IDictionary map = GetIdentityMap(); item1.HashCodeField = 4; item2.HashCodeField = 4; *************** *** 212,217 **** public void SetItemChangedHashCodeTwice() { ! //IDictionary actualMap = IdentityMap.Instantiate(); ! IDictionary actualMap = IdentityMap.InstantiateSequenced(); actualMap[item1] = value1; --- 208,212 ---- public void SetItemChangedHashCodeTwice() { ! IDictionary actualMap = GetIdentityMap(); actualMap[item1] = value1; *************** *** 230,235 **** public void SetItemsEqualHashCodeDiffIdentity() { ! //IDictionary actualMap = IdentityMap.Instantiate(); ! IDictionary actualMap = IdentityMap.InstantiateSequenced(); IDictionary normalMap = new Hashtable(); --- 225,229 ---- public void SetItemsEqualHashCodeDiffIdentity() { ! IDictionary actualMap = GetIdentityMap(); IDictionary normalMap = new Hashtable(); *************** *** 260,265 **** { ! //IDictionary map = IdentityMap.Instantiate(); ! IDictionary map = IdentityMap.InstantiateSequenced(); map.Add(item1, value1); map.Add(item2, value2); --- 254,258 ---- { ! IDictionary map = GetIdentityMap(); map.Add(item1, value1); map.Add(item2, value2); --- NEW FILE: IdentityMapSequencedFixture.cs --- using System; using System.Collections; using NHibernate.Util; using NUnit.Framework; namespace NHibernate.Test.UtilityTest { /// <summary> /// Tests a Sequenced Identity Map. /// </summary> [TestFixture] public class IdentityMapSequencedFixture : IdentityMapFixture { protected override IDictionary GetIdentityMap() { return IdentityMap.InstantiateSequenced(); } } } |
From: Michael D. <mik...@us...> - 2004-07-12 21:18:41
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19423 Modified Files: NHibernate.Test-1.1.csproj Log Message: Added another test fixture to test the Sequenced version of the IdentityMap. Index: NHibernate.Test-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHibernate.Test-1.1.csproj,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** NHibernate.Test-1.1.csproj 12 Jul 2004 01:32:18 -0000 1.28 --- NHibernate.Test-1.1.csproj 12 Jul 2004 21:18:17 -0000 1.29 *************** *** 427,430 **** --- 427,435 ---- /> <File + RelPath = "UtilityTest\IdentityMapSequencedFixture.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "UtilityTest\SequencedHashMapFixture.cs" SubType = "Code" |
From: Michael D. <mik...@us...> - 2004-07-12 21:17:14
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19165 Modified Files: ABCTest.cs Log Message: id used to be an increment - changed to assigned because increment id strategy was not implemented. Index: ABCTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ABCTest.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ABCTest.cs 17 Jun 2004 21:17:54 -0000 1.8 --- ABCTest.cs 12 Jul 2004 21:17:06 -0000 1.9 *************** *** 29,32 **** --- 29,34 ---- D d = new D(); d.Amount =213.34f; + // id used to be a increment + c1.Id = 1; c1.Address = "foo bar"; c1.Count = 23432; |
From: Michael D. <mik...@us...> - 2004-07-12 20:40:44
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHSpecific In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11346/NHSpecific Modified Files: JoinedSubclass.hbm.xml Log Message: Fixed unsaved-value mappings for Int32, Int64 ids. Index: JoinedSubclass.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHSpecific/JoinedSubclass.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JoinedSubclass.hbm.xml 9 Jun 2004 01:04:35 -0000 1.1 --- JoinedSubclass.hbm.xml 12 Jul 2004 20:40:33 -0000 1.2 *************** *** 5,9 **** table="j_sc" > ! <id name="Id" type="Int32" unsaved-value="null" column="joined_subclass_id" > <generator class="native" /> </id> --- 5,9 ---- table="j_sc" > ! <id name="Id" type="Int32" unsaved-value="0" column="joined_subclass_id" > <generator class="native" /> </id> |
From: Michael D. <mik...@us...> - 2004-07-12 02:26:38
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14968/NHibernate Modified Files: nhibernate-configuration-2.0.xsd Log Message: hibernate.cfg.xml now requires a reference to the configuration schema. Index: nhibernate-configuration-2.0.xsd =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/nhibernate-configuration-2.0.xsd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** nhibernate-configuration-2.0.xsd 10 Feb 2004 18:22:43 -0000 1.1 --- nhibernate-configuration-2.0.xsd 12 Jul 2004 02:26:29 -0000 1.2 *************** *** 1,69 **** ! <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'> ! <xs:annotation> ! -- This schema was automatically generated by Syntext Dtd2Schema -- ! -- conversion tool (from file: hibernate-configuration-2.0.dtd) -- ! -- Copyright (C) 2002, 2003 Syntext Inc. See http://www.syntext.com for updates. -- ! </xs:annotation> ! <xs:element name='hibernate-configuration'> ! <xs:complexType> ! <xs:sequence> ! <xs:element ref='session-factory'/> ! </xs:sequence> ! </xs:complexType> ! </xs:element> ! <xs:element name='jcs-class-cache'> ! <xs:complexType> ! <xs:attribute name='class' use='required'/> ! <xs:attribute name='region'/> ! <xs:attribute name='usage' use='required'> ! <xs:simpleType> ! <xs:restriction base='xs:string'> ! <xs:enumeration value='read-only'/> ! <xs:enumeration value='read-write'/> ! <xs:enumeration value='nonstrict-read-write'/> ! </xs:restriction> ! </xs:simpleType> ! </xs:attribute> ! </xs:complexType> ! </xs:element> ! <xs:element name='jcs-collection-cache'> ! <xs:complexType> ! <xs:attribute name='collection' use='required'/> ! <xs:attribute name='region'/> ! <xs:attribute name='usage' use='required'> ! <xs:simpleType> ! <xs:restriction base='xs:string'> ! <xs:enumeration value='read-only'/> ! <xs:enumeration value='read-write'/> ! <xs:enumeration value='nonstrict-read-write'/> ! </xs:restriction> ! </xs:simpleType> ! </xs:attribute> ! </xs:complexType> ! </xs:element> ! <xs:element name='mapping'> ! <xs:complexType> ! <xs:attribute name='resource'/> ! <xs:attribute name='file'/> ! <xs:attribute name='jar'/> ! </xs:complexType> ! </xs:element> ! <xs:element name='property'> ! <xs:complexType mixed='true'> ! <xs:attribute name='name' use='required'/> ! </xs:complexType> ! </xs:element> ! <xs:element name='session-factory'> ! <xs:complexType> ! <xs:sequence> ! <xs:element ref='property' minOccurs='0' maxOccurs='unbounded'/> ! <xs:element ref='mapping' maxOccurs='unbounded'/> ! <xs:choice minOccurs='0' maxOccurs='unbounded'> ! <xs:element ref='jcs-class-cache'/> ! <xs:element ref='jcs-collection-cache'/> ! </xs:choice> ! </xs:sequence> ! <xs:attribute name='name'/> ! </xs:complexType> ! </xs:element> </xs:schema> --- 1,72 ---- ! <xs:schema targetNamespace='urn:nhibernate-configuration-2.0' xmlns='urn:nhibernate-configuration-2.0' ! xmlns:xs='http://www.w3.org/2001/XMLSchema'> ! <xs:annotation> ! <xs:documentation> ! This schema was automatically generated by Syntext Dtd2Schema ! conversion tool (from file: hibernate-configuration-2.0.dtd) ! Copyright (C) 2002, 2003 Syntext Inc. See http://www.syntext.com for updates. ! </xs:documentation> ! </xs:annotation> ! <xs:element name='hibernate-configuration'> ! <xs:complexType> ! <xs:sequence> ! <xs:element ref='session-factory' /> ! </xs:sequence> ! </xs:complexType> ! </xs:element> ! <xs:element name='jcs-class-cache'> ! <xs:complexType> ! <xs:attribute name='class' use='required' /> ! <xs:attribute name='region' /> ! <xs:attribute name='usage' use='required'> ! <xs:simpleType> ! <xs:restriction base='xs:string'> ! <xs:enumeration value='read-only' /> ! <xs:enumeration value='read-write' /> ! <xs:enumeration value='nonstrict-read-write' /> ! </xs:restriction> ! </xs:simpleType> ! </xs:attribute> ! </xs:complexType> ! </xs:element> ! <xs:element name='jcs-collection-cache'> ! <xs:complexType> ! <xs:attribute name='collection' use='required' /> ! <xs:attribute name='region' /> ! <xs:attribute name='usage' use='required'> ! <xs:simpleType> ! <xs:restriction base='xs:string'> ! <xs:enumeration value='read-only' /> ! <xs:enumeration value='read-write' /> ! <xs:enumeration value='nonstrict-read-write' /> ! </xs:restriction> ! </xs:simpleType> ! </xs:attribute> ! </xs:complexType> ! </xs:element> ! <xs:element name='mapping'> ! <xs:complexType> ! <xs:attribute name='resource' /> ! <xs:attribute name='file' /> ! <xs:attribute name='jar' /> ! </xs:complexType> ! </xs:element> ! <xs:element name='property'> ! <xs:complexType mixed='true'> ! <xs:attribute name='name' use='required' /> ! </xs:complexType> ! </xs:element> ! <xs:element name='session-factory'> ! <xs:complexType> ! <xs:sequence> ! <xs:element ref='property' minOccurs='0' maxOccurs='unbounded' /> ! <xs:element ref='mapping' maxOccurs='unbounded' /> ! <xs:choice minOccurs='0' maxOccurs='unbounded'> ! <xs:element ref='jcs-class-cache' /> ! <xs:element ref='jcs-collection-cache' /> ! </xs:choice> ! </xs:sequence> ! <xs:attribute name='name' /> ! </xs:complexType> ! </xs:element> </xs:schema> |
From: Michael D. <mik...@us...> - 2004-07-12 02:26:38
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14968/NHibernate.Test Modified Files: hibernate.cfg.xml Log Message: hibernate.cfg.xml now requires a reference to the configuration schema. Index: hibernate.cfg.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/hibernate.cfg.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** hibernate.cfg.xml 12 Jul 2004 01:32:18 -0000 1.1 --- hibernate.cfg.xml 12 Jul 2004 02:26:29 -0000 1.2 *************** *** 1,5 **** <?xml version="1.0" encoding="utf-8" ?> ! <hibernate-configuration > ! <!--xmlns="urn:nhibernate-configuration-2.0" --> <session-factory name="NHibernate.Test"> <!-- properties --> --- 1,4 ---- <?xml version="1.0" encoding="utf-8" ?> ! <hibernate-configuration xmlns="urn:nhibernate-configuration-2.0" > <session-factory name="NHibernate.Test"> <!-- properties --> |
From: Michael D. <mik...@us...> - 2004-07-12 02:26:38
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/CfgTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14968/NHibernate.Test/CfgTest Modified Files: ConfigurationFixture.cs Log Message: hibernate.cfg.xml now requires a reference to the configuration schema. Index: ConfigurationFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/CfgTest/ConfigurationFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConfigurationFixture.cs 12 Jul 2004 01:32:18 -0000 1.1 --- ConfigurationFixture.cs 12 Jul 2004 02:26:29 -0000 1.2 *************** *** 16,20 **** public void SetUp() { ! System.IO.File.Copy("..\\..\\hibernate.cfg.xml", "hibernate.cfg.xml"); } --- 16,20 ---- public void SetUp() { ! System.IO.File.Copy("..\\..\\hibernate.cfg.xml", "hibernate.cfg.xml", true); } |
From: Michael D. <mik...@us...> - 2004-07-12 02:26:37
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14968/NHibernate/Cfg Modified Files: Configuration.cs Log Message: hibernate.cfg.xml now requires a reference to the configuration schema. Index: Configuration.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Configuration.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Configuration.cs 12 Jul 2004 01:28:50 -0000 1.16 --- Configuration.cs 12 Jul 2004 02:26:28 -0000 1.17 *************** *** 15,19 **** using NHibernate.Engine; ! namespace NHibernate.Cfg { /// <summary> /// An instance of <c>Configuration</c> allows the application to specify properties --- 15,20 ---- using NHibernate.Engine; ! namespace NHibernate.Cfg ! { /// <summary> /// An instance of <c>Configuration</c> allows the application to specify properties *************** *** 42,50 **** private XmlSchema mappingSchema; public readonly static string MappingSchemaXMLNS = "urn:nhibernate-mapping-2.0"; private readonly static string MappingSchemaResource = "NHibernate.nhibernate-mapping-2.0.xsd"; ! protected void Reset() { classes = new Hashtable(); collections = new Hashtable(); --- 43,59 ---- private XmlSchema mappingSchema; + private XmlSchema cfgSchema; public readonly static string MappingSchemaXMLNS = "urn:nhibernate-mapping-2.0"; private readonly static string MappingSchemaResource = "NHibernate.nhibernate-mapping-2.0.xsd"; ! public readonly static string CfgSchemaXMLNS = "urn:nhibernate-configuration-2.0"; ! private readonly static string CfgSchemaResource = "NHibernate.nhibernate-configuration-2.0.xsd"; ! private readonly static string CfgNamespacePrefix = "cfg"; ! private static XmlNamespaceManager CfgNamespaceMgr; ! ! ! protected void Reset() ! { classes = new Hashtable(); collections = new Hashtable(); *************** *** 56,62 **** } ! public Configuration() { Reset(); mappingSchema = XmlSchema.Read(Assembly.GetExecutingAssembly().GetManifestResourceStream(MappingSchemaResource), null); } --- 65,76 ---- } ! /// <summary> ! /// Create a new Configuration object. ! /// </summary> ! public Configuration() ! { Reset(); mappingSchema = XmlSchema.Read(Assembly.GetExecutingAssembly().GetManifestResourceStream(MappingSchemaResource), null); + cfgSchema = XmlSchema.Read(Assembly.GetExecutingAssembly().GetManifestResourceStream(CfgSchemaResource), null); } *************** *** 640,644 **** private void AddProperties(XmlNode parent) { ! foreach(XmlNode node in parent.SelectNodes("property")) { string name = node.Attributes["name"].Value; --- 654,658 ---- private void AddProperties(XmlNode parent) { ! foreach(XmlNode node in parent.SelectNodes(CfgNamespacePrefix + ":property", CfgNamespaceMgr)) { string name = node.Attributes["name"].Value; *************** *** 678,684 **** XmlDocument doc = new XmlDocument(); try { ! doc.Load(resource); } catch (Exception e) --- 692,712 ---- XmlDocument doc = new XmlDocument(); + XmlValidatingReader validatingReader = null; + XmlTextReader reader = null; + try { ! reader = new XmlTextReader(resource); ! validatingReader = new XmlValidatingReader( reader ); ! validatingReader.ValidationType = ValidationType.Schema; ! validatingReader.Schemas.Add(cfgSchema); ! ! doc.Load(validatingReader); ! CfgNamespaceMgr = new XmlNamespaceManager(doc.NameTable); ! // note that the prefix has absolutely nothing to do with what the user ! // selects as their prefix in the document. It is the prefix we use to ! // build the XPath and the nsmgr takes care of translating our prefix into ! // the user defined prefix... ! CfgNamespaceMgr.AddNamespace(CfgNamespacePrefix, Configuration.CfgSchemaXMLNS); } catch (Exception e) *************** *** 688,699 **** } ! XmlNode sfNode = doc.DocumentElement.SelectSingleNode("session-factory"); XmlAttribute name = sfNode.Attributes["name"]; ! if (name!=null) properties.Add(Environment.SessionFactoryName, name.Value); AddProperties(sfNode); foreach(XmlNode mapElement in sfNode.ChildNodes) { ! string elemname = mapElement.Name; if ( "mapping".Equals(elemname) ) { --- 716,728 ---- } ! XmlNode sfNode = doc.DocumentElement.SelectSingleNode(CfgNamespacePrefix + ":session-factory", CfgNamespaceMgr); XmlAttribute name = sfNode.Attributes["name"]; ! if (name!=null) properties[Environment.SessionFactoryName] = name.Value; AddProperties(sfNode); foreach(XmlNode mapElement in sfNode.ChildNodes) { ! //string elemname = mapElement.Name; ! string elemname = mapElement.LocalName; if ( "mapping".Equals(elemname) ) { *************** *** 723,726 **** --- 752,756 ---- log.Debug("properties: " + properties); + validatingReader.Close(); return this; } |