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-06-04 12:02:56
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23194/NHibernate.Test Modified Files: FooBarTest.cs Log Message: Continued to work on the Domain Model and hbms for testing. Index: FooBarTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FooBarTest.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** FooBarTest.cs 3 Jun 2004 19:03:40 -0000 1.22 --- FooBarTest.cs 4 Jun 2004 12:02:44 -0000 1.23 *************** *** 50,70 **** fooBag.Add( new Foo() ); fooBag.Add( new Foo() ); ! baz.fooBag=fooBag; s.Save(baz); ! fooBag = baz.fooBag; s.Find("from Baz baz left join fetch fooBag"); Assert.IsTrue( NHibernate.IsInitialized(fooBag) ); ! Assert.IsTrue( fooBag==baz.fooBag ); ! Assert.IsTrue( baz.fooBag.Count==2 ); s.Close(); s = sessions.OpenSession(); ! baz = (Baz) s.Load( typeof(Baz), baz.code ); ! Object bag = baz.fooBag; Assert.IsFalse( NHibernate.IsInitialized(bag) ); s.Find("from Baz baz left join fetch fooBag"); Assert.IsFalse( NHibernate.IsInitialized(bag) ); ! Assert.IsTrue( bag==baz.fooBag ); ! Assert.IsTrue( baz.fooBag.Count==2 ); s.Delete(baz); s.Flush(); --- 50,70 ---- fooBag.Add( new Foo() ); fooBag.Add( new Foo() ); ! baz.FooBag=fooBag; s.Save(baz); ! fooBag = baz.FooBag; s.Find("from Baz baz left join fetch fooBag"); Assert.IsTrue( NHibernate.IsInitialized(fooBag) ); ! Assert.IsTrue( fooBag==baz.FooBag ); ! Assert.IsTrue( baz.FooBag.Count==2 ); s.Close(); s = sessions.OpenSession(); ! baz = (Baz) s.Load( typeof(Baz), baz.Code ); ! Object bag = baz.FooBag; Assert.IsFalse( NHibernate.IsInitialized(bag) ); s.Find("from Baz baz left join fetch fooBag"); Assert.IsFalse( NHibernate.IsInitialized(bag) ); ! Assert.IsTrue( bag==baz.FooBag ); ! Assert.IsTrue( baz.FooBag.Count==2 ); s.Delete(baz); s.Flush(); *************** *** 83,87 **** ss.Add(new Sortable("bar"), null); ss.Add(new Sortable("baz"), null); ! b.sortablez = ss; s.Save(b); s.Flush(); --- 83,87 ---- ss.Add(new Sortable("bar"), null); ss.Add(new Sortable("baz"), null); ! b.Sortablez = ss; s.Save(b); s.Flush(); *************** *** 92,104 **** t = s.BeginTransaction(); IList result = s.CreateCriteria(typeof(Baz)) ! .AddOrder( Expression.Order.Asc("name") ) .List(); b = (Baz) result[0]; ! Assert.IsTrue( b.sortablez.Count==3 ); // compare the first item in the "Set" sortablez - can't reference // the first item using b.sortablez[0] because it thinks 0 is the // DictionaryEntry key - not the index. ! foreach(DictionaryEntry de in b.sortablez) { Assert.AreEqual( ((Sortable)de.Key).name, "bar"); --- 92,104 ---- t = s.BeginTransaction(); IList result = s.CreateCriteria(typeof(Baz)) ! .AddOrder( Expression.Order.Asc("Name") ) .List(); b = (Baz) result[0]; ! Assert.IsTrue( b.Sortablez.Count==3 ); // compare the first item in the "Set" sortablez - can't reference // the first item using b.sortablez[0] because it thinks 0 is the // DictionaryEntry key - not the index. ! foreach(DictionaryEntry de in b.Sortablez) { Assert.AreEqual( ((Sortable)de.Key).name, "bar"); *************** *** 112,120 **** s = sessions.OpenSession(); t = s.BeginTransaction(); ! result = s.CreateQuery("from Baz baz left join fetch sortablez order by baz.name asc") .List(); b = (Baz) result[0]; ! Assert.IsTrue( b.sortablez.Count==3 ); ! foreach(DictionaryEntry de in b.sortablez) { Assert.AreEqual( ((Sortable)de.Key).name, "bar"); --- 112,120 ---- s = sessions.OpenSession(); t = s.BeginTransaction(); ! result = s.CreateQuery("from Baz baz left join fetch sortablez order by baz.Name asc") .List(); b = (Baz) result[0]; ! Assert.IsTrue( b.Sortablez.Count==3 ); ! foreach(DictionaryEntry de in b.Sortablez) { Assert.AreEqual( ((Sortable)de.Key).name, "bar"); *************** *** 127,135 **** s = sessions.OpenSession(); t = s.BeginTransaction(); ! result = s.CreateQuery("from Baz baz order by baz.name asc") .List(); b = (Baz) result[0]; ! Assert.IsTrue( b.sortablez.Count==3 ); ! foreach(DictionaryEntry de in b.sortablez) { Assert.AreEqual( ((Sortable)de.Key).name, "bar"); --- 127,135 ---- s = sessions.OpenSession(); t = s.BeginTransaction(); ! result = s.CreateQuery("from Baz baz order by baz.Name asc") .List(); b = (Baz) result[0]; ! Assert.IsTrue( b.Sortablez.Count==3 ); ! foreach(DictionaryEntry de in b.Sortablez) { Assert.AreEqual( ((Sortable)de.Key).name, "bar"); *************** *** 160,166 **** list.Add(fee); } ! baz.fees = list; list = s.Find("from Foo foo, Baz baz left join fetch fees"); ! Assert.IsTrue( NHibernate.IsInitialized( ( (Baz) ( (object[]) list[0] )[1] ).fees ) ); s.Delete(foo); s.Delete(foo2); --- 160,166 ---- list.Add(fee); } ! baz.Fees = list; list = s.Find("from Foo foo, Baz baz left join fetch fees"); ! Assert.IsTrue( NHibernate.IsInitialized( ( (Baz) ( (object[]) list[0] )[1] ).Fees ) ); s.Delete(foo); s.Delete(foo2); *************** *** 176,180 **** Baz baz = new Baz(); IList list = new ArrayList(); ! baz.bazez =list; list.Add( new Baz() ); s.Save(baz); --- 176,180 ---- Baz baz = new Baz(); IList list = new ArrayList(); ! baz.Bazez =list; list.Add( new Baz() ); s.Save(baz); *************** *** 218,222 **** s = sessions.OpenSession(); Baz baz = (Baz) s.Load(typeof(Baz), id); ! IDictionary foos = baz.fooSet; Assert.IsTrue( foos.Count==0 ); Foo foo = new Foo(); --- 218,222 ---- s = sessions.OpenSession(); Baz baz = (Baz) s.Load(typeof(Baz), id); ! IDictionary foos = baz.FooSet; Assert.IsTrue( foos.Count==0 ); Foo foo = new Foo(); |
From: Michael D. <mik...@us...> - 2004-06-04 12:02:55
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23194/NHibernate.DomainModel Modified Files: B.cs Baz.cs Baz.hbm.xml Log Message: Continued to work on the Domain Model and hbms for testing. Index: Baz.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Baz.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Baz.cs 3 Jun 2004 18:01:24 -0000 1.6 --- Baz.cs 4 Jun 2004 12:02:44 -0000 1.7 *************** *** 16,273 **** { - /// <summary> - /// Holds the _collectionComponent - /// </summary> - private NestingComponent _collectionComponent; - - /// <summary> - /// Gets or sets the _collectionComponent - /// </summary> - public NestingComponent collectionComponent - { - get - { - return _collectionComponent; - } - set - { - _collectionComponent = value; - } - } - #region Fields ! /// <summary> ! /// Holder for code ! /// </summary> private String _code; ! ! ! /// <summary> ! /// Holds the _timeArray ! /// </summary> ! private DateTime[] _timeArray; ! ! /// <summary> ! /// Gets or sets the _timeArray ! /// </summary> ! public DateTime[] timeArray ! { ! get ! { ! return _timeArray; ! } ! set ! { ! _timeArray = value; ! } ! } ! /// <summary> ! /// Holds the _components ! /// </summary> ! private FooComponent[] _components; ! ! /// <summary> ! /// Gets or sets the _components ! /// </summary> ! public FooComponent[] components ! { ! get ! { ! return _components; ! } ! set ! { ! _components = value; ! } ! } ! /// <summary> ! /// Holds the stringArray ! /// </summary> ! private string[] _stringArray; ! ! /// <summary> ! /// Gets or sets the stringArray ! /// </summary> ! public string[] stringArray ! { ! get ! { ! return _stringArray; ! } ! set ! { ! _stringArray = value; ! } ! } ! ! /// <summary> ! /// Holds the intArray ! /// </summary> ! private int[] _intArray; ! ! /// <summary> ! /// Gets or sets the intArray ! /// </summary> ! public int[] intArray ! { ! get ! { ! return _intArray; ! } ! set ! { ! _intArray = value; ! } ! } ! /// <summary> ! /// Holds the fooArray ! /// </summary> ! private FooProxy[] _fooArray; ! ! /// <summary> ! /// Gets or sets the fooArray ! /// </summary> ! public FooProxy[] fooArray ! { ! get ! { ! return _fooArray; ! } ! set ! { ! _fooArray = value; ! } ! } ! ! /// <summary> ! /// Holder for count ! /// </summary> private Int32 _count; - - /// <summary> - /// Holder for name - /// </summary> private String _name; - - /// <summary> - /// Holder for foo - /// </summary> private Foo _foo; - - /// <summary> - /// Holder for stringList - /// </summary> private System.Collections.IList _stringList; - - /// <summary> - /// Holder for fees - /// </summary> private System.Collections.IList _fees; - - /// <summary> - /// Holder for customs - /// </summary> private System.Collections.IList _customs; - - /// <summary> - /// Holder for topComponents - /// </summary> private System.Collections.IList _topComponents; - - /// <summary> - /// Holder for fooToGlarch - /// </summary> private System.Collections.IDictionary _fooToGlarch; - - /// <summary> - /// Holder for fooComponentToFoo - /// </summary> private System.Collections.IDictionary _fooComponentToFoo; - - /// <summary> - /// Holder for glarchToFoo - /// </summary> private System.Collections.IDictionary _glarchToFoo; - - /// <summary> - /// Holder for stringDateMap - /// </summary> private System.Collections.IDictionary _stringDateMap; - - /// <summary> - /// Holder for topGlarchez - /// </summary> private System.Collections.IDictionary _topGlarchez; - - /// <summary> - /// Holder for cachedMap - /// </summary> private System.Collections.IDictionary _cachedMap; - - /// <summary> - /// Holder for stringGlarchMap - /// </summary> private System.Collections.IDictionary _stringGlarchMap; - - /// <summary> - /// Holder for anyToAny - /// </summary> private System.Collections.IDictionary _anyToAny; - - /// <summary> - /// Holder for fooSet - /// </summary> private System.Collections.IDictionary _fooSet; - - /// <summary> - /// Holder for stringSet - /// </summary> private System.Collections.IDictionary _stringSet; - - /// <summary> - /// Holder for topFoos - /// </summary> private System.Collections.IDictionary _topFoos; - - /// <summary> - /// Holder for cascadingBars - /// </summary> private System.Collections.IDictionary _cascadingBars; - - /// <summary> - /// Holder for cached - /// </summary> private System.Collections.IDictionary _cached; - - /// <summary> - /// Holder for sortablez - /// </summary> private System.Collections.IDictionary _sortablez; - - /// <summary> - /// Holder for bag - /// </summary> private System.Collections.IList _bag; - - /// <summary> - /// Holder for fooBag - /// </summary> private System.Collections.IList _fooBag; - - /// <summary> - /// Holder for bazez - /// </summary> private System.Collections.IList _bazez; - - /// <summary> - /// Holder for idFooBag - /// </summary> private System.Collections.IList _idFooBag; - - /// <summary> - /// Holder for byteBag - /// </summary> private System.Collections.IList _byteBag; ! #endregion --- 16,55 ---- { #region Fields ! ! private NestingComponent _collectionComponent; private String _code; ! private DateTime[] _timeArray; ! private FooComponent[] _components; ! private string[] _stringArray; ! private int[] _intArray; ! private FooProxy[] _fooArray; private Int32 _count; private String _name; private Foo _foo; private System.Collections.IList _stringList; private System.Collections.IList _fees; private System.Collections.IList _customs; private System.Collections.IList _topComponents; private System.Collections.IDictionary _fooToGlarch; private System.Collections.IDictionary _fooComponentToFoo; private System.Collections.IDictionary _glarchToFoo; private System.Collections.IDictionary _stringDateMap; private System.Collections.IDictionary _topGlarchez; private System.Collections.IDictionary _cachedMap; private System.Collections.IDictionary _stringGlarchMap; private System.Collections.IDictionary _anyToAny; private System.Collections.IDictionary _fooSet; private System.Collections.IDictionary _stringSet; private System.Collections.IDictionary _topFoos; private System.Collections.IDictionary _cascadingBars; private System.Collections.IDictionary _cached; private System.Collections.IDictionary _sortablez; private System.Collections.IList _bag; private System.Collections.IList _fooBag; private System.Collections.IList _bazez; private System.Collections.IList _idFooBag; private System.Collections.IList _byteBag; ! #endregion *************** *** 284,291 **** #region Properties /// <summary> ! /// Get/set for code /// </summary> ! public String code { get --- 66,89 ---- #region Properties + + /// <summary> + /// Gets or sets the _collectionComponent + /// </summary> + public NestingComponent CollectionComponent + { + get + { + return _collectionComponent; + } + set + { + _collectionComponent = value; + } + } + /// <summary> ! /// Get/set for Code /// </summary> ! public String Code { get *************** *** 302,306 **** /// Get/set for count /// </summary> ! public Int32 count { get --- 100,104 ---- /// Get/set for count /// </summary> ! public Int32 Count { get *************** *** 317,321 **** /// Get/set for name /// </summary> ! public String name { get --- 115,119 ---- /// Get/set for name /// </summary> ! public String Name { get *************** *** 330,336 **** /// <summary> ! /// Get/set for foo /// </summary> ! public Foo foo { get --- 128,134 ---- /// <summary> ! /// Get/set for Foo /// </summary> ! public Foo Foo { get *************** *** 347,351 **** /// Get/set for stringList /// </summary> ! public System.Collections.IList stringList { get --- 145,149 ---- /// Get/set for stringList /// </summary> ! public System.Collections.IList StringList { get *************** *** 362,366 **** /// Get/set for fees /// </summary> ! public System.Collections.IList fees { get --- 160,164 ---- /// Get/set for fees /// </summary> ! public System.Collections.IList Fees { get *************** *** 377,381 **** /// Get/set for customs /// </summary> ! public System.Collections.IList customs { get --- 175,179 ---- /// Get/set for customs /// </summary> ! public System.Collections.IList Customs { get *************** *** 392,396 **** /// Get/set for topComponents /// </summary> ! public System.Collections.IList topComponents { get --- 190,194 ---- /// Get/set for topComponents /// </summary> ! public System.Collections.IList TopComponents { get *************** *** 407,411 **** /// Get/set for fooToGlarch /// </summary> ! public System.Collections.IDictionary fooToGlarch { get --- 205,209 ---- /// Get/set for fooToGlarch /// </summary> ! public System.Collections.IDictionary FooToGlarch { get *************** *** 422,426 **** /// Get/set for fooComponentToFoo /// </summary> ! public System.Collections.IDictionary fooComponentToFoo { get --- 220,224 ---- /// Get/set for fooComponentToFoo /// </summary> ! public System.Collections.IDictionary FooComponentToFoo { get *************** *** 437,441 **** /// Get/set for glarchToFoo /// </summary> ! public System.Collections.IDictionary glarchToFoo { get --- 235,239 ---- /// Get/set for glarchToFoo /// </summary> ! public System.Collections.IDictionary GlarchToFoo { get *************** *** 452,456 **** /// Get/set for stringDateMap /// </summary> ! public System.Collections.IDictionary stringDateMap { get --- 250,254 ---- /// Get/set for stringDateMap /// </summary> ! public System.Collections.IDictionary StringDateMap { get *************** *** 467,471 **** /// Get/set for topGlarchez /// </summary> ! public System.Collections.IDictionary topGlarchez { get --- 265,269 ---- /// Get/set for topGlarchez /// </summary> ! public System.Collections.IDictionary TopGlarchez { get *************** *** 482,486 **** /// Get/set for cachedMap /// </summary> ! public System.Collections.IDictionary cachedMap { get --- 280,284 ---- /// Get/set for cachedMap /// </summary> ! public System.Collections.IDictionary CachedMap { get *************** *** 497,501 **** /// Get/set for stringGlarchMap /// </summary> ! public System.Collections.IDictionary stringGlarchMap { get --- 295,299 ---- /// Get/set for stringGlarchMap /// </summary> ! public System.Collections.IDictionary StringGlarchMap { get *************** *** 512,516 **** /// Get/set for anyToAny /// </summary> ! public System.Collections.IDictionary anyToAny { get --- 310,314 ---- /// Get/set for anyToAny /// </summary> ! public System.Collections.IDictionary AnyToAny { get *************** *** 523,531 **** } } /// <summary> /// Get/set for fooSet /// </summary> ! public System.Collections.IDictionary fooSet { get --- 321,392 ---- } } + + /// <summary> + /// Gets or sets the intArray + /// </summary> + public int[] IntArray + { + get + { + return _intArray; + } + set + { + _intArray = value; + } + } + + /// <summary> + /// Gets or sets the _components + /// </summary> + public FooComponent[] Components + { + get + { + return _components; + } + set + { + _components = value; + } + } + + /// <summary> + /// Gets or sets the stringArray + /// </summary> + public string[] StringArray + { + get + { + return _stringArray; + } + set + { + _stringArray = value; + } + } + + /// <summary> + /// Gets or sets the fooArray + /// </summary> + public FooProxy[] FooArray + { + get + { + return _fooArray; + } + set + { + _fooArray = value; + } + } + + + /// <summary> /// Get/set for fooSet /// </summary> ! public System.Collections.IDictionary FooSet { get *************** *** 539,546 **** } /// <summary> /// Get/set for stringSet /// </summary> ! public System.Collections.IDictionary stringSet { get --- 400,422 ---- } + /// <summary> + /// Gets or sets the _timeArray + /// </summary> + public DateTime[] TimeArray + { + get + { + return _timeArray; + } + set + { + _timeArray = value; + } + } + /// <summary> /// Get/set for stringSet /// </summary> ! public System.Collections.IDictionary StringSet { get *************** *** 557,561 **** /// Get/set for topFoos /// </summary> ! public System.Collections.IDictionary topFoos { get --- 433,437 ---- /// Get/set for topFoos /// </summary> ! public System.Collections.IDictionary TopFoos { get *************** *** 572,576 **** /// Get/set for cascadingBars /// </summary> ! public System.Collections.IDictionary cascadingBars { get --- 448,452 ---- /// Get/set for cascadingBars /// </summary> ! public System.Collections.IDictionary CascadingBars { get *************** *** 587,591 **** /// Get/set for cached /// </summary> ! public System.Collections.IDictionary cached { get --- 463,467 ---- /// Get/set for cached /// </summary> ! public System.Collections.IDictionary Cached { get *************** *** 602,606 **** /// Get/set for sortablez /// </summary> ! public System.Collections.IDictionary sortablez { get --- 478,482 ---- /// Get/set for sortablez /// </summary> ! public System.Collections.IDictionary Sortablez { get *************** *** 617,621 **** /// Get/set for bag /// </summary> ! public System.Collections.IList bag { get --- 493,497 ---- /// Get/set for bag /// </summary> ! public System.Collections.IList Bag { get *************** *** 632,636 **** /// Get/set for fooBag /// </summary> ! public System.Collections.IList fooBag { get --- 508,512 ---- /// Get/set for fooBag /// </summary> ! public System.Collections.IList FooBag { get *************** *** 647,651 **** /// Get/set for bazez /// </summary> ! public System.Collections.IList bazez { get --- 523,527 ---- /// Get/set for bazez /// </summary> ! public System.Collections.IList Bazez { get *************** *** 662,666 **** /// Get/set for idFooBag /// </summary> ! public System.Collections.IList idFooBag { get --- 538,542 ---- /// Get/set for idFooBag /// </summary> ! public System.Collections.IList IdFooBag { get *************** *** 677,681 **** /// Get/set for byteBag /// </summary> ! public System.Collections.IList byteBag { get --- 553,557 ---- /// Get/set for byteBag /// </summary> ! public System.Collections.IList ByteBag { get *************** *** 691,736 **** #endregion ! public void setDefaults() { ! stringSet = new Hashtable(); ! stringSet.Add("foo", new object()); ! stringSet.Add("bar", new object()); ! stringSet.Add("baz", new object()); ! stringDateMap = new SortedList(); ! stringDateMap.Add( "now", DateTime.Now ); ! stringDateMap.Add( "never", null ); ! stringDateMap.Add( "big bang", new DateTime(0) ); ArrayList list = new ArrayList(); ! list.AddRange(stringSet.Keys); ! stringList = list; ! intArray = new int[] { 1,3,3,7 }; ! fooArray =new Foo[0]; ! stringArray = (String[]) list.ToArray(typeof(string) ); ! customs = new ArrayList(); ! customs.Add( new String[] { "foo", "bar" } ); ! customs.Add( new String[] { "A", "B" } ); ! customs.Add( new String[] { "1", "2" } ); ! fooSet = new Hashtable(); ! components = new FooComponent[] { new FooComponent("foo", 42, null, null), new FooComponent("bar", 88, null, new FooComponent("sub", 69, null, null) ) }; ! timeArray = new DateTime[] { new DateTime(), new DateTime(), DateTime.MinValue, new DateTime(0) }; ! count = 667; ! name="Bazza"; ! topComponents = new ArrayList(); ! topComponents.Add( new FooComponent("foo", 11, new DateTime[] { new DateTime(), new DateTime(2123,1,1) }, null) ); ! topComponents.Add( new FooComponent("bar", 22, new DateTime[] { new DateTime(2007,2,3), new DateTime(1945,6,1) }, null) ); ! topComponents.Add( null ); ! bag = new ArrayList(); ! bag.Add("duplicate"); ! bag.Add("duplicate"); ! bag.Add("duplicate"); ! bag.Add("unique"); ! cached = new SortedList(); CompositeElement ce = new CompositeElement(); --- 567,612 ---- #endregion ! public void SetDefaults() { ! StringSet = new Hashtable(); ! StringSet.Add("foo", new object()); ! StringSet.Add("bar", new object()); ! StringSet.Add("baz", new object()); ! StringDateMap = new SortedList(); ! StringDateMap.Add( "now", DateTime.Now ); ! StringDateMap.Add( "never", null ); ! StringDateMap.Add( "big bang", new DateTime(0) ); ArrayList list = new ArrayList(); ! list.AddRange(StringSet.Keys); ! StringList = list; ! IntArray = new int[] { 1,3,3,7 }; ! FooArray =new Foo[0]; ! StringArray = (String[]) list.ToArray(typeof(string) ); ! Customs = new ArrayList(); ! Customs.Add( new String[] { "foo", "bar" } ); ! Customs.Add( new String[] { "A", "B" } ); ! Customs.Add( new String[] { "1", "2" } ); ! FooSet = new Hashtable(); ! Components = new FooComponent[] { new FooComponent("foo", 42, null, null), new FooComponent("bar", 88, null, new FooComponent("sub", 69, null, null) ) }; ! TimeArray = new DateTime[] { new DateTime(), new DateTime(), DateTime.MinValue, new DateTime(0) }; ! Count = 667; ! Name="Bazza"; ! TopComponents = new ArrayList(); ! TopComponents.Add( new FooComponent("foo", 11, new DateTime[] { new DateTime(), new DateTime(2123,1,1) }, null) ); ! TopComponents.Add( new FooComponent("bar", 22, new DateTime[] { new DateTime(2007,2,3), new DateTime(1945,6,1) }, null) ); ! TopComponents.Add( null ); ! Bag = new ArrayList(); ! Bag.Add("duplicate"); ! Bag.Add("duplicate"); ! Bag.Add("duplicate"); ! Bag.Add("unique"); ! Cached = new SortedList(); CompositeElement ce = new CompositeElement(); *************** *** 740,747 **** ce2.foo = "fooxxx"; ce2.bar = "barxxx"; ! cached.Add(ce, new object()); ! cached.Add(ce2, new object()); ! cachedMap = new SortedList(); ! cachedMap.Add(this, ce); } #region IComparable Members --- 616,623 ---- ce2.foo = "fooxxx"; ce2.bar = "barxxx"; ! Cached.Add(ce, new object()); ! Cached.Add(ce2, new object()); ! CachedMap = new SortedList(); ! CachedMap.Add(this, ce); } #region IComparable Members *************** *** 749,753 **** public int CompareTo(object obj) { ! return ( (Baz) obj ).code.CompareTo(code); } --- 625,629 ---- public int CompareTo(object obj) { ! return ( (Baz) obj ).Code.CompareTo(Code); } Index: Baz.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Baz.hbm.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Baz.hbm.xml 3 Jun 2004 13:31:52 -0000 1.9 --- Baz.hbm.xml 4 Jun 2004 12:02:44 -0000 1.10 *************** *** 1,46 **** <?xml version="1.0"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! ! <class name="NHibernate.DomainModel.Baz, NHibernate.DomainModel" table="`baz baz baz`"> ! <id name="code" type="String"> ! <column name="baz_id" length="32"/> <generator class="uuid.hex"/> </id> ! <property name="count" column="count_count" type="Int32"/> ! <property name="name" column="name_b"/> ! <many-to-one name="foo" outer-join="true" class="NHibernate.DomainModel.Foo, NHibernate.DomainModel"/> ! <list name="stringList" table="string_list"> <key> ! <column name="id" length="16"/> </key> <index column="`i`"/> ! <element column="element" type="String"/> </list> ! <primitive-array name="intArray" table="int_array"> <key> ! <column name="id" length="16"/> </key> <index column="i"/> ! <element column="j" type="Int32"/> </primitive-array> ! <set name="fooSet" lazy="true" order-by="string_"> <key> ! <column name="baz_id" length="16"/> </key> ! <one-to-many class="NHibernate.DomainModel.Foo, NHibernate.DomainModel"/> </set> ! <array name="components" table="bazcomponents"> <key> ! <column name="baz_id" length="16"/> </key> <index column="i"/> ! <composite-element class="NHibernate.DomainModel.FooComponent, NHibernate.DomainModel"> <parent name="baz"/> <property name="name"> ! <column name="name" length="56"/> </property> ! <property name="count" column="count_" type="Int32"/> ! <nested-composite-element name="subcomponent" class="NHibernate.DomainModel.FooComponent, NHibernate.DomainModel"> <property name="name" column="x_"/> <property name="count" column="y_" type="Int32"/> --- 1,110 ---- <?xml version="1.0"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class ! name="NHibernate.DomainModel.Baz, NHibernate.DomainModel" ! table="`baz baz baz`" ! > ! <id ! name="Code" ! type="String" ! > ! <column ! name="baz_id" ! length="32" ! /> <generator class="uuid.hex"/> </id> ! <property ! name="Count" ! column="count_count" ! type="Int32" ! /> ! <property ! name="Name" ! column="name_b" ! /> ! <many-to-one ! name="Foo" ! outer-join="true" ! class="NHibernate.DomainModel.Foo, NHibernate.DomainModel" ! /> ! <list ! name="StringList" ! table="string_list" ! > <key> ! <column ! name="id" ! length="16" ! /> </key> <index column="`i`"/> ! <element ! column="element" ! type="String" ! /> </list> ! <primitive-array ! name="IntArray" ! table="int_array" ! > <key> ! <column ! name="id" ! length="16" ! /> </key> <index column="i"/> ! <element ! column="j" ! type="Int32" ! /> </primitive-array> ! <set ! name="FooSet" ! lazy="true" ! order-by="string_" ! > <key> ! <column ! name="baz_id" ! length="16" ! /> </key> ! <one-to-many ! class="NHibernate.DomainModel.Foo, NHibernate.DomainModel" ! /> </set> ! <array ! name="Components" ! table="bazcomponents" ! > <key> ! <column ! name="baz_id" ! length="16" ! /> </key> <index column="i"/> ! <composite-element ! class="NHibernate.DomainModel.FooComponent, NHibernate.DomainModel" ! > <parent name="baz"/> <property name="name"> ! <column ! name="name" ! length="56" ! /> </property> ! <property ! name="count" ! column="count_" ! type="Int32" ! /> ! <nested-composite-element ! name="subcomponent" ! class="NHibernate.DomainModel.FooComponent, NHibernate.DomainModel" ! > <property name="name" column="x_"/> <property name="count" column="y_" type="Int32"/> *************** *** 48,83 **** </composite-element> </array> ! <array name="timeArray"> <key> ! <column name="baz_id" length="16"/> </key> <index column="j"/> ! <element column="the_time" type="Time"/> </array> ! <bag name="bag" order-by="`name!`" table="`$%^^b'a'g`"> <key> ! <column name="`baz_id@#$`" length="16"/> </key> ! <element column="`name!`" type="String"/> </bag> ! <map name="fooToGlarch"> <key> ! <column name="baz_id" length="16"/> </key> ! <index-many-to-many column="foo_id" class="NHibernate.DomainModel.Foo, NHibernate.DomainModel"/> ! <many-to-many column="glarch_id" class="NHibernate.DomainModel.Glarch, NHibernate.DomainModel"/> </map> ! <map name="fooComponentToFoo"> <jcs-cache usage="read-write"/> <key> ! <column name="baz_id" length="16"/> </key> ! <composite-index class="NHibernate.DomainModel.FooComponent, NHibernate.DomainModel"> ! <key-property name="name" length="32"/> ! <key-property name="count" column="count_" type="Int32"/> </composite-index> ! <many-to-many column="foo_id" class="NHibernate.DomainModel.Foo, NHibernate.DomainModel" outer-join="true"/> </map> ! <map name="glarchToFoo"> <key> <column name="gtf_baz_id" length="16"/> --- 112,188 ---- </composite-element> </array> ! <array name="TimeArray"> <key> ! <column ! name="baz_id" ! length="16" ! /> </key> <index column="j"/> ! <element ! column="the_time" ! type="Time" ! /> </array> ! <bag ! name="Bag" ! order-by="`name!`" ! table="`$%^^b'a'g`" ! > <key> ! <column ! name="`baz_id@#$`" ! length="16" ! /> </key> ! <element ! column="`name!`" ! type="String" ! /> </bag> ! <map name="FooToGlarch"> <key> ! <column ! name="baz_id" ! length="16" ! /> </key> ! <index-many-to-many ! column="foo_id" ! class="NHibernate.DomainModel.Foo, NHibernate.DomainModel" ! /> ! <many-to-many ! column="glarch_id" ! class="NHibernate.DomainModel.Glarch, NHibernate.DomainModel" ! /> </map> ! <map name="FooComponentToFoo"> <jcs-cache usage="read-write"/> <key> ! <column ! name="baz_id" ! length="16" ! /> </key> ! <composite-index ! class="NHibernate.DomainModel.FooComponent, NHibernate.DomainModel" ! > ! <key-property ! name="name" ! length="32" ! /> ! <key-property ! name="count" ! column="count_" ! type="Int32" ! /> </composite-index> ! <many-to-many ! column="foo_id" ! class="NHibernate.DomainModel.Foo, NHibernate.DomainModel" ! outer-join="true" ! /> </map> ! <map name="GlarchToFoo"> <key> <column name="gtf_baz_id" length="16"/> *************** *** 87,91 **** </map> ! <set name="stringSet" lazy="true" sort="NHibernate.DomainModel.StringComparator, NHibernate.DomainModel"> <!--<jcs-cache usage="read-write"/>--> <key column="id_"/> --- 192,196 ---- </map> ! <set name="StringSet" lazy="true" sort="NHibernate.DomainModel.StringComparator, NHibernate.DomainModel"> <!--<jcs-cache usage="read-write"/>--> <key column="id_"/> *************** *** 93,97 **** </set> ! <map name="stringDateMap" lazy="true" sort="NHibernate.DomainModel.ReverseComparator, NHibernate.DomainModel"> <key column="id_"/> <index column="map_key" type="String" length="32"/> --- 198,202 ---- </set> ! <map name="StringDateMap" lazy="true" sort="NHibernate.DomainModel.ReverseComparator, NHibernate.DomainModel"> <key column="id_"/> <index column="map_key" type="String" length="32"/> *************** *** 99,103 **** </map> ! <array name="fooArray" element-class="NHibernate.DomainModel.FooProxy, NHibernate.DomainModel" where="i<8"> <jcs-cache usage="read-write"/> <key column="id_"/> --- 204,208 ---- </map> ! <array name="FooArray" element-class="NHibernate.DomainModel.FooProxy, NHibernate.DomainModel" where="i<8"> <jcs-cache usage="read-write"/> <key column="id_"/> *************** *** 108,117 **** </array> ! <bag name="fooBag" lazy="true" table="baz_foo" cascade="all" inverse="false"> <key column="baz"/> <many-to-many class="NHibernate.DomainModel.Foo, NHibernate.DomainModel" column="foo" outer-join="true"/> </bag> ! <idbag name="idFooBag" lazy="true" table="baz_id_foo" cascade="all"> <collection-id column="pkid" type="Int64"> <generator class="hilo"/> --- 213,222 ---- </array> ! <bag name="FooBag" lazy="true" table="baz_foo" cascade="all" inverse="false"> <key column="baz"/> <many-to-many class="NHibernate.DomainModel.Foo, NHibernate.DomainModel" column="foo" outer-join="true"/> </bag> ! <idbag name="IdFooBag" lazy="true" table="baz_id_foo" cascade="all"> <collection-id column="pkid" type="Int64"> <generator class="hilo"/> *************** *** 121,125 **** </idbag> ! <idbag name="byteBag" lazy="true" table="baz_byte_bag" cascade="all"> <collection-id column="pkid" type="Int64"> <generator class="hilo"/> --- 226,230 ---- </idbag> ! <idbag name="ByteBag" lazy="true" table="baz_byte_bag" cascade="all"> <collection-id column="pkid" type="Int64"> <generator class="hilo"/> *************** *** 129,133 **** </idbag> ! <array name="stringArray"> <key column="id_"/> <index column="i"/> --- 234,238 ---- </idbag> ! <array name="StringArray"> <key column="id_"/> <index column="i"/> *************** *** 135,139 **** </array> ! <list name="fees" lazy="true" cascade="all"> <key column="bazid"/> <index column="bazind"/> --- 240,244 ---- </array> ! <list name="Fees" lazy="true" cascade="all"> <key column="bazid"/> <index column="bazind"/> *************** *** 141,145 **** </list> ! <list name="customs"> <key column="id_"/> <index column="indx"/> --- 246,250 ---- </list> ! <list name="Customs"> <key column="id_"/> <index column="indx"/> *************** *** 150,154 **** </list> ! <list name="topComponents" table="topcomponents"> <jcs-cache usage="read-write"/> <key column="id_"/> --- 255,259 ---- </list> ! <list name="TopComponents" table="topcomponents"> <jcs-cache usage="read-write"/> <key column="id_"/> *************** *** 160,174 **** </list> ! <set name="topFoos"> <key column="idtopbar" /> <one-to-many class = "NHibernate.DomainModel.Bar, NHibernate.DomainModel"/> </set> ! <set name="cascadingBars" cascade="all"> <key column="idtopbar" /> <one-to-many class = "NHibernate.DomainModel.Bar, NHibernate.DomainModel"/> </set> ! <map name="topGlarchez"> <key column="idtopglarch" /> <index column="mapkey" type="Char"/> --- 265,279 ---- </list> ! <set name="TopFoos"> <key column="idtopbar" /> <one-to-many class = "NHibernate.DomainModel.Bar, NHibernate.DomainModel"/> </set> ! <set name="CascadingBars" cascade="all"> <key column="idtopbar" /> <one-to-many class = "NHibernate.DomainModel.Bar, NHibernate.DomainModel"/> </set> ! <map name="TopGlarchez"> <key column="idtopglarch" /> <index column="mapkey" type="Char"/> *************** *** 176,180 **** </map> ! <set name="cached" sort="natural" table="cached_set"> <jcs-cache usage="read-write"/> <key column="baz"/> --- 281,285 ---- </map> ! <set name="Cached" sort="natural" table="cached_set"> <jcs-cache usage="read-write"/> <key column="baz"/> *************** *** 185,189 **** </set> ! <map name="cachedMap" sort="natural" table="cached_map"> <jcs-cache usage="read-write"/> <key column="baz"/> --- 290,294 ---- </set> ! <map name="CachedMap" sort="natural" table="cached_map"> <jcs-cache usage="read-write"/> <key column="baz"/> *************** *** 195,199 **** </map> ! <map name="stringGlarchMap" where="baz_map_index > 'a' and tha_key is not null" cascade="all"> <key column="baz_map_id"/> <index column="baz_map_index" type="String"/> --- 300,304 ---- </map> ! <map name="StringGlarchMap" where="baz_map_index > 'a' and tha_key is not null" cascade="all"> <key column="baz_map_id"/> <index column="baz_map_index" type="String"/> *************** *** 201,205 **** </map> ! <map name="anyToAny" lazy="true"> <key column="baz"/> <index-many-to-any id-type="Int64"> --- 306,310 ---- </map> ! <map name="AnyToAny" lazy="true"> <key column="baz"/> <index-many-to-any id-type="Int64"> *************** *** 213,227 **** </map> ! <bag name="bazez" lazy="true" order-by="name_b desc" cascade="all"> <key column="`baz id`"/> <one-to-many class="NHibernate.DomainModel.Baz, NHibernate.DomainModel"/> </bag> ! <set name="sortablez" sort="natural" cascade="all"> <key column="baz"/> <one-to-many class="NHibernate.DomainModel.Sortable, NHibernate.DomainModel"/> </set> ! <component name="collectionComponent"> <component name="Nested"> <property name="Str"/> --- 318,332 ---- </map> ! <bag name="Bazez" lazy="true" order-by="name_b desc" cascade="all"> <key column="`baz id`"/> <one-to-many class="NHibernate.DomainModel.Baz, NHibernate.DomainModel"/> </bag> ! <set name="Sortablez" sort="natural" cascade="all"> <key column="baz"/> <one-to-many class="NHibernate.DomainModel.Sortable, NHibernate.DomainModel"/> </set> ! <component name="CollectionComponent"> <component name="Nested"> <property name="Str"/> Index: B.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/B.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** B.cs 3 Jun 2004 18:01:24 -0000 1.2 --- B.cs 4 Jun 2004 12:02:43 -0000 1.3 *************** *** 1,12 **** - //------------------------------------------------------------------------------ - // <autogenerated> - // This code was generated by a tool. - // Runtime Version: v1.1.4322 - // - // Changes to this file may cause incorrect behavior and will be lost if - // the code is regenerated. - // </autogenerated> - //------------------------------------------------------------------------------ - using System; --- 1,2 ---- |
From: Michael D. <mik...@us...> - 2004-06-03 19:03:50
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12468 Modified Files: FooBarTest.cs FumTest.cs Log Message: Uncommented hbm.xml files that can now be included in the test fixture Index: FooBarTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FooBarTest.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** FooBarTest.cs 20 May 2004 21:13:02 -0000 1.21 --- FooBarTest.cs 3 Jun 2004 19:03:40 -0000 1.22 *************** *** 13,35 **** public void SetUp() { ! ExportSchema(new string[] { "FooBar.hbm.xml", ! "Glarch.hbm.xml", ! "Fee.hbm.xml", ! "Qux.hbm.xml", ! "Fum.hbm.xml", ! "Baz.hbm.xml", ! // "Simple.hbm.xml", ! // "Fumm.hbm.xml", ! // "Fo.hbm.xml", ! // "One.hbm.xml", ! // "Many.hbm.xml", ! "Immutable.hbm.xml" ! // "Vetoer.hbm.xml", ! // "Holder.hbm.xml", ! // "Location.hbm.xml", ! // "Stuff.hbm.xml", ! // "Container.hbm.xml", ! // "XY.hbm.xml"}); ! }, true); } --- 13,36 ---- public void SetUp() { ! ExportSchema(new string[] { ! "FooBar.hbm.xml", ! "Glarch.hbm.xml", ! "Fee.hbm.xml", ! "Qux.hbm.xml", ! "Fum.hbm.xml", ! "Baz.hbm.xml", ! "Simple.hbm.xml", ! "Fumm.hbm.xml", ! "Fo.hbm.xml", ! "One.hbm.xml", ! "Many.hbm.xml", ! "Immutable.hbm.xml" , ! //"Vetoer.hbm.xml", ! "Holder.hbm.xml", ! "Location.hbm.xml", ! "Stuff.hbm.xml", ! //"Container.hbm.xml", ! "XY.hbm.xml" ! }, true); } Index: FumTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FumTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FumTest.cs 29 Apr 2004 15:16:00 -0000 1.1 --- FumTest.cs 3 Jun 2004 19:03:40 -0000 1.2 *************** *** 21,43 **** ExportSchema(new string[] { ! "FooBar.hbm.xml", ! "Baz.hbm.xml", ! "Qux.hbm.xml", ! "Glarch.hbm.xml", ! "Fum.hbm.xml", ! "Fumm.hbm.xml", ! //"Fo.hbm.xml", ! //"One.hbm.xml", ! //"Many.hbm.xml", ! //"Immutable.hbm.xml", ! "Fee.hbm.xml" ! //"Vetoer.hbm.xml", ! //"Holder.hbm.xml", ! //"Location.hbm.xml", ! //"Stuff.hbm.xml", ! //"Container.hbm.xml", ! //"Simple.hbm.xml", ! //"Middle.hbm.xml" ! }, true); } --- 21,43 ---- ExportSchema(new string[] { ! "FooBar.hbm.xml", ! "Baz.hbm.xml", ! "Qux.hbm.xml", ! "Glarch.hbm.xml", ! "Fum.hbm.xml", ! "Fumm.hbm.xml", ! "Fo.hbm.xml", ! "One.hbm.xml", ! "Many.hbm.xml", ! "Immutable.hbm.xml", ! "Fee.hbm.xml", ! //"Vetoer.hbm.xml", ! "Holder.hbm.xml", ! "Location.hbm.xml", ! "Stuff.hbm.xml" ! //"Container.hbm.xml", ! //"Simple.hbm.xml", ! //"Middle.hbm.xml" ! }, true); } *************** *** 70,84 **** // else // { ! id.date = new DateTime(2004, 4, 29, 9, 0, 0, 0); // } ! id.@string = str; if (aCompositeQueryTest) { ! id.@short = fumKeyShort++ ; } else { ! id.@short = (short)12 ; } --- 70,84 ---- // else // { ! id.Date = new DateTime(2004, 4, 29, 9, 0, 0, 0); // } ! id.String = str; if (aCompositeQueryTest) { ! id.Short = fumKeyShort++ ; } else { ! id.Short = (short)12 ; } |
From: Michael D. <mik...@us...> - 2004-06-03 18:56:07
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10432 Modified Files: Container.hbm.xml Fo.hbm.xml Fum.cs Fum.hbm.xml FumCompositeID.cs Fumm.hbm.xml Holder.hbm.xml Location.cs Location.hbm.xml Many.hbm.xml One.hbm.xml Stuff.hbm.xml Vetoer.hbm.xml XY.hbm.xml Log Message: Continued to add Domain Classes and mappings for test fixtures. Index: Location.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Location.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Location.cs 3 Jun 2004 14:29:00 -0000 1.1 --- Location.cs 3 Jun 2004 18:55:57 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Globalization; namespace NHibernate.DomainModel *************** *** 13,17 **** private string _streetName; private string _countryCode; ! // private Locale _locale; TODO: how to do this in .net?? private string _description; --- 14,18 ---- private string _streetName; private string _countryCode; ! private CultureInfo _locale; private string _description; *************** *** 47,50 **** --- 48,56 ---- } + public CultureInfo Locale + { + get { return _locale; } + set { _locale = value; } + } #region System.Object Members Index: Location.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Location.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Location.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 --- Location.hbm.xml 3 Jun 2004 18:55:57 -0000 1.3 *************** *** 1,13 **** <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="net.sf.hibernate.test.Location"> <composite-id> ! <key-property name="streetNumber" /> ! <key-property name="streetName" length="20" /> ! <key-property name="city" length="20" /> ! <key-property name="countryCode" length="2" /> </composite-id> ! <property name="locale" /> ! <property name="description" /> </class> </hibernate-mapping> \ No newline at end of file --- 1,24 ---- <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class ! name="NHibernate.DomainModel.Location, NHibernate.DomainModel" ! > <composite-id> ! <key-property name="StreetNumber" /> ! <key-property ! name="StreetName" ! length="20" ! /> ! <key-property ! name="City" ! length="20" ! /> ! <key-property ! name="CountryCode" ! length="2" ! /> </composite-id> ! <property name="Locale" /> ! <property name="Description" /> </class> </hibernate-mapping> \ No newline at end of file Index: Stuff.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Stuff.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Stuff.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 --- Stuff.hbm.xml 3 Jun 2004 18:55:57 -0000 1.3 *************** *** 1,29 **** <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="net.sf.hibernate.test.MoreStuff"> <composite-id> ! <key-property name="intId" /> ! <key-property name="stringId" length="32" /> </composite-id> ! <property name="name" /> ! <bag name="stuffs" inverse="true" lazy="false" cascade="all"> <key> <!--unfortunately have to specify not-null here because of limitation in schema export....--> ! <column name="moreInt" not-null="true" /> ! <column name="moreString" not-null="true" length="32" /> </key> ! <one-to-many class="net.sf.hibernate.test.Stuff" /> </bag> </class> ! <class name="net.sf.hibernate.test.Stuff"> <composite-id unsaved-value="any"> ! <key-property name="id" /> ! <key-many-to-one name="foo" class="net.sf.hibernate.test.Foo" /> ! <key-many-to-one name="moreStuff" class="net.sf.hibernate.test.MoreStuff"> ! <column name="moreInt" /> ! <column name="moreString" length="32" /> </key-many-to-one> </composite-id> ! <property name="property" /> </class> </hibernate-mapping> \ No newline at end of file --- 1,67 ---- <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class ! name="NHibernate.DomainModel.MoreStuff, NHibernate.DomainModel" ! > <composite-id> ! <key-property ! name="IntId" ! /> ! <key-property ! name="StringId" ! length="32" ! /> </composite-id> ! <property name="Name" /> ! <bag ! name="Stuffs" ! inverse="true" ! lazy="false" ! cascade="all" ! > <key> <!--unfortunately have to specify not-null here because of limitation in schema export....--> ! <column ! name="moreInt" ! not-null="true" ! /> ! <column ! name="moreString" ! not-null="true" ! length="32" ! /> </key> ! <one-to-many ! class="NHibernate.DomainModel.Stuff, NHibernate.DomainModel" ! /> </bag> </class> ! <class ! name="NHibernate.DomainModel.Stuff, NHibernate.DomainModel" ! > <composite-id unsaved-value="any"> ! <key-property name="Id" /> ! <key-many-to-one ! name="Foo" ! class="NHibernate.DomainModel.Foo, NHibernate.DomainModel" ! /> ! <key-many-to-one ! name="MoreStuff" ! class="NHibernate.DomainModel.MoreStuff, NHibernate.DomainModel" ! > ! ! <column ! name="moreInt" ! /> ! <column ! name="moreString" ! length="32" ! /> </key-many-to-one> </composite-id> ! <!-- ! TODO: in h2.0.3 this is mapped to a TimeZone - what to use in .net??? ! <property name="Property" /> ! --> </class> </hibernate-mapping> \ No newline at end of file Index: Fumm.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Fumm.hbm.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Fumm.hbm.xml 29 Apr 2004 15:16:00 -0000 1.4 --- Fumm.hbm.xml 3 Jun 2004 18:55:57 -0000 1.5 *************** *** 3,11 **** <class name="NHibernate.DomainModel.Fumm, NHibernate.DomainModel"> <composite-id name="Id"> ! <key-property name="string"> <column name="string_" length="10" /> </key-property> ! <key-property name="short" column="short_" /> ! <key-property name="date" column="date_" type="DateTime" /> </composite-id> --- 3,11 ---- <class name="NHibernate.DomainModel.Fumm, NHibernate.DomainModel"> <composite-id name="Id"> ! <key-property name="String"> <column name="string_" length="10" /> </key-property> ! <key-property name="Short" column="short_" /> ! <key-property name="Date" column="date_" type="DateTime" /> </composite-id> Index: Fum.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Fum.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Fum.cs 3 Jun 2004 03:23:33 -0000 1.3 --- Fum.cs 3 Jun 2004 18:55:57 -0000 1.4 *************** *** 24,30 **** FumCompositeID fid = new FumCompositeID(); ! fid.date= new DateTime(2004, 4, 29, 9, 50, 0, 0); ! fid.@short= (short) ( id.@short + 33 ); ! fid.@string= id.@string + "dd"; Fum f = new Fum(); --- 24,30 ---- FumCompositeID fid = new FumCompositeID(); ! fid.Date= new DateTime(2004, 4, 29, 9, 50, 0, 0); ! fid.Short= (short) ( id.Short + 33 ); ! fid.String= id.String + "dd"; Fum f = new Fum(); Index: XY.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/XY.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** XY.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 --- XY.hbm.xml 3 Jun 2004 18:55:57 -0000 1.3 *************** *** 1,18 **** <?xml version="1.0" encoding="UTF-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="net.sf.hibernate.test.X"> ! <id name="id" unsaved-value="0"> <generator class="foreign"> ! <param name="property">y</param> </generator> </id> ! <one-to-one name="y" constrained="true" cascade="all" /> </class> ! <class name="net.sf.hibernate.test.Y"> ! <id name="id"> <generator class="hilo" /> </id> ! <property name="x" /> ! <one-to-one name="theX" cascade="save-update" /> </class> </hibernate-mapping> --- 1,18 ---- <?xml version="1.0" encoding="UTF-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="NHibernate.DomainModel.X, NHibernate.DomainModel"> ! <id name="Id" unsaved-value="0"> <generator class="foreign"> ! <param name="property">Y</param> </generator> </id> ! <one-to-one name="Y" constrained="true" cascade="all" /> </class> ! <class name="NHibernate.DomainModel.Y, NHibernate.DomainModel"> ! <id name="Id"> <generator class="hilo" /> </id> ! <property name="X" /> ! <one-to-one name="TheX" cascade="save-update" /> </class> </hibernate-mapping> Index: One.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/One.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** One.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 --- One.hbm.xml 3 Jun 2004 18:55:57 -0000 1.3 *************** *** 1,13 **** <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="net.sf.hibernate.test.One" table="one"> ! <id name="key" column="one_key"> <generator class="native" /> </id> ! <property name="x" /> ! <property column="one_value" name="value" /> ! <set name="manies" inverse="true" lazy="true"> <key column="one_key" /> ! <one-to-many class="net.sf.hibernate.test.Many" /> </set> </class> --- 1,28 ---- <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class ! name="NHibernate.DomainModel.One, NHibernate.DomainModel" ! table="one" ! > ! <id ! name="Key" ! column="one_key" ! > <generator class="native" /> </id> ! <property name="X" /> ! <property ! column="one_value" ! name="Value" ! /> ! <set ! name="Manies" ! inverse="true" ! lazy="true" ! > <key column="one_key" /> ! <one-to-many ! class="NHibernate.DomainModel.Many, NHibernate.DomainModel" ! /> </set> </class> Index: Many.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Many.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Many.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 --- Many.hbm.xml 3 Jun 2004 18:55:57 -0000 1.3 *************** *** 1,10 **** <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="net.sf.hibernate.test.Many" table="many"> ! <id name="key" column="many_key"> <generator class="native" /> </id> ! <property name="x" /> ! <many-to-one name="one" column="one_key" class="net.sf.hibernate.test.One" /> </class> </hibernate-mapping> --- 1,20 ---- <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class ! name="NHibernate.DomainModel.Many, NHibernate.DomainModel" ! table="many" ! > ! <id ! name="Key" ! column="many_key" ! > <generator class="native" /> </id> ! <property name="X" /> ! <many-to-one ! name="One" ! column="one_key" ! class="NHibernate.DomainModel.One, NHibernate.DomainModel" ! /> </class> </hibernate-mapping> Index: Fum.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Fum.hbm.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Fum.hbm.xml 9 Apr 2004 13:14:53 -0000 1.3 --- Fum.hbm.xml 3 Jun 2004 18:55:57 -0000 1.4 *************** *** 3,11 **** <class name="NHibernate.DomainModel.Fum, NHibernate.DomainModel"> <composite-id name="id" unsaved-value="any"> ! <key-property name="string"> <column name="string_" length="10" /> </key-property> ! <key-property name="short" column="short_" /> ! <key-property name="date" column="date_" type="DateTime" /> </composite-id> <version name="lastUpdated" type="DateTime" /> --- 3,11 ---- <class name="NHibernate.DomainModel.Fum, NHibernate.DomainModel"> <composite-id name="id" unsaved-value="any"> ! <key-property name="String"> <column name="string_" length="10" /> </key-property> ! <key-property name="Short" column="short_" /> ! <key-property name="Date" column="date_" type="DateTime" /> </composite-id> <version name="lastUpdated" type="DateTime" /> Index: Container.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Container.hbm.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Container.hbm.xml 3 Jun 2004 18:01:24 -0000 1.3 --- Container.hbm.xml 3 Jun 2004 18:55:57 -0000 1.4 *************** *** 14,18 **** <class name="NHibernate.DomainModel.Container, NHibernate.DomainModel" ! proxy="net.sf.hibernate.test.Container" > <id --- 14,18 ---- <class name="NHibernate.DomainModel.Container, NHibernate.DomainModel" ! proxy="NHibernate.DomainModel.Container, NHibernate.DomainModel" > <id *************** *** 40,44 **** <index column="list_index" /> <many-to-many ! class="net.sf.hibernate.test.Simple" /> </list> --- 40,44 ---- <index column="list_index" /> <many-to-many ! class="NHibernate.DomainModel.Simple, NHibernate.DomainModel" /> </list> *************** *** 133,137 **** <index column="idx" ! type="string" length="32" /> --- 133,137 ---- <index column="idx" ! type="String(32)" length="32" /> Index: FumCompositeID.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FumCompositeID.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FumCompositeID.cs 3 Jun 2004 03:23:33 -0000 1.2 --- FumCompositeID.cs 3 Jun 2004 18:55:57 -0000 1.3 *************** *** 7,58 **** public class FumCompositeID { ! String string_; ! DateTime date_; ! short short_; ! ! public override bool Equals(object obj) { ! FumCompositeID that = (FumCompositeID) obj; ! return this.string_.Equals(that.string_) && this.short_==that.short_; } ! ! public override int GetHashCode() { ! return string_.GetHashCode(); } ! ! public string @string { ! get ! { ! return string_; ! } ! set ! { ! this.string_ = value; ! } } ! public DateTime date { ! get ! { ! return date_; ! } ! set ! { ! this.date_ = value; ! } } ! public short @short { ! get ! { ! return short_; ! } ! set ! { ! this.short_ = value; ! } } } } \ No newline at end of file --- 7,45 ---- public class FumCompositeID { ! String _string; ! DateTime _date; ! short _short; ! ! public string String { ! get { return _string; } ! set { _string = value; } } ! public DateTime Date { ! get { return _date; } ! set { _date = value; } } ! public short Short { ! get { return _short; } ! set { _short = value; } } ! ! ! #region System.Object Members ! ! public override bool Equals(object obj) { ! FumCompositeID that = (FumCompositeID) obj; ! return this._string.Equals(that._string) && this._short==that._short; } ! ! public override int GetHashCode() { ! return _string.GetHashCode(); } + + #endregion } } \ No newline at end of file Index: Fo.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Fo.hbm.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Fo.hbm.xml 9 Apr 2004 13:14:53 -0000 1.3 --- Fo.hbm.xml 3 Jun 2004 18:55:57 -0000 1.4 *************** *** 1,16 **** <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="net.sf.hibernate.test.Fo" table="foes"> ! <composite-id class="net.sf.hibernate.test.FumCompositeID"> ! <key-property name="string"> ! <column name="string_" length="20" /> </key-property> ! <key-property name="short" column="short_" /> ! <key-property name="date" column="date_" type="DateTime" /> </composite-id> ! <version name="version" type="long" /> ! <property name="serial" column="serial_" /> ! <property name="buf" /> ! <property name="x" /> </class> </hibernate-mapping> \ No newline at end of file --- 1,40 ---- <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class ! name="NHibernate.DomainModel.Fo, NHibernate.DomainModel" ! table="foes" ! > ! <composite-id ! class="NHibernate.DomainModel.FumCompositeID, NHibernate.DomainModel" ! > ! <key-property name="String"> ! <column ! name="String_" ! length="20" ! /> </key-property> ! <key-property ! name="Short" ! column="short_" ! /> ! <key-property ! name="Date" ! column="date_" ! type="DateTime" ! /> </composite-id> ! <version ! name="Version" ! type="Int64" ! /> ! <!-- ! TODO: commented out because couldn't find a Type ! <property ! name="Serial" ! column="serial_" ! /> ! --> ! <property name="Buf" /> ! <property name="X" /> </class> </hibernate-mapping> \ No newline at end of file Index: Holder.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Holder.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Holder.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 --- Holder.hbm.xml 3 Jun 2004 18:55:57 -0000 1.3 *************** *** 1,22 **** <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="net.sf.hibernate.test.Holder"> ! <id name="id" column="id_" type="string" length="32" unsaved-value="null"> <generator class="uuid.hex" /> </id> ! <property name="name" unique="true" not-null="true" length="36" /> ! <list name="ones"> <key column="holder" /> <index column="i" /> ! <one-to-many class="net.sf.hibernate.test.One" /> </list> ! <array name="fooArray"> <key column="holder1" /> <index column="j1" /> ! <one-to-many class="net.sf.hibernate.test.Foo" /> </array> ! <set name="foos"> <key column="holder2" /> ! <one-to-many class="net.sf.hibernate.test.Foo" /> </set> </class> --- 1,38 ---- <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="NHibernate.DomainModel.Holder, NHibernate.DomainModel"> ! <id name="Id" ! column="id_" ! type="String(32)" ! length="32" ! unsaved-value="null" ! > <generator class="uuid.hex" /> </id> ! <property ! name="Name" ! unique="true" ! not-null="true" ! length="36" ! /> ! <list name="Ones"> <key column="holder" /> <index column="i" /> ! <one-to-many ! class="NHibernate.DomainModel.One, NHibernate.DomainModel" ! /> </list> ! <array name="FooArray"> <key column="holder1" /> <index column="j1" /> ! <one-to-many ! class="NHibernate.DomainModel.Foo, NHibernate.DomainModel" ! /> </array> ! <set name="Foos"> <key column="holder2" /> ! <one-to-many ! class="NHibernate.DomainModel.Foo, NHibernate.DomainModel" ! /> </set> </class> Index: Vetoer.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Vetoer.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Vetoer.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 --- Vetoer.hbm.xml 3 Jun 2004 18:55:57 -0000 1.3 *************** *** 1,10 **** <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="net.sf.hibernate.test.Vetoer"> ! <id type="string" column="id_" length="32"> <generator class="uuid.hex" /> </id> ! <property name="name" /> ! <property name="strings" /> </class> </hibernate-mapping> \ No newline at end of file --- 1,16 ---- <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class ! name="NHibernate.DomainModel.Vetoer, NHibernate.DomainModel" ! > ! <id ! type="String(32)" ! column="id_" ! length="32" ! > <generator class="uuid.hex" /> </id> ! <property name="Name" /> ! <property name="Strings" /><!-- TODO: fix that NH is not recognizing this as an array --> </class> </hibernate-mapping> \ No newline at end of file |
From: Michael D. <mik...@us...> - 2004-06-03 18:01:37
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29900 Modified Files: A.cs ABC.hbm.xml ABCProxy.hbm.xml B.cs Bar.cs Baz.cs C1.cs C2.cs Container.hbm.xml NHibernate.DomainModel-1.1.csproj Added Files: Category.hbm.xml Circular.hbm.xml INameable.hbm.xml MasterDetail.hbm.xml Middle.hbm.xml Multi.hbm.xml SingleSeveral.hbm.xml WZ.hbm.xml Log Message: Continued to add Domain Classes for test fixtures. Index: Baz.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Baz.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Baz.cs 28 Apr 2004 14:17:10 -0000 1.5 --- Baz.cs 3 Jun 2004 18:01:24 -0000 1.6 *************** *** 1,12 **** - //------------------------------------------------------------------------------ - // <autogenerated> - // This code was generated by a tool. - // Runtime Version: v1.1.4322 - // - // Changes to this file may cause incorrect behavior and will be lost if - // the code is regenerated. - // </autogenerated> - //------------------------------------------------------------------------------ - using System; using System.Collections; --- 1,2 ---- *************** *** 45,48 **** --- 35,39 ---- } } + #region Fields /// <summary> Index: NHibernate.DomainModel-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel-1.1.csproj,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** NHibernate.DomainModel-1.1.csproj 3 Jun 2004 14:54:40 -0000 1.16 --- NHibernate.DomainModel-1.1.csproj 3 Jun 2004 18:01:24 -0000 1.17 *************** *** 186,189 **** --- 186,193 ---- /> <File + RelPath = "Category.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "Child.cs" SubType = "Code" *************** *** 200,203 **** --- 204,211 ---- /> <File + RelPath = "Circular.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "ClassWithCompositeId.cs" SubType = "Code" *************** *** 365,368 **** --- 373,380 ---- /> <File + RelPath = "INameable.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "INamed.cs" SubType = "Code" *************** *** 422,425 **** --- 434,441 ---- /> <File + RelPath = "MasterDetail.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "Middle.cs" SubType = "Code" *************** *** 427,430 **** --- 443,450 ---- /> <File + RelPath = "Middle.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "MiddleKey.cs" SubType = "Code" *************** *** 447,450 **** --- 467,474 ---- /> <File + RelPath = "Multi.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "Multiplicity.cs" SubType = "Code" *************** *** 569,572 **** --- 593,600 ---- /> <File + RelPath = "SingleSeveral.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "Sortable.cs" SubType = "Code" *************** *** 649,652 **** --- 677,684 ---- /> <File + RelPath = "WZ.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "X.cs" SubType = "Code" --- NEW FILE: INameable.hbm.xml --- <?xml version="1.0"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="NHibernate.DomainModel.INameable, NHibernate.DomainModel" > <id name="Key" column="key_" > <generator class="native"/> </id> <discriminator column="clazz"/> <property name="Name"/> <subclass name="NHibernate.DomainModel.BasicNameable, NHibernate.DomainModel" /> </class> </hibernate-mapping> Index: B.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/B.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** B.cs 6 Apr 2004 10:51:42 -0000 1.1 --- B.cs 3 Jun 2004 18:01:24 -0000 1.2 *************** *** 72,76 **** /// Get/set for count /// </summary> ! public Int32 count { get --- 72,76 ---- /// Get/set for count /// </summary> ! public Int32 Count { get *************** *** 87,91 **** /// Get/set for map /// </summary> ! public System.Collections.IDictionary map { get --- 87,91 ---- /// Get/set for map /// </summary> ! public System.Collections.IDictionary Map { get --- NEW FILE: Circular.hbm.xml --- <?xml version="1.0"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" default-cascade="save-update"> <class name="NHibernate.DomainModel.Circular, NHibernate.DomainModel" dynamic-update="true" > <id name="Id" column="id_" length="64" unsaved-value="null" > <generator class="uuid.hex"/> </id> <property name="Clazz"/> <many-to-one name="Other"/> <property name="AnyEntity"> <column name="classname"/> <column name="any_id"/> </property> </class> </hibernate-mapping> Index: ABCProxy.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/ABCProxy.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ABCProxy.hbm.xml 7 Apr 2004 21:23:16 -0000 1.2 --- ABCProxy.hbm.xml 3 Jun 2004 18:01:24 -0000 1.3 *************** *** 3,15 **** <class name="NHibernate.DomainModel.A, NHibernate.DomainModel" discriminator-value="0" proxy="NHibernate.DomainModel.A, NHibernate.DomainModel"> ! <id name="id" unsaved-value="null" type="Int64"> <generator class="native" /> </id> <discriminator column="clazz" type="Int32" force="true" not-null="false" /> ! <property name="name" /> <subclass name="NHibernate.DomainModel.B, NHibernate.DomainModel" discriminator-value="null" proxy="NHibernate.DomainModel.B, NHibernate.DomainModel"> ! <property name="count" column="count_" type="Int32" /> ! <map name="map"> <key column="BID" /> <index column="MAPKEY" type="String" /> --- 3,15 ---- <class name="NHibernate.DomainModel.A, NHibernate.DomainModel" discriminator-value="0" proxy="NHibernate.DomainModel.A, NHibernate.DomainModel"> ! <id name="Id" unsaved-value="null" type="Int64"> <generator class="native" /> </id> <discriminator column="clazz" type="Int32" force="true" not-null="false" /> ! <property name="Name" /> <subclass name="NHibernate.DomainModel.B, NHibernate.DomainModel" discriminator-value="null" proxy="NHibernate.DomainModel.B, NHibernate.DomainModel"> ! <property name="Count" column="count_" type="Int32" /> ! <map name="Map"> <key column="BID" /> <index column="MAPKEY" type="String" /> *************** *** 18,27 **** <subclass name="NHibernate.DomainModel.C1, NHibernate.DomainModel" discriminator-value="1" proxy="NHibernate.DomainModel.C1, NHibernate.DomainModel"> ! <property name="address" column="c1" /> ! <one-to-one name="d" class="NHibernate.DomainModel.D, NHibernate.DomainModel" /> </subclass> <subclass name="NHibernate.DomainModel.C2, NHibernate.DomainModel" discriminator-value="2" proxy="NHibernate.DomainModel.C2, NHibernate.DomainModel"> ! <property name="address" column="c2" /> </subclass> </subclass> --- 18,27 ---- <subclass name="NHibernate.DomainModel.C1, NHibernate.DomainModel" discriminator-value="1" proxy="NHibernate.DomainModel.C1, NHibernate.DomainModel"> ! <property name="Address" column="c1" /> ! <one-to-one name="D" class="NHibernate.DomainModel.D, NHibernate.DomainModel" /> </subclass> <subclass name="NHibernate.DomainModel.C2, NHibernate.DomainModel" discriminator-value="2" proxy="NHibernate.DomainModel.C2, NHibernate.DomainModel"> ! <property name="Address" column="c2" /> </subclass> </subclass> --- NEW FILE: Multi.hbm.xml --- <?xml version="1.0"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="NHibernate.DomainModel.Simple, NHibernate.DomainModel" table="rootclass" dynamic-insert="true" dynamic-update="true" > <jcs-cache usage="read-write"/> <id type="Int64" column="id_" > <generator class="native"/> </id> <version name="Count" column="count_" /> <property name="Name"/> <property name="Address"/> <property name="Date" column="date_" /> <joined-subclass name="NHibernate.DomainModel.Mono, NHibernate.DomainModel" table="mono" dynamic-insert="true" dynamic-update="true" > <key column="superid"/> <set name="Strings" table="monostrings" > <key column="monoid_"/> <element type="String" column="str_" /> </set> </joined-subclass> <joined-subclass name="NHibernate.DomainModel.TrivialClass, NHibernate.DomainModel" > <key column="tcid"/> </joined-subclass> <joined-subclass name="NHibernate.DomainModel.LessSimple, NHibernate.DomainModel" table="leafsubclass" dynamic-insert="true" dynamic-update="true" > <key column="id__"/> <property name="Intprop" not-null="true" /> <one-to-one name="Other" class="NHibernate.DomainModel.LessSimple, NHibernate.DomainModel" /> <many-to-one name="Another" column="other1" class="NHibernate.DomainModel.Simple, NHibernate.DomainModel" /> <many-to-one name="Yetanother" column="other3" class="NHibernate.DomainModel.LessSimple, NHibernate.DomainModel" /> <property name="foo"/> <set name="Set" lazy="false" > <key column="parent"/> <one-to-many class="NHibernate.DomainModel.Simple, NHibernate.DomainModel"/> </set> <bag name="Bag" lazy="true" table="simple_simple" > <key column="simple1"/> <many-to-many column="simple2" class="NHibernate.DomainModel.Simple" /> </bag> <one-to-one name="Mypo"/> </joined-subclass> <joined-subclass name="NHibernate.DomainModel.Multi, NHibernate.DomainModel" table="nonleafsubclass" > <key column="sid"/> <property name="extraProp"/> <many-to-one name="Other" column="other2" class="NHibernate.DomainModel.Multi, NHibernate.DomainModel" /> <many-to-one name="Po"/> <component name="comp" class="NHibernate.DomainModel.Multi$Component, NHibernate.DomainModel" > <!-- TODO: figure out how to reflect on a nested type --> <property name="cal"/> <property name="floaty"/> </component> <joined-subclass name="NHibernate.DomainModel.SubMulti, NHibernate.DomainModel" table="leafsubsubclass" > <key column="sid"/> <property name="amount"/> <bag name="Children" lazy="true" inverse="true" > <key column="parent"/> <one-to-many class="NHibernate.DomainModel.SubMulti, NHibernate.DomainModel"/> </bag> <many-to-one name="parent"/> <list name="moreChildren" lazy="true"> <key column="another_parent"/> <index column="list_ind"/> <one-to-many class="NHibernate.DomainModel.SubMulti, NHibernate.DomainModel"/> </list> </joined-subclass> </joined-subclass> </class> <class name="NHibernate.DomainModel.Po, NHibernate.DomainModel" dynamic-insert="true" > <id type="Int64" column="id_" > <generator class="native"/> </id> <property name="Value" column="value_" /> <list name="list" cascade="all" > <key column="list_po"/> <index column="i"/> <one-to-many class="NHibernate.DomainModel.SubMulti, NHibernate.DomainModel" /> </list> <set name="Set" inverse="true" cascade="all" > <key column="po" /> <one-to-many class="NHibernate.DomainModel.Multi, NHibernate.DomainModel" /> </set> </class> </hibernate-mapping> Index: C1.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/C1.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** C1.cs 8 Apr 2004 14:59:32 -0000 1.2 --- C1.cs 3 Jun 2004 18:01:24 -0000 1.3 *************** *** 74,78 **** /// Get/set for address /// </summary> ! public String address { get --- 74,78 ---- /// Get/set for address /// </summary> ! public String Address { get *************** *** 89,93 **** /// Get/set for d /// </summary> ! public D d { get --- 89,93 ---- /// Get/set for d /// </summary> ! public D D { get Index: C2.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/C2.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** C2.cs 6 Apr 2004 10:51:42 -0000 1.1 --- C2.cs 3 Jun 2004 18:01:24 -0000 1.2 *************** *** 67,71 **** /// Get/set for address /// </summary> ! public String address { get --- 67,71 ---- /// Get/set for address /// </summary> ! public String Address { get --- NEW FILE: MasterDetail.hbm.xml --- <?xml version="1.0"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="NHibernate.DomainModel.Master, NHibernate.DomainModel" > <id column="master_key" type="Int64" > <generator class="native"/> </id> <!--TODO: make sure this type has an equiv .net type--> <version type="Timestamp" name="stamp" column="ts_" /> <property name="name"/> <property name="x"/> <!-- length="5" <column name="big_dec" sql-type="DECIMAL(5,3)"/> --> <property name="BigDecimal" type="Decimal(5,3)" column="big_dec" /> <set name="Details" inverse="true" lazy="true" order-by="i asc" > <key column="master_key"/> <one-to-many class="NHibernate.DomainModel.Detail, NHibernate.DomainModel"/> </set> <set name="MoreDetails" cascade="all" lazy="true" order-by="i desc" > <key column="more_master_key"/> <one-to-many class="NHibernate.DomainModel.Detail, NHibernate.DomainModel"/> </set> <set name="Incoming" lazy="true" table="mtm" > <key column="outgoingabcdef"/> <many-to-many class="NHibernate.DomainModel.Master, NHibernate.DomainModel" column="incomingabcdef" /> </set> <set name="Outgoing" lazy="true" table="mtm" inverse="true" > <key column="incomingabcdef"/> <many-to-many class="NHibernate.DomainModel.Master, NHibernate.DomainModel" column="outgoingabcdef" /> </set> <many-to-one name="OtherMaster"/> </class> <class name="NHibernate.DomainModel.Detail, NHibernate.DomainModel" > <id column="detail_key" type="Int64" > <generator class="native"/> </id> <property name="X"> <column name="x" unique-key="uk"/> </property> <property name="I"> <column name="i" unique-key="uk"/> </property> <many-to-one name="Master"> <column name="master_key" unique-key="uk"/> </many-to-one> <set name="SubDetails" lazy="true" cascade="all" > <key column="detail_key"/> <one-to-many class="NHibernate.DomainModel.SubDetail, NHibernate.DomainModel"/> </set> </class> <class name="NHibernate.DomainModel.SubDetail, NHibernate.DomainModel" > <id column="subdetail_key" type="Int64" > <generator class="native"> <param name="sequence">fooseq</param> </generator> </id> <property name="Name"/> </class> <query name="all_details"><![CDATA[ from d in class NHibernate.DomainModel.Detail ]]></query> </hibernate-mapping> Index: Container.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Container.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Container.hbm.xml 6 Apr 2004 13:36:17 -0000 1.2 --- Container.hbm.xml 3 Jun 2004 18:01:24 -0000 1.3 *************** *** 1,88 **** <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" auto-import="false"> ! <import class="net.sf.hibernate.test.Container" rename="ContainerX" /> ! <import class="net.sf.hibernate.test.Contained" /> ! <import class="java.lang.Object" rename="Universe" /> ! <class name="net.sf.hibernate.test.Container" proxy="net.sf.hibernate.test.Container"> ! <id name="id" column="container_id"> <generator class="native" /> </id> ! <list name="oneToMany" lazy="true"> <key column="container_id1" /> <index column="list_index" /> ! <one-to-many class="net.sf.hibernate.test.Simple" /> </list> ! <list name="manyToMany" lazy="true"> <key column="container_id2" /> <index column="list_index" /> ! <many-to-many class="net.sf.hibernate.test.Simple" /> </list> ! <list name="components" lazy="true"> <key column="container_id" /> <index column="list_index" /> ! <composite-element class="net.sf.hibernate.test.Container$ContainerInnerClass"> ! <property name="name" /> ! <property name="count" column="count_" /> ! <many-to-one name="simple" /> ! <many-to-one name="one" /> ! <many-to-one name="many" /> </composite-element> </list> ! <set name="composites" lazy="true"> <key column="container_id" /> ! <composite-element class="net.sf.hibernate.test.Container$ContainerInnerClass"> ! <property name="name" /> ! <many-to-one name="simple" /> ! <many-to-one name="one" /> ! <many-to-one name="many" /> </composite-element> </set> ! <bag name="cascades" cascade="all" table="abcd"> <key column="container_id" /> ! <composite-element class="net.sf.hibernate.test.Container$ContainerInnerClass"> ! <property name="name" /> ! <many-to-one name="simple" cascade="all" /> ! <many-to-one name="one" cascade="all" not-null="true" /> ! <many-to-one name="many" cascade="all" not-null="true" /> </composite-element> </bag> ! <bag name="bag" inverse="true" cascade="save-update" table="CCBAG"> <key column="container_id" /> ! <many-to-many column="contained_id" class="net.sf.hibernate.test.Contained" outer-join="true" /> </bag> ! <bag name="lazyBag" inverse="true" lazy="true" table="LCCBAG" cascade="save-update"> <!--jcs-cache usage="read-write"--> <key column="container_id" /> ! <many-to-many column="contained_id" class="net.sf.hibernate.test.Contained" /> </bag> ! <map name="ternaryMap"> <key column="container_id" /> ! <index column="idx" type="string" length="32" /> ! <composite-element class="net.sf.hibernate.test.Container$Ternary"> ! <property name="name" /> ! <many-to-one name="foo" /> ! <many-to-one name="glarch" /> </composite-element> </map> ! <set name="ternarySet"> <key column="container_id" /> ! <composite-element class="net.sf.hibernate.test.Container$Ternary"> ! <property name="name" /> ! <many-to-one name="foo" /> ! <many-to-one name="glarch" /> </composite-element> </set> </class> ! <class name="net.sf.hibernate.test.Contained" proxy="net.sf.hibernate.test.Contained"> ! <id name="id" column="container_id" unsaved-value="0"> <generator class="native" /> </id> ! <bag name="bag" table="CCBAG"> <key column="contained_id" /> ! <many-to-many column="container_id" class="net.sf.hibernate.test.Container" outer-join="false" /> </bag> ! <bag name="lazyBag" lazy="true" table="LCCBAG"> <key column="contained_id" /> ! <many-to-many column="container_id" class="net.sf.hibernate.test.Container" /> </bag> </class> --- 1,190 ---- <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" auto-import="false"> ! <import ! class="NHibernate.DomainModel.Container, NHibernate.DomainModel" ! rename="ContainerX" ! /> ! <import ! class="NHibernate.DomainModel.Contained, NHibernate.DomainModel" ! /> ! <import ! class="System.Object" ! rename="Universe" ! /> ! <class ! name="NHibernate.DomainModel.Container, NHibernate.DomainModel" ! proxy="net.sf.hibernate.test.Container" ! > ! <id ! name="Id" ! column="container_id" ! > <generator class="native" /> </id> ! ! <list ! name="OneToMany" ! lazy="true" ! > <key column="container_id1" /> <index column="list_index" /> ! <one-to-many ! class="NHibernate.DomainModel.Simple, NHibernate.DomainModel" ! /> </list> ! <list ! name="ManyToMany" ! lazy="true" ! > <key column="container_id2" /> <index column="list_index" /> ! <many-to-many ! class="net.sf.hibernate.test.Simple" ! /> </list> ! <list ! name="Components" ! lazy="true" ! > <key column="container_id" /> <index column="list_index" /> ! <composite-element ! class="NHibernate.DomainModel.Container$ContainerInnerClass, NHibernate.DomainModel" ! > ! <property name="Name" /> ! <property ! name="Count" ! column="count_" ! /> ! <many-to-one name="Simple" /> ! <many-to-one name="One" /> ! <many-to-one name="Many" /> </composite-element> </list> ! <set ! name="Composites" ! lazy="true" ! > <key column="container_id" /> ! <composite-element ! class="NHibernate.DomainModel.Container$ContainerInnerClass, NHibernate.DomainModel" ! > ! <property name="Name" /> ! <many-to-one name="Simple" /> ! <many-to-one name="One" /> ! <many-to-one name="Many" /> </composite-element> </set> ! <bag ! name="Cascades" ! cascade="all" ! table="abcd" ! > <key column="container_id" /> ! <composite-element ! class="NHibernate.DomainModel.Container$ContainerInnerClass, NHibernate.DomainModel" ! > ! <property name="Name" /> ! <many-to-one ! name="Simple" ! cascade="all" ! /> ! <many-to-one ! name="One" ! cascade="all" ! not-null="true" ! /> ! <many-to-one ! name="Many" ! cascade="all" ! not-null="true" ! /> </composite-element> </bag> ! <bag ! name="Bag" ! inverse="true" ! cascade="save-update" ! table="CCBAG" ! > <key column="container_id" /> ! <many-to-many ! column="contained_id" ! class="NHibernate.DomainModel.Contained, NHibernate.DomainModel" ! outer-join="true" ! /> </bag> ! <bag ! name="LazyBag" ! inverse="true" ! lazy="true" ! table="LCCBAG" ! cascade="save-update" ! > <!--jcs-cache usage="read-write"--> <key column="container_id" /> ! <many-to-many ! column="contained_id" ! class="NHibernate.DomainModel.Contained, NHibernate.DomainModel" ! /> </bag> ! <map name="TernaryMap"> <key column="container_id" /> ! <index ! column="idx" ! type="string" ! length="32" ! /> ! <composite-element ! class="NHibernate.DomainModel.Container$Ternary, NHibernate.DomainModel" ! > ! <property name="Name" /> ! <many-to-one name="Foo" /> ! <many-to-one name="Glarch" /> </composite-element> </map> ! <set name="TernarySet"> <key column="container_id" /> ! <composite-element ! class="NHibernate.DomainModel.Container$Ternary, NHibernate.DomainModel" ! > ! <property name="Name" /> ! <many-to-one name="Foo" /> ! <many-to-one name="Glarch" /> </composite-element> </set> </class> ! <class ! name="NHibernate.DomainModel.Contained, NHibernate.DomainModel" ! proxy="NHibernate.DomainModel.Contained, NHibernate.DomainModel" ! > ! <id ! name="Id" ! column="container_id" ! unsaved-value="0" ! > <generator class="native" /> </id> ! <bag ! name="Bag" ! table="CCBAG" ! > <key column="contained_id" /> ! <many-to-many ! column="container_id" ! class="NHibernate.DomainModel.Container, NHibernate.DomainModel" ! outer-join="false" ! /> </bag> ! <bag ! name="LazyBag" ! lazy="true" ! table="LCCBAG" ! > <key column="contained_id" /> ! <many-to-many ! column="container_id" ! class="NHibernate.DomainModel.Container, NHibernate.DomainModel" ! /> </bag> </class> --- NEW FILE: SingleSeveral.hbm.xml --- <?xml version="1.0"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="NHibernate.DomainModel.Single, NHibernate.DomainModel" > <composite-id> <key-property name="Id" length="32" /> <key-property name="String" length="32" column="string_" /> </composite-id> <property name="Prop"/> <bag name="Several" inverse="true" lazy="false" cascade="all" > <!--important: test for bidirectional with lazy="false" --> <key> <column name="single_id" not-null="true" /> <column name="single_string" not-null="true" /> </key> <one-to-many class="NHibernate.DomainModel.Several, NHibernate.DomainModel" /> </bag> </class> <class name="NHibernate.DomainModel.Several, NHibernate.DomainModel" > <composite-id unsaved-value="any" > <key-property name="Id" length="32" /> <key-property name="String" length="32" column="string_" /> </composite-id> <many-to-one name="single" > <column name="single_id" length="32" /> <column name="single_string" length="32" /> </many-to-one> </class> </hibernate-mapping> Index: Bar.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Bar.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Bar.cs 2 Jun 2004 04:53:24 -0000 1.2 --- Bar.cs 3 Jun 2004 18:01:24 -0000 1.3 *************** *** 4,15 **** namespace NHibernate.DomainModel { - public class Bar : Abstract, BarProxy { - - /// <summary> - /// Holds the _x - /// </summary> private int _x; /// <summary> --- 4,16 ---- namespace NHibernate.DomainModel { public class Bar : Abstract, BarProxy { private int _x; + private string _barString; + private FooComponent _barComponent = new FooComponent("bar", 69, null, null); + private Baz _baz; + private string _name = "bar"; + private object _object; + /// <summary> *************** *** 18,35 **** public int X { ! get ! { ! return _x; ! } ! set ! { ! _x = value; ! } } - - /// <summary> - /// Holds the _barString - /// </summary> - private string _barString; /// <summary> --- 19,25 ---- public int X { ! get { return _x; } ! set { _x = value; } } /// <summary> *************** *** 38,56 **** public string BarString { ! get ! { ! return _barString; ! } ! set ! { ! _barString = value; ! } } ! /// <summary> ! /// Holds the _barComponent ! /// </summary> ! private FooComponent _barComponent = new FooComponent("bar", 69, null, null); ! /// <summary> /// Gets or sets the _barComponent --- 28,36 ---- public string BarString { ! get { return _barString; } ! set { _barString = value; } } ! /// <summary> /// Gets or sets the _barComponent *************** *** 58,76 **** public FooComponent BarComponent { ! get ! { ! return _barComponent; ! } ! set ! { ! _barComponent = value; ! } } ! /// <summary> ! /// Holds the _baz ! /// </summary> ! private Baz _baz; ! /// <summary> /// Gets or sets the _baz --- 38,46 ---- public FooComponent BarComponent { ! get { return _barComponent; } ! set { _barComponent = value; } } ! /// <summary> /// Gets or sets the _baz *************** *** 78,96 **** public Baz Baz { ! get ! { ! return _baz; ! } ! set ! { ! _baz = value; ! } } ! /// <summary> ! /// Holds the _name ! /// </summary> ! private string _name = "bar"; ! /// <summary> /// Gets or sets the _name --- 48,56 ---- public Baz Baz { ! get { return _baz; } ! set { _baz = value; } } ! /// <summary> /// Gets or sets the _name *************** *** 98,116 **** public string Name { ! get ! { ! return _name; ! } ! set ! { ! _name = value; ! } } ! /// <summary> ! /// Holds the _object ! /// </summary> ! private object _object; ! /// <summary> /// Gets or sets the _object --- 58,66 ---- public string Name { ! get { return _name; } ! set { _name = value; } } ! /// <summary> /// Gets or sets the _object *************** *** 118,129 **** public object Object { ! get ! { ! return _object; ! } ! set ! { ! _object = value; ! } } } --- 68,73 ---- public object Object { ! get { return _object; } ! set { _object = value; } } } Index: ABC.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/ABC.hbm.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ABC.hbm.xml 7 Apr 2004 21:23:16 -0000 1.3 --- ABC.hbm.xml 3 Jun 2004 18:01:24 -0000 1.4 *************** *** 1,27 **** <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="NHibernate.DomainModel.A, NHibernate.DomainModel" discriminator-value="0"> ! <id name="id" unsaved-value="null"> <generator class="native" /> </id> ! <discriminator column="clazz" type="Int32" not-null="false" /> ! <property name="name" /> ! <subclass name="NHibernate.DomainModel.B, NHibernate.DomainModel" discriminator-value="-1"> ! <property name="count" column="count_" type="Int32" /> ! <subclass name="NHibernate.DomainModel.C1, NHibernate.DomainModel" discriminator-value="null"> ! <property name="address" column="c1" /> ! <one-to-one name="d" class="NHibernate.DomainModel.D, NHibernate.DomainModel" /> </subclass> ! <subclass name="NHibernate.DomainModel.C2, NHibernate.DomainModel" discriminator-value="2"> ! <property name="address" column="c2" /> </subclass> </subclass> </class> ! <class name="NHibernate.DomainModel.D, NHibernate.DomainModel" discriminator-value="0" ! proxy="NHibernate.DomainModel.D, NHibernate.DomainModel"> ! <id name="id" unsaved-value="null"> <generator class="assigned" /> </id> ! <property name="amount" type="Double" /> </class> </hibernate-mapping> \ No newline at end of file --- 1,72 ---- <?xml version="1.0" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class ! name="NHibernate.DomainModel.A, NHibernate.DomainModel" ! discriminator-value="0" ! > ! <id ! name="Id" ! unsaved-value="null" ! > <generator class="native" /> </id> ! ! <discriminator ! column="clazz" ! type="Int32" ! not-null="false" ! /> ! ! <property name="Name" /> ! ! <subclass ! name="NHibernate.DomainModel.B, NHibernate.DomainModel" ! discriminator-value="-1" ! > ! <property ! name="Count" ! column="count_" ! type="Int32" ! /> ! ! <subclass ! name="NHibernate.DomainModel.C1, NHibernate.DomainModel" ! discriminator-value="null" ! > ! <property ! name="Address" ! column="c1" ! /> ! <one-to-one ! name="D" ! class="NHibernate.DomainModel.D, NHibernate.DomainModel" ! /> </subclass> ! <subclass ! name="NHibernate.DomainModel.C2, NHibernate.DomainModel" ! discriminator-value="2" ! > ! <property ! name="Address" ! column="c2" ! /> </subclass> </subclass> </class> ! <class ! name="NHibernate.DomainModel.D, NHibernate.DomainModel" ! discriminator-value="0" ! proxy="NHibernate.DomainModel.D, NHibernate.DomainModel" ! > ! <id ! name="id" ! unsaved-value="null" ! > <generator class="assigned" /> </id> ! <property ! name="amount" ! type="Double" ! /> </class> </hibernate-mapping> \ No newline at end of file --- NEW FILE: Middle.hbm.xml --- <?xml version="1.0" encoding="UTF-8"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="NHibernate.DomainModel.Inner, NHibernate.DomainModel" table="CID_IN" > <composite-id name="Id"> <key-property name="akey" type="String(10)" length="10" column="AKEY" /> <key-property name="bkey" type="String(10)" length="10" column="BKEY" /> </composite-id> <property name="Dudu" length="10" column="DUDU" not-null="true" type="String(10)" /> </class> <class name="NHibernate.DomainModel.Middle, NHibernate.DomainModel" table="CID_MID" > <composite-id name="Id"> <key-many-to-one name="sup"> <column length="10" name="AKEY" /> <column length="10" name="BKEY" /> </key-many-to-one> <key-property name="One" type="String(10)" length="10" column="ONE" /> <key-property name="Two" type="String(10)" length="10" column="TWO" /> </composite-id> <property column="BLA" length="10" name="Bla" not-null="true" type="String(10)" /> </class> <class name="NHibernate.DomainModel.Outer, NHibernate.DomainModel" table="CID_OUT" > <composite-id name="Id"> <key-many-to-one name="master"> <column name="AKEY"/> <column name="BKEY"/> <column name="ONE"/> <column name="TWO"/> </key-many-to-one> <key-property name="detailId" type="String(10)" column="ID" length="10" /> </composite-id> <property name="Bubu" column="BUBU" length="10" type="String(10)" /> </class> </hibernate-mapping> Index: A.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/A.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** A.cs 6 Apr 2004 10:51:42 -0000 1.1 --- A.cs 3 Jun 2004 18:01:24 -0000 1.2 *************** *** 1,11 **** - //------------------------------------------------------------------------------ - // <autogenerated> - // This code was generated by a tool. - // Runtime Version: v1.1.4322 - // - // Changes to this file may cause incorrect behavior and will be lost if - // the code is regenerated. - // </autogenerated> - //------------------------------------------------------------------------------ using System; --- 1,2 ---- *************** *** 15,23 **** /// <summary> ! /// POJO for A /// </summary> - /// <remark> - /// This class is autogenerated - /// </remark> [Serializable] public class A --- 6,11 ---- /// <summary> ! /// POCO for A /// </summary> [Serializable] public class A *************** *** 60,64 **** /// Get/set for id /// </summary> ! public Int64 id { get --- 48,52 ---- /// Get/set for id /// </summary> ! public Int64 Id { get *************** *** 75,79 **** /// Get/set for name /// </summary> ! public String name { get --- 63,67 ---- /// Get/set for name /// </summary> ! public String Name { get --- NEW FILE: Category.hbm.xml --- <?xml version="1.0"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="NHibernate.DomainModel.Category, NHibernate.DomainModel" table="category" dynamic-update="true" dynamic-insert="true" > <id name="Id" unsaved-value="0" > <generator class="native"/> </id> <list name="Subcategories" lazy="true" cascade="all" > <key column="parent"/> <index column="ord"/> <one-to-many class="NHibernate.DomainModel.Category, NHibernate.DomainModel"/> </list> <property name="Name"/> <many-to-one name="Assignable" column="`assign able id`" /> </class> <class name="NHibernate.DomainModel.Assignable, NHibernate.DomainModel" table="`assign able`" > <id name="Id"> <generator class="assigned"/> </id> <bag name="Categories" inverse="true" cascade="all" > <key column="`assign able id`"/> <one-to-many class="NHibernate.DomainModel.Category, NHibernate.DomainModel"/> </bag> </class> </hibernate-mapping> --- NEW FILE: WZ.hbm.xml --- <?xml version="1.0"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="NHibernate.DomainModel.Z, NHibernate.DomainModel" > <id name="Id" unsaved-value="0"> <generator class="hilo"/> </id> <many-to-one name="W" class="NHibernate.DomainModel.W, NHibernate.DomainModel" cascade="save-update" insert="true" update="false" not-null="true" /> </class> <class name="NHibernate.DomainModel.W, NHibernate.DomainModel" discriminator-value="0" proxy="NHibernate.DomainModel.Z, NHibernate.DomainModel" > <id name="Id" unsaved-value="0"> <generator class="hilo"/> </id> <!-- This was commented out in the H2.0.3 test... <set name="zeds" lazy="true"> <key column="w"/> <one-to-many class="net.sf.hibernate.test.Z"/> </set> --> </class> </hibernate-mapping> |
From: Michael D. <mik...@us...> - 2004-06-03 18:00:41
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29643 Modified Files: ABCProxyTest.cs ABCTest.cs Log Message: Properties in Domain Classes were changed to use casing according to .net standards. Index: ABCProxyTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ABCProxyTest.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ABCProxyTest.cs 12 Apr 2004 05:48:33 -0000 1.4 --- ABCProxyTest.cs 3 Jun 2004 18:00:31 -0000 1.5 *************** *** 31,40 **** D d = new D(); d.amount =213.34f; ! c1.address = "foo bar"; ! c1.count = 23432; ! c1.name = "c1"; ! c1.d = d; s.Save(c1); ! d.id = c1.id; s.Save(d); t.Commit(); --- 31,40 ---- D d = new D(); d.amount =213.34f; ! c1.Address = "foo bar"; ! c1.Count = 23432; ! c1.Name = "c1"; ! c1.D = d; s.Save(c1); ! d.id = c1.Id; s.Save(d); t.Commit(); *************** *** 44,50 **** t = s.BeginTransaction(); // Test won't run after this line because of proxy initalization problems ! A c1a = (A) s.Load(typeof(A), c1.id ); Assert.IsFalse( NHibernate.IsInitialized(c1a) ); ! Assert.IsTrue( c1a.name.Equals("c1") ); t.Commit(); s.Close(); --- 44,50 ---- t = s.BeginTransaction(); // Test won't run after this line because of proxy initalization problems ! A c1a = (A) s.Load(typeof(A), c1.Id ); Assert.IsFalse( NHibernate.IsInitialized(c1a) ); ! Assert.IsTrue( c1a.Name.Equals("c1") ); t.Commit(); s.Close(); *************** *** 52,59 **** s = sessions.OpenSession(); t = s.BeginTransaction(); ! B c1b = (B) s.Load( typeof(B), c1.id ); Assert.IsTrue( ! (c1b.count==23432) && ! c1b.name.Equals("c1") ); t.Commit(); --- 52,59 ---- s = sessions.OpenSession(); t = s.BeginTransaction(); ! B c1b = (B) s.Load( typeof(B), c1.Id ); Assert.IsTrue( ! (c1b.Count==23432) && ! c1b.Name.Equals("c1") ); t.Commit(); *************** *** 154,158 **** Hashtable map = new Hashtable(); map.Add("3", 1 ); ! b.map = map; s.Flush(); s.Delete(b); --- 154,158 ---- Hashtable map = new Hashtable(); map.Add("3", 1 ); ! b.Map = map; s.Flush(); s.Delete(b); *************** *** 164,168 **** map.Add("3", 1); b = new B(); ! b.map = map; s.Save(b); s.Flush(); --- 164,168 ---- map.Add("3", 1); b = new B(); ! b.Map = map; s.Save(b); s.Flush(); Index: ABCTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ABCTest.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ABCTest.cs 12 Apr 2004 05:48:33 -0000 1.4 --- ABCTest.cs 3 Jun 2004 18:00:31 -0000 1.5 *************** *** 33,42 **** D d = new D(); d.amount =213.34f; ! c1.address = "foo bar"; ! c1.count = 23432; ! c1.name ="c1"; ! c1.d = d; s.Save(c1); ! d.id = c1.id; s.Save(d); --- 33,42 ---- D d = new D(); d.amount =213.34f; ! c1.Address = "foo bar"; ! c1.Count = 23432; ! c1.Name ="c1"; ! c1.D = d; s.Save(c1); ! d.id = c1.Id; s.Save(d); *************** *** 48,57 **** s = sessions.OpenSession(); t = s.BeginTransaction(); ! c1 = (C1) s.Load( typeof(A), c1.id ); Assert.IsTrue( ! c1.address.Equals("foo bar") && ! (c1.count==23432) && ! c1.name.Equals("c1") && ! c1.d.amount>213.3f ); t.Commit(); --- 48,57 ---- s = sessions.OpenSession(); t = s.BeginTransaction(); ! c1 = (C1) s.Load( typeof(A), c1.Id ); Assert.IsTrue( ! c1.Address.Equals("foo bar") && ! (c1.Count==23432) && ! c1.Name.Equals("c1") && ! c1.D.amount>213.3f ); t.Commit(); *************** *** 60,69 **** s = sessions.OpenSession(); t = s.BeginTransaction(); ! c1 = (C1) s.Load( typeof(B), c1.id ); Assert.IsTrue( ! c1.address.Equals("foo bar") && ! (c1.count==23432) && ! c1.name.Equals("c1") && ! c1.d.amount>213.3f ); t.Commit(); --- 60,69 ---- s = sessions.OpenSession(); t = s.BeginTransaction(); ! c1 = (C1) s.Load( typeof(B), c1.Id ); Assert.IsTrue( ! c1.Address.Equals("foo bar") && ! (c1.Count==23432) && ! c1.Name.Equals("c1") && ! c1.D.amount>213.3f ); t.Commit(); *************** *** 72,81 **** s = sessions.OpenSession(); t = s.BeginTransaction(); ! c1 = (C1) s.Load( typeof(C1), c1.id ); Assert.IsTrue( ! c1.address.Equals("foo bar") && ! (c1.count==23432) && ! c1.name.Equals("c1") && ! c1.d.amount>213.3f ); t.Commit(); --- 72,81 ---- s = sessions.OpenSession(); t = s.BeginTransaction(); ! c1 = (C1) s.Load( typeof(C1), c1.Id ); Assert.IsTrue( ! c1.Address.Equals("foo bar") && ! (c1.Count==23432) && ! c1.Name.Equals("c1") && ! c1.D.amount>213.3f ); t.Commit(); |
From: Michael D. <mik...@us...> - 2004-06-03 14:54:49
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19355 Modified Files: Glarch.cs NHibernate.DomainModel-1.1.csproj Parent.cs Super.cs Added Files: SubDetail.cs SubMulti.cs TrivialClass.cs Vetoer.cs W.cs X.cs Y.cs Z.cs Log Message: Continued to add Domain Classes for test fixtures. Index: Parent.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Parent.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Parent.cs 10 Feb 2004 19:12:58 -0000 1.1 --- Parent.cs 3 Jun 2004 14:54:40 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- namespace NHibernate.DomainModel { + //TODO: replace this with H2.0.3 version /// <summary> /// Summary description for Parent. Index: Glarch.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Glarch.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Glarch.cs 3 Jun 2004 03:23:33 -0000 1.3 --- Glarch.cs 3 Jun 2004 14:54:39 -0000 1.4 *************** *** 9,43 **** private int _version; ! private int _x; ! public int x { ! get ! { ! return _x; ! } ! set ! { ! this._x = value; ! } } public int version { ! get ! { ! return _version; ! } ! set ! { ! this._version = value; ! } } ! /// <summary> ! /// Holds the _next ! /// </summary> ! private GlarchProxy _next; /// <summary> --- 9,39 ---- private int _version; ! private GlarchProxy _next; ! private short _order; ! private IList _strings; ! private IDictionary _stringSets; ! private IList _fooComponents; ! private GlarchProxy[] _proxyArray; ! private IList _proxySet; ! private object _dynaBean; ! private string _immutable; ! private int _derivedVersion; ! private object _any; private int _x; ! private Multiplicity _multiple; ! public int x { ! get { return _x; } ! set { this._x = value; } } public int version { ! get { return _version; } ! set { this._version = value; } } ! /// <summary> *************** *** 46,64 **** public GlarchProxy next { ! get ! { ! return _next; ! } ! set ! { ! _next = value; ! } } ! /// <summary> ! /// Holds the _order ! /// </summary> ! private short _order; ! /// <summary> /// Gets or sets the _order --- 42,50 ---- public GlarchProxy next { ! get { return _next; } ! set { _next = value; } } ! /// <summary> /// Gets or sets the _order *************** *** 66,84 **** public short order { ! get ! { ! return _order; ! } ! set ! { ! _order = value; ! } } ! /// <summary> ! /// Holds the _strings ! /// </summary> ! private IList _strings; ! /// <summary> /// Gets or sets the _strings --- 52,60 ---- public short order { ! get { return _order; } ! set { _order = value; } } ! /// <summary> /// Gets or sets the _strings *************** *** 86,104 **** public IList strings { ! get ! { ! return _strings; ! } ! set ! { ! _strings = value; ! } } ! /// <summary> ! /// Holds the _stringSets ! /// </summary> ! private IDictionary _stringSets; ! /// <summary> /// Gets or sets the _stringSets --- 62,70 ---- public IList strings { ! get { return _strings; } ! set { _strings = value; } } ! /// <summary> /// Gets or sets the _stringSets *************** *** 106,124 **** public IDictionary stringSets { ! get ! { ! return _stringSets; ! } ! set ! { ! _stringSets = value; ! } } ! /// <summary> ! /// Holds the _fooComponents ! /// </summary> ! private IList _fooComponents; ! /// <summary> /// Gets or sets the _fooComponents --- 72,80 ---- public IDictionary stringSets { ! get { return _stringSets; } ! set { _stringSets = value; } } ! /// <summary> /// Gets or sets the _fooComponents *************** *** 126,144 **** public IList fooComponents { ! get ! { ! return _fooComponents; ! } ! set ! { ! _fooComponents = value; ! } } ! /// <summary> ! /// Holds the _proxyArray ! /// </summary> ! private GlarchProxy[] _proxyArray; ! /// <summary> /// Gets or sets the _proxyArray --- 82,90 ---- public IList fooComponents { ! get { return _fooComponents; } ! set { _fooComponents = value; } } ! /// <summary> /// Gets or sets the _proxyArray *************** *** 146,164 **** public GlarchProxy[] proxyArray { ! get ! { ! return _proxyArray; ! } ! set ! { ! _proxyArray = value; ! } } ! /// <summary> ! /// Holds the _proxySet ! /// </summary> ! private IList _proxySet; ! /// <summary> /// Gets or sets the _proxySet --- 92,100 ---- public GlarchProxy[] proxyArray { ! get { return _proxyArray; } ! set { _proxyArray = value; } } ! /// <summary> /// Gets or sets the _proxySet *************** *** 166,179 **** public IList proxySet { ! get ! { ! return _proxySet; ! } ! set ! { ! _proxySet = value; ! } } public LifecycleVeto OnDelete(ISession s) { --- 102,111 ---- public IList proxySet { ! get { return _proxySet; } ! set { _proxySet = value; } } + #region NHibernate.ILifecycle Members + public LifecycleVeto OnDelete(ISession s) { *************** *** 214,221 **** } ! /// <summary> ! /// Holds the _dynaBean ! /// </summary> ! private object _dynaBean; /// <summary> --- 146,150 ---- } ! #endregion /// <summary> *************** *** 224,242 **** public object dynaBean { ! get ! { ! return _dynaBean; ! } ! set ! { ! _dynaBean = value; ! } } ! /// <summary> ! /// Holds the _immutable ! /// </summary> ! private string _immutable; ! /// <summary> /// Gets or sets the _immutable --- 153,161 ---- public object dynaBean { ! get { return _dynaBean; } ! set { _dynaBean = value; } } ! /// <summary> /// Gets or sets the _immutable *************** *** 244,301 **** public string immutable { ! get ! { ! return _immutable; ! } ! set ! { ! _immutable = value; ! } } /// <summary> - /// Holds the _derivedVersion - /// </summary> - private int _derivedVersion; - - /// <summary> /// Gets or sets the _derivedVersion /// </summary> public int derivedVersion { ! get ! { ! return _derivedVersion; ! } ! set ! { ! _derivedVersion = value; ! } } /// <summary> - /// Holds the _any - /// </summary> - private object _any; - - /// <summary> /// Gets or sets the _any /// </summary> public object any { ! get ! { ! return _any; ! } ! set ! { ! _any = value; ! } } ! /// <summary> ! /// Holds the _multiple ! /// </summary> ! private Multiplicity _multiple; /// <summary> --- 163,189 ---- public string immutable { ! get { return _immutable; } ! set { _immutable = value; } } /// <summary> /// Gets or sets the _derivedVersion /// </summary> public int derivedVersion { ! get { return _derivedVersion; } ! set { _derivedVersion = value; } } /// <summary> /// Gets or sets the _any /// </summary> public object any { ! get { return _any; } ! set { _any = value; } } ! /// <summary> *************** *** 304,327 **** public Multiplicity multiple { ! get ! { ! return _multiple; ! } ! set ! { ! _multiple = value; ! } } public new string name { ! get ! { ! return base.name; ! } ! set ! { ! this.name = value; ! } } --- 192,203 ---- public Multiplicity multiple { ! get { return _multiple; } ! set { _multiple = value; } } public new string name { ! get { return base._name; } ! set { this._name = value; } } --- NEW FILE: X.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for X. /// </summary> public class X { private long _id; private Y _y; public long Id { get { return _id; } set { _id = value; } } public Y Y { get { return _y; } set { _y = value; } } } } --- NEW FILE: Vetoer.cs --- using System; using NHibernate; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Vetoer. /// </summary> public class Vetoer : ILifecycle { bool _onSaveCalled; bool _onUpdateCalled; bool _onDeleteCalled; private string _name; private string[] _strings; public string Name { get { return _name; } set { _name = value; } } public string[] Strings { get { return _strings; } set { _strings = value; } } #region ILifecycle Members public LifecycleVeto OnUpdate(ISession s) { bool result = !_onUpdateCalled; _onUpdateCalled = true; return ( result ? LifecycleVeto.Veto : LifecycleVeto.NoVeto ); } public void OnLoad(ISession s, object id) { } public LifecycleVeto OnSave(ISession s) { bool result = !_onSaveCalled; _onSaveCalled = true; return ( result ? LifecycleVeto.Veto : LifecycleVeto.NoVeto ); } public LifecycleVeto OnDelete(ISession s) { bool result = !_onDeleteCalled; _onDeleteCalled = true; return ( result ? LifecycleVeto.Veto : LifecycleVeto.NoVeto ); } #endregion } } --- NEW FILE: TrivialClass.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for TrivialClass. /// </summary> public class TrivialClass : Simple { } } --- NEW FILE: W.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { /// <summary> /// Summary description for W. /// </summary> public class W { private long _id; // <set> mapping private IDictionary _zeds; public long Id { get { return _id; } set { _id = value; } } public IDictionary Zeds { get { return _zeds; } set { _zeds = value; } } } } --- NEW FILE: Y.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Y. /// </summary> public class Y { private long _id; private string _x; private X _theX; public long Id { get { return _id; } set { _id = value; } } public string X { get { return _x; } set { _x = value; } } public X TheX { get { return _theX; } set { _theX = value; } } } } --- NEW FILE: Z.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Z. /// </summary> public class Z { private long _id; private W _w; public long Id { get { return _id; } set { _id = value; } } public W W { get { return _w; } set { _w = value; } } } } --- NEW FILE: SubMulti.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { /// <summary> /// Summary description for SubMulti. /// </summary> public class SubMulti : Multi { private float _amount; private SubMulti _parent; private IList _children; private IList _moreChildren; public float Amount { get { return _amount; } set { _amount = value; } } public SubMulti Parent { get { return _parent; } set { _parent = value; } } public IList Children { get { return _children; } set { _children = value; } } public IList MoreChildren { get { return _moreChildren; } set { _moreChildren = value; } } } } Index: NHibernate.DomainModel-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel-1.1.csproj,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** NHibernate.DomainModel-1.1.csproj 3 Jun 2004 14:29:00 -0000 1.15 --- NHibernate.DomainModel-1.1.csproj 3 Jun 2004 14:54:40 -0000 1.16 *************** *** 592,595 **** --- 592,605 ---- /> <File + RelPath = "SubDetail.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "SubMulti.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Super.cs" SubType = "Code" *************** *** 611,614 **** --- 621,629 ---- /> <File + RelPath = "TrivialClass.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "UnsavedType.cs" SubType = "Code" *************** *** 620,630 **** --- 635,670 ---- /> <File + RelPath = "Vetoer.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Vetoer.hbm.xml" BuildAction = "EmbeddedResource" /> <File + RelPath = "W.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "X.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "XY.hbm.xml" BuildAction = "EmbeddedResource" /> + <File + RelPath = "Y.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Z.cs" + SubType = "Code" + BuildAction = "Compile" + /> </Include> </Files> --- NEW FILE: SubDetail.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for SubDetail. /// </summary> public class SubDetail { private string _name; private long _id; public long Id { get { return _id; } set { _id = value; } } public string Name { get { return _name; } set { _name = value; } } } } Index: Super.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Super.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Super.cs 8 Apr 2004 14:59:32 -0000 1.1 --- Super.cs 3 Jun 2004 14:54:40 -0000 1.2 *************** *** 1,13 **** namespace NHibernate.DomainModel ! { public class Super ! { ! protected string name; public string Name { ! get ! { return name; } set ! { ! this.name = value; } } } } \ No newline at end of file --- 1,10 ---- namespace NHibernate.DomainModel ! { public class Super ! { ! protected string _name; public string Name { ! get { return _name; } set { _name = value; } } } } \ No newline at end of file |
From: Michael D. <mik...@us...> - 2004-06-03 14:29:09
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13459 Modified Files: Master.cs MultiplicityType.cs NestingComponent.cs NHibernate.DomainModel-1.1.csproj Added Files: INameable.cs Location.cs Many.cs Middle.cs MiddleKey.cs Mono.cs Multi.cs One.cs Outer.cs OuterKey.cs Log Message: Continued to add Domain Classes for test fixtures. --- NEW FILE: MiddleKey.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for MiddleKey. /// </summary> [Serializable] public class MiddleKey { private Inner _sup; private string _two; private string _one; public Inner Sup { get { return _sup; } set { _sup = value; } } public string One { get { return _one; } set { _one = value; } } public string Two { get { return _two; } set { _two = value; } } #region System.Object Members public override bool Equals(object obj) { if(this==obj) return true; MiddleKey cidMasterID = obj as MiddleKey; if(cidMasterID==null) return false; if ( _one!=null ? !_one.Equals(cidMasterID.One) : cidMasterID.One!=null) return false; if ( _sup!=null ? !_sup.Equals(cidMasterID.Sup) : cidMasterID.Sup!=null) return false; if ( _two!=null ? !_two.Equals(cidMasterID.Two) : cidMasterID.Two!=null) return false; return true; } public override int GetHashCode() { unchecked { int result; //TODO: string can't be null result = ( _sup!=null ? _sup.GetHashCode() : 0 ); result = 29 * result + ( _one!=null ? _one.GetHashCode() : 0 ); result = 29 * result + ( _two!=null ? _two.GetHashCode() : 0 ); return result; } } #endregion } } --- NEW FILE: Location.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Location. /// </summary> [Serializable] public class Location { private int _streetNumber; private string _city; private string _streetName; private string _countryCode; // private Locale _locale; TODO: how to do this in .net?? private string _description; public int StreetNumber { get { return _streetNumber; } set { _streetNumber = value; } } public string City { get { return _city; } set { _city = value; } } public string StreetName { get { return _streetName; } set { _streetName = value; } } public string CountryCode { get { return _countryCode; } set { _countryCode = value; } } public string Description { get { return _description; } set { _description = value; } } #region System.Object Members public override bool Equals(object obj) { if(this==obj) return true; Location rhs = obj as Location; if(rhs==null) return false; return ( rhs.City.Equals(this.City) && rhs.StreetName.Equals(this.StreetName) && rhs.CountryCode.Equals(this.CountryCode) && rhs.StreetNumber.Equals(this.StreetNumber) ); } public override int GetHashCode() { return _streetName.GetHashCode(); } #endregion } } --- NEW FILE: One.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { /// <summary> /// Summary description for One. /// </summary> public class One { private long _key; private string _value; // <set> mapping private IDictionary _manies; private int _x; public long Key { get { return _key; } set { _key = value; } } public string Value { get { return _value; } set { _value = value; } } public IDictionary Manies { get { return _manies; } set { _manies = value; } } public int X { get { return _x; } set { _x = value; } } } } Index: NHibernate.DomainModel-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel-1.1.csproj,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** NHibernate.DomainModel-1.1.csproj 3 Jun 2004 13:31:52 -0000 1.14 --- NHibernate.DomainModel-1.1.csproj 3 Jun 2004 14:29:00 -0000 1.15 *************** *** 360,363 **** --- 360,368 ---- /> <File + RelPath = "INameable.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "INamed.cs" SubType = "Code" *************** *** 394,401 **** --- 399,416 ---- /> <File + RelPath = "Location.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Location.hbm.xml" BuildAction = "EmbeddedResource" /> <File + RelPath = "Many.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Many.hbm.xml" BuildAction = "EmbeddedResource" *************** *** 407,410 **** --- 422,440 ---- /> <File + RelPath = "Middle.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "MiddleKey.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Mono.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "MoreStuff.cs" SubType = "Code" *************** *** 412,415 **** --- 442,450 ---- /> <File + RelPath = "Multi.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Multiplicity.cs" SubType = "Code" *************** *** 440,447 **** --- 475,497 ---- /> <File + RelPath = "One.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "One.hbm.xml" BuildAction = "EmbeddedResource" /> <File + RelPath = "Outer.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "OuterKey.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Parent.cs" SubType = "Code" Index: NestingComponent.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NestingComponent.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NestingComponent.cs 2 Jun 2004 04:53:24 -0000 1.2 --- NestingComponent.cs 3 Jun 2004 14:29:00 -0000 1.3 *************** *** 4,8 **** namespace NHibernate.DomainModel { ! [Serializable] public class NestingComponent { /// <summary> /// Holds the _nested --- 4,8 ---- namespace NHibernate.DomainModel { ! [Serializable] public class NestingComponent { /// <summary> /// Holds the _nested *************** *** 15,25 **** public ComponentCollection Nested { ! get ! { ! return _nested; ! } ! set ! { ! _nested = value; ! } } } } \ No newline at end of file --- 15,19 ---- public ComponentCollection Nested { ! get { return _nested; } ! set { _nested = value; } } } } \ No newline at end of file --- NEW FILE: INameable.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for INameable. /// </summary> public interface INameable { string Name { get; set; } long Key { get; set; } } } --- NEW FILE: Mono.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Mono. /// </summary> public class Mono : Simple { private IDictionary _strings; public Mono() : base() {} public Mono(int c) : base(c) {} public IDictionary Strings { get { return _strings; } set { _strings = value; } } } } --- NEW FILE: Multi.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Multi. /// </summary> public class Multi : Simple { private string _extraProp; private Multi.Component _comp; private Po _po; public Multi() : base() {} public string ExtraProp { get { return _extraProp; } set { _extraProp = value; } } public Multi.Component Comp { get { return _comp; } set { _comp = value; } } public Po Po { get { return _po; } set { _po = value; } } public sealed class Component { //TODO: is java Calendar -> .net DateTime an appropriate conversion private DateTime _cal; private float _floaty; public DateTime Cal { get { return _cal; } set { _cal = value; } } public float Floaty { get { return _floaty; } set { _floaty = value; } } } } } --- NEW FILE: Many.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Many. /// </summary> public class Many { private long _key; private One _one; private int _x; public long Key { get { return _key; } set { _key = value; } } public One One { get { return _one; } set { _one = value; } } public int X { get { return _x; } set { _x = value; } } } } --- NEW FILE: OuterKey.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for OuterKey. /// </summary> [Serializable] public class OuterKey { private Middle _master; private string _detailId; public Middle Master { get { return _master; } set { _master = value; } } public string DetailId { get { return _detailId; } set { _detailId = value; } } #region System.Object Members public override bool Equals(object obj) { if(this==obj) return true; OuterKey cidDetailId = obj as OuterKey; if(cidDetailId==null) return false; if(_detailId!=null ? !_detailId.Equals(cidDetailId.DetailId) : cidDetailId.DetailId!=null) return false; if(_master!=null ? !_master.Equals(cidDetailId.Master) : cidDetailId.Master!=null) return false; return true; } public override int GetHashCode() { unchecked { int result; result = ( _master!=null ? _master.GetHashCode() : 0 ); //TODO: string == null??? result = 29 * result + ( _detailId!=null ? _detailId.GetHashCode() : 0 ); return result; } } #endregion } } --- NEW FILE: Outer.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Outer. /// </summary> [Serializable] public class Outer { private OuterKey _id; private string _bubu; public OuterKey Id { get { return _id; } set { _id = value; } } public string Bubu { get { return _bubu; } set { _bubu = value; } } #region System.Object Members public override bool Equals(object obj) { if(this==obj) return true; Outer rhs = obj as Outer; if(rhs==null) return false; if( _id!=null ? !_id.Equals(rhs.Id) : rhs.Id!=null ) return false; return true; } public override int GetHashCode() { return ( _id!=null ? _id.GetHashCode() : 0 ); } #endregion } } Index: MultiplicityType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/MultiplicityType.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MultiplicityType.cs 9 Apr 2004 13:14:53 -0000 1.1 --- MultiplicityType.cs 3 Jun 2004 14:29:00 -0000 1.2 *************** *** 4,18 **** namespace NHibernate.DomainModel { - public class MultiplicityType : ICompositeUserType ! { private static string[] PROP_NAMES = new String[] { "count", "glarch" }; private static Type.IType[] TYPES = new Type.IType[] { NHibernate.Int32, NHibernate.GetSerializable(typeof(Glarch)) }; public String[] PropertyNames { ! get ! { return PROP_NAMES; } } public Type.IType[] PropertyTypes { ! get ! { ! return TYPES; ! } } public object GetPropertyValue(object component, int property) { Multiplicity o = (Multiplicity) component; return property==0 ? (object)o.count : (object)o.glarch; } public void SetPropertyValue(object component, int property, object value) { Multiplicity o = (Multiplicity) component; if (property==0) --- 4,13 ---- namespace NHibernate.DomainModel { public class MultiplicityType : ICompositeUserType ! { private static readonly string[] PROP_NAMES = new String[] { "count", "glarch" }; private static readonly Type.IType[] TYPES = new Type.IType[] { NHibernate.Int32, NHibernate.Entity(typeof(Glarch)) }; public String[] PropertyNames { ! get { return PROP_NAMES; } } public Type.IType[] PropertyTypes { ! get { return TYPES; } } public object GetPropertyValue(object component, int property) { Multiplicity o = (Multiplicity) component; return property==0 ? (object)o.count : (object)o.glarch; } public void SetPropertyValue(object component, int property, object value) { Multiplicity o = (Multiplicity) component; if (property==0) *************** *** 21,26 **** public System.Type ReturnedClass { ! get ! { return typeof(Multiplicity); } } public new bool Equals(object x, object y) { Multiplicity mx = (Multiplicity) x; --- 16,20 ---- public System.Type ReturnedClass { ! get { return typeof(Multiplicity); } } public new bool Equals(object x, object y) { Multiplicity mx = (Multiplicity) x; *************** *** 30,36 **** return mx.count==my.count && mx.glarch==my.glarch; } public object NullSafeGet(IDataReader rs, String[] names, Engine.ISessionImplementor session, Object owner) { int c = (int) NHibernate.Int32.NullSafeGet( rs, names[0], session, owner); ! GlarchProxy g = (GlarchProxy) NHibernate.GetSerializable(typeof(Glarch)).NullSafeGet(rs, names[1], session, owner); Multiplicity m = new Multiplicity(); ! m.count = c==0 ? 0 : c; m.glarch = g; return m; --- 24,30 ---- return mx.count==my.count && mx.glarch==my.glarch; } public object NullSafeGet(IDataReader rs, String[] names, Engine.ISessionImplementor session, Object owner) { int c = (int) NHibernate.Int32.NullSafeGet( rs, names[0], session, owner); ! GlarchProxy g = (GlarchProxy) NHibernate.Entity(typeof(Glarch)).NullSafeGet(rs, names[1], session, owner); Multiplicity m = new Multiplicity(); ! m.count = ( c==0 ? 0 : c ); m.glarch = g; return m; *************** *** 38,56 **** public void NullSafeSet(IDbCommand st, Object value, int index, Engine.ISessionImplementor session) { ! Multiplicity o = (Multiplicity) value; ! GlarchProxy g; int c; if (o==null) ! { ! g=null; ! c=0; ! } else ! { ! g = o.glarch; ! c =o.count; } ! NHibernate.Int32.NullSafeSet(st, c, index, session); ! NHibernate.GetSerializable(typeof(Glarch)).NullSafeSet(st, g, index+1, session); } public object DeepCopy(object value) { if (value==null) return null; Multiplicity v = (Multiplicity) value; --- 32,50 ---- public void NullSafeSet(IDbCommand st, Object value, int index, Engine.ISessionImplementor session) { ! Multiplicity o = (Multiplicity) value; ! GlarchProxy g; int c; if (o==null) ! { ! g=null; ! c=0; ! } else ! { ! g = o.glarch; ! c = o.count; } ! NHibernate.Int32.NullSafeSet(st, c, index, session); ! NHibernate.Entity(typeof(Glarch)).NullSafeSet(st, g, index+1, session); } public object DeepCopy(object value) { if (value==null) return null; Multiplicity v = (Multiplicity) value; *************** *** 61,66 **** public bool IsMutable { ! get ! { return true; } } public object Assemble(object cached, Engine.ISessionImplementor session, Object owner) { throw new InvalidOperationException(); } --- 55,59 ---- public bool IsMutable { ! get { return true; } } public object Assemble(object cached, Engine.ISessionImplementor session, Object owner) { throw new InvalidOperationException(); } Index: Master.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Master.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Master.cs 2 Jun 2004 04:53:24 -0000 1.1 --- Master.cs 3 Jun 2004 14:29:00 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Collections; namespace NHibernate.DomainModel *************** *** 6,17 **** /// Summary description for Master. /// </summary> public class Master { ! public Master() { ! // ! // TODO: Add constructor logic here ! // } } } --- 7,103 ---- /// Summary description for Master. /// </summary> + [Serializable] public class Master { ! private static object _emptyObject = new object(); ! ! private Master _otherMaster; ! private IDictionary _details = new Hashtable(); ! private IDictionary _moreDetails = new Hashtable(); ! private IDictionary _incoming = new Hashtable(); ! private IDictionary _outgoing = new Hashtable(); ! private string _name = "master"; ! private DateTime _stamp; ! // private BigDecimal bigDecimal = new BigDecimal("1234.123"); TODO: how to do in .net ! private int _x; ! ! public Master OtherMaster { ! get { return _otherMaster; } ! set { _otherMaster = value; } ! } ! ! public void AddDetail(Detail d) ! { ! _details.Add(d, _emptyObject); ! } ! ! public void RemoveDetail(Detail d) ! { ! _details.Remove(d); ! } ! ! public IDictionary Details ! { ! get { return _details; } ! set { _details = value; } ! } ! ! public IDictionary MoreDetails ! { ! get { return _moreDetails; } ! set { _moreDetails = value; } ! } ! ! public void AddIncoming(Master m) ! { ! _incoming.Add(m, _emptyObject); ! } ! ! public void RemoveIncoming(Master m) ! { ! _incoming.Remove(m); ! } ! ! public IDictionary Incoming ! { ! get { return _incoming; } ! set { _incoming = value; } } + + public void AddOutgoing(Master m) + { + _outgoing.Add(m, _emptyObject); + } + + public void RemoveOutgoing(Master m) + { + _outgoing.Remove(m); + } + + public IDictionary Outgoing + { + get { return _outgoing; } + set { _outgoing = value; } + } + + public string Name + { + get { return _name; } + set { _name = value; } + } + + public DateTime Stamp + { + get { return _stamp; } + set { _stamp = value; } + } + + public int X + { + get { return _x; } + set { _x = value; } + } + } } --- NEW FILE: Middle.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Middle. /// </summary> [Serializable] public class Middle { private MiddleKey _id; private string _bla; public MiddleKey Id { get { return _id; } set { _id = value; } } public string Bla { get { return _bla; } set { _bla = value; } } #region System.Object Members public override bool Equals(object obj) { if(this==obj) return true; Middle cidMaster = obj as Middle; if(cidMaster==null) return false; if(_id!=null ? !_id.Equals(cidMaster.Id) : cidMaster.Id!=null) return false; return true; } public override int GetHashCode() { return ( _id!=null ? _id.GetHashCode() : 0 ); } #endregion } } |
From: Michael D. <mik...@us...> - 2004-06-03 13:32:00
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31802 Modified Files: Baz.hbm.xml NHibernate.DomainModel-1.1.csproj Qux.cs ReverseComparator.cs Added Files: LessSimple.cs MoreStuff.cs Po.cs Result.cs Several.cs Single.cs Stuff.cs Log Message: Continued to add Domain Classes for test fixtures. Index: NHibernate.DomainModel-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel-1.1.csproj,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** NHibernate.DomainModel-1.1.csproj 3 Jun 2004 03:23:33 -0000 1.13 --- NHibernate.DomainModel-1.1.csproj 3 Jun 2004 13:31:52 -0000 1.14 *************** *** 389,392 **** --- 389,397 ---- /> <File + RelPath = "LessSimple.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Location.hbm.xml" BuildAction = "EmbeddedResource" *************** *** 402,405 **** --- 407,415 ---- /> <File + RelPath = "MoreStuff.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Multiplicity.cs" SubType = "Code" *************** *** 448,451 **** --- 458,466 ---- /> <File + RelPath = "Po.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Qux.cs" SubType = "Code" *************** *** 457,460 **** --- 472,480 ---- /> <File + RelPath = "Result.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "ReverseComparator.cs" SubType = "Code" *************** *** 462,465 **** --- 482,490 ---- /> <File + RelPath = "Several.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "SexType.cs" SubType = "Code" *************** *** 489,492 **** --- 514,522 ---- /> <File + RelPath = "Single.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Sortable.cs" SubType = "Code" *************** *** 499,502 **** --- 529,537 ---- /> <File + RelPath = "Stuff.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Stuff.hbm.xml" BuildAction = "EmbeddedResource" --- NEW FILE: Single.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Single. /// </summary> [Serializable] public class Single { private string _id; private string _prop; private string _string; private IDictionary _several; public string Id { get { return _id; } set { _id = value; } } public string Prop { get { return _prop; } set { _prop = value; } } public string String { get { return _string; } set { _string = value; } } public IDictionary Several { get { return _several; } set { _several = value; } } #region System.Object members public override bool Equals(object obj) { if(this==obj) return true; Single rhs = obj as Single; if(rhs==null) return false; return ( rhs.Id.Equals(this.Id) && rhs.String.Equals(this.String) ); } public override int GetHashCode() { return _id.GetHashCode(); } #endregion } } Index: ReverseComparator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/ReverseComparator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReverseComparator.cs 8 Apr 2004 17:22:08 -0000 1.1 --- ReverseComparator.cs 3 Jun 2004 13:31:52 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- namespace NHibernate.DomainModel { + [Serializable] public class ReverseComparator : IComparer { --- NEW FILE: Result.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Result. /// </summary> public class Result { private string _name; private long _amount; private int _count; public Result(string name, long amount, int count) { } public string Name { get { return _name; } set { _name = value; } } public long Amount { get { return _amount; } set { _amount = value; } } public int Count { get { return _count; } set { _count = value; } } } } --- NEW FILE: LessSimple.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { /// <summary> /// Summary description for LessSimple. /// </summary> public class LessSimple : Simple { private int _intprop; private string _foo; //<set> mapping private IDictionary _set; private IList _bag; private Simple _another; private LessSimple _yetAnother; private Po _myPo; public int Intprop { get { return _intprop; } set { _intprop = value; } } public string Foo { get { return _foo; } set { _foo = value; } } public IDictionary Set { get { return _set; } set { _set = value; } } public IList Bag { get { return _bag; } set { _bag = value; } } public Simple Another { get { return _another; } set { _another = value; } } public LessSimple YetAnother { get { return _yetAnother; } set { _yetAnother = value; } } public Po MyPo { get { return _myPo; } set { _myPo = value; } } } } Index: Qux.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Qux.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Qux.cs 8 Apr 2004 14:59:32 -0000 1.1 --- Qux.cs 3 Jun 2004 13:31:52 -0000 1.2 *************** *** 4,8 **** namespace NHibernate.DomainModel { ! public class Qux : ILifecycle { --- 4,8 ---- namespace NHibernate.DomainModel { ! //TODO: fix up property names public class Qux : ILifecycle { *************** *** 17,20 **** --- 17,22 ---- } + #region ILifecycle members + public LifecycleVeto OnSave(ISession session) { *************** *** 53,57 **** this.session=session; } ! public void store() { --- 55,66 ---- this.session=session; } ! ! public LifecycleVeto OnUpdate(ISession s) ! { ! return LifecycleVeto.NoVeto; ! } ! ! #endregion ! public void store() { *************** *** 281,288 **** } ! public LifecycleVeto OnUpdate(ISession s) ! { ! return LifecycleVeto.NoVeto; ! } } } \ No newline at end of file --- 290,294 ---- } ! } } \ No newline at end of file --- NEW FILE: Stuff.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Stuff. /// </summary> [Serializable] public class Stuff { private long _id; private FooProxy _foo; private MoreStuff _moreStuff; //private TimeZone property; TODO - does this exists in .net??? public long Id { get { return _id; } set { _id = value; } } public FooProxy Foo { get { return _foo; } set { _foo = value; } } public MoreStuff MoreStuff { get { return _moreStuff; } set { _moreStuff = value; } } #region System.Object Members public override bool Equals(object obj) { if(this==obj) return true; Stuff rhs = obj as Stuff; if(rhs==null) return false; return rhs.Id.Equals(this.Id) && rhs.Foo.key.Equals(_foo.key) && rhs.MoreStuff.Equals(_moreStuff) ; } public override int GetHashCode() { return _id.GetHashCode(); } #endregion } } Index: Baz.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Baz.hbm.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Baz.hbm.xml 2 Jun 2004 04:53:24 -0000 1.8 --- Baz.hbm.xml 3 Jun 2004 13:31:52 -0000 1.9 *************** *** 232,235 **** --- 232,236 ---- <bag name="Floats" table="baz_floats_bag"> <key column="baz_compon_id"/> + <!-- TODO: fix this to a Single --> <element type="Int64" column="float_value"/> </bag> --- NEW FILE: MoreStuff.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { /// <summary> /// Summary description for MoreStuff. /// </summary> [Serializable] public class MoreStuff { private string _stringId; private int _intId; // <bag> mapping private ICollection _stuffs; private string _name; public string StringId { get { return _stringId; } set { _stringId = value; } } public int IntId { get { return _intId; } set { _intId = value; } } public ICollection Stuffs { get { return _stuffs; } set { _stuffs = value; } } public string Name { get { return _name; } set { _name = value; } } #region System.Object Members public override bool Equals(object obj) { if(this==obj) return true; MoreStuff rhs = obj as MoreStuff; if(rhs==null) return false; return ( rhs.IntId==this.IntId && rhs.StringId.Equals(this.StringId) ); } public override int GetHashCode() { return _stringId.GetHashCode(); } #endregion } } --- NEW FILE: Po.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Po. /// </summary> public class Po { private long _id; private string _value; //<set> mapping private IDictionary _set; public long Id { get {return _id;} set {_id = value;} } public string Value { get {return _value;} set {_value = value;} } public IDictionary Set { get {return _set;} set {_set = value;} } } } --- NEW FILE: Several.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Several. /// </summary> [Serializable] public class Several { private string _id; private string _prop; private float _single; private string _string; public string Id { get { return _id; } set { _id = value; } } public string Prop { get { return _prop; } set { _prop = value; } } public float Single { get { return _single; } set { _single = value; } } public string String { get { return _string; } set { _string = value; } } #region System.Object members public override bool Equals(object obj) { if(this==obj) return true; Several rhs = obj as Several; if(rhs==null) return false; return ( rhs.Id.Equals(this.Id) && rhs.String.Equals(this.String) ); } public override int GetHashCode() { return _id.GetHashCode(); } #endregion } } |
From: Michael D. <mik...@us...> - 2004-06-03 13:29:41
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31240 Modified Files: Map.cs Set.cs Log Message: Fixed problem with lazy load of Collections when the properties Keys and Values were used. Was not reading from the db. Index: Map.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Map.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Map.cs 27 Apr 2004 15:49:21 -0000 1.8 --- Map.cs 3 Jun 2004 13:29:32 -0000 1.9 *************** *** 96,100 **** get { ! //Read(); return new CollectionProxy(this, map.Keys); } --- 96,100 ---- get { ! Read(); return new CollectionProxy(this, map.Keys); } *************** *** 104,108 **** get { ! //Read(); return new CollectionProxy(this, map.Values); } --- 104,108 ---- get { ! Read(); return new CollectionProxy(this, map.Values); } Index: Set.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Set.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Set.cs 27 Apr 2004 15:49:21 -0000 1.7 --- Set.cs 3 Jun 2004 13:29:32 -0000 1.8 *************** *** 149,153 **** get { ! //Read(); return new CollectionProxy(this, map.Keys); } --- 149,153 ---- get { ! Read(); return new CollectionProxy(this, map.Keys); } *************** *** 161,165 **** get { ! //Read(); return new CollectionProxy(this, map.Values); } --- 161,165 ---- get { ! Read(); return new CollectionProxy(this, map.Values); } |
From: Michael D. <mik...@us...> - 2004-06-03 03:23:42
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25920 Modified Files: DoubleStringType.cs FooProxy.cs Fum.cs FumCompositeID.cs Glarch.cs Immutable.cs NHibernate.DomainModel-1.1.csproj Added Files: Fo.cs Holder.cs INamed.cs Inner.cs InnerKey.cs Log Message: More classes that are used by test have been added. Index: Immutable.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Immutable.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Immutable.cs 11 May 2004 19:44:58 -0000 1.1 --- Immutable.cs 3 Jun 2004 03:23:33 -0000 1.2 *************** *** 3,7 **** namespace NHibernate.DomainModel { - /// <summary> /// Summary description for Immutable. --- 3,6 ---- *************** *** 9,33 **** public class Immutable { ! ! private string foo; ! private string bar; ! private string id; public string Foo { ! get { return foo; } ! set { foo = value; } } public string Bar { ! get { return bar; } ! set { bar = value; } } public string Id { ! get { return id; } ! set { id = value; } } } --- 8,31 ---- public class Immutable { ! private string _foo; ! private string _bar; ! private string _id; public string Foo { ! get { return _foo; } ! set { _foo = value; } } public string Bar { ! get { return _bar; } ! set { _bar = value; } } public string Id { ! get { return _id; } ! set { _id = value; } } } Index: Glarch.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Glarch.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Glarch.cs 8 Apr 2004 15:04:30 -0000 1.2 --- Glarch.cs 3 Jun 2004 03:23:33 -0000 1.3 *************** *** 4,8 **** namespace NHibernate.DomainModel { ! public class Glarch : Super, GlarchProxy, ILifecycle { --- 4,8 ---- namespace NHibernate.DomainModel { ! //TODO: figure out what to do with this DynaBean public class Glarch : Super, GlarchProxy, ILifecycle { Index: FumCompositeID.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FumCompositeID.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FumCompositeID.cs 9 Apr 2004 13:14:53 -0000 1.1 --- FumCompositeID.cs 3 Jun 2004 03:23:33 -0000 1.2 *************** *** 10,13 **** --- 10,14 ---- DateTime date_; short short_; + public override bool Equals(object obj) { *************** *** 15,18 **** --- 16,20 ---- return this.string_.Equals(that.string_) && this.short_==that.short_; } + public override int GetHashCode() { Index: NHibernate.DomainModel-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel-1.1.csproj,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** NHibernate.DomainModel-1.1.csproj 2 Jun 2004 04:53:24 -0000 1.12 --- NHibernate.DomainModel-1.1.csproj 3 Jun 2004 03:23:33 -0000 1.13 *************** *** 272,275 **** --- 272,280 ---- /> <File + RelPath = "Fo.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Fo.hbm.xml" BuildAction = "EmbeddedResource" *************** *** 337,340 **** --- 342,350 ---- /> <File + RelPath = "Holder.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Holder.hbm.xml" BuildAction = "EmbeddedResource" *************** *** 350,353 **** --- 360,378 ---- /> <File + RelPath = "INamed.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Inner.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "InnerKey.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "JoinedSubclass.hbm.xml" BuildAction = "EmbeddedResource" Index: Fum.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Fum.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Fum.cs 29 Apr 2004 15:15:59 -0000 1.2 --- Fum.cs 3 Jun 2004 03:23:33 -0000 1.3 *************** *** 10,14 **** private Fum _fo; private Qux[] _quxArray; ! private IDictionary _friends; private DateTime _lastUpdated; --- 10,14 ---- private Fum _fo; private Qux[] _quxArray; ! private IDictionary _friends; // <set> mapping private DateTime _lastUpdated; *************** *** 107,116 **** s.Delete(de.Key); } - - // IEnumerator iter = friends.GetEnumerator(); - // while ( iter.MoveNext() ) - // { - // s.Delete( iter.Current ); - // } } catch (Exception e) --- 107,110 ---- *************** *** 136,145 **** s.Save(de.Key); } - - // IEnumerator iter = friends.GetEnumerator(); - // while ( iter.MoveNext() ) - // { - // s.Save( iter.Current ); - // } } catch (Exception e) --- 130,133 ---- --- NEW FILE: Fo.cs --- using System; namespace NHibernate.DomainModel { public class Fo { public static Fo NewFo() { return new Fo(); } private Fo() {} private byte[] _buf; private object _serial; private long _version; private int _x; public byte[] Buf { get { return _buf; } set { _buf = value; } } public object Serial { get { return _serial; } set { _serial = value; } } public long Version { get { return _version; } set { _version = value; } } public int X { get { return _x; } set { _x = value; } } } } --- NEW FILE: Inner.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Inner. /// </summary> [Serializable] public class Inner { private InnerKey _id; private string _dudu; public InnerKey Id { get { return _id; } set { _id = value; } } public string Dudu { get { return _dudu; } set { _dudu = value; } } #region object members public override bool Equals(object obj) { if(this==obj) return true; Inner cidSuper = obj as Inner; if(cidSuper==null) return false; if(_id==null) { return cidSuper._id==null; } else { return _id.Equals(cidSuper._id); } } public override int GetHashCode() { if(_id==null) { return 0; } else { return _id.GetHashCode(); } } #endregion } } --- NEW FILE: Holder.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Holder. /// </summary> public class Holder : INamed { private string _id; private IList _ones; private Foo[] _fooArray; private IDictionary _foos;// <set> mapping private string _name; public string Id { get { return _id; } set { _id = value; } } public IList Ones { get { return _ones; } set { _ones = value; } } public Foo[] FooArray { get { return _fooArray; } set { _fooArray = value; } } public IDictionary Foos { get { return _foos; } set { _foos = value; } } #region INamed Members public string Name { get { return _name; } set { _name = value; } } #endregion } } --- NEW FILE: INamed.cs --- using System; namespace NHibernate.DomainModel { public interface INamed { string Name { get; } } } --- NEW FILE: InnerKey.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for InnerKey. /// </summary> [Serializable] public class InnerKey { private string _aKey; private string _bKey; public string AKey { get { return _aKey; } set { _aKey = value; } } public string BKey { get { return _bKey; } set { _bKey = value; } } #region object Members public override bool Equals(object obj) { if(this==obj) return true; InnerKey cidSuperID = obj as InnerKey; if(cidSuperID==null) return false; if (_aKey!=null ? !_aKey.Equals(cidSuperID._aKey) : cidSuperID._aKey!=null) return false; if (_bKey!=null ? !_bKey.Equals(cidSuperID._bKey) : cidSuperID._bKey!=null) return false; return true; } public override int GetHashCode() { unchecked { int result; //TODO: string won't be null - verify result = (_aKey!=null ? _aKey.GetHashCode() : 0); result = 29 * result + (_bKey!=null ? _bKey.GetHashCode() : 0); return result; } } #endregion } } Index: DoubleStringType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/DoubleStringType.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DoubleStringType.cs 8 Apr 2004 14:59:32 -0000 1.1 --- DoubleStringType.cs 3 Jun 2004 03:23:33 -0000 1.2 *************** *** 19,23 **** if (x==y) return true; if (x==null || y==null) return false; ! return ((String[]) x)[0].Equals( ((String[]) y)[0] ) && ((String[]) x)[1].Equals( ((String[]) y)[1] ); } --- 19,26 ---- if (x==y) return true; if (x==null || y==null) return false; ! string[] lhs = (string[])x; ! string[] rhs = (string[])y; ! ! return lhs[0].Equals(rhs[0]) && lhs[1].Equals(rhs[1]); } *************** *** 34,41 **** public bool IsMutable { ! get ! { ! return true; ! } } --- 37,41 ---- public bool IsMutable { ! get { return true; } } Index: FooProxy.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FooProxy.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FooProxy.cs 8 Apr 2004 14:59:32 -0000 1.1 --- FooProxy.cs 3 Jun 2004 03:23:33 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- { + //TODO: fix up these property names for .net standards public interface FooProxy { |
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4291 Modified Files: Abstract.cs AbstractProxy.cs Bar.cs BarProxy.cs Baz.hbm.xml Child.cs ComponentCollection.cs FooBar.hbm.xml NestingComponent.cs NHibernate.DomainModel-1.1.csproj Added Files: Assignable.cs BasicNameable.cs Blobber.cs Category.cs Circular.cs Contained.cs Container.cs Custom.cs CustomPersister.cs Detail.cs Master.cs Log Message: Began the process of synching the classes in testing. Index: Bar.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Bar.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Bar.cs 8 Apr 2004 17:22:08 -0000 1.1 --- Bar.cs 2 Jun 2004 04:53:24 -0000 1.2 *************** *** 14,20 **** /// <summary> ! /// Gets or sets the _x /// </summary> ! public new int x { get --- 14,20 ---- /// <summary> ! /// Gets or sets the X /// </summary> ! public int X { get *************** *** 36,40 **** /// Gets or sets the _barString /// </summary> ! public string barString { get --- 36,40 ---- /// Gets or sets the _barString /// </summary> ! public string BarString { get *************** *** 56,60 **** /// Gets or sets the _barComponent /// </summary> ! public FooComponent barComponent { get --- 56,60 ---- /// Gets or sets the _barComponent /// </summary> ! public FooComponent BarComponent { get *************** *** 76,80 **** /// Gets or sets the _baz /// </summary> ! public Baz baz { get --- 76,80 ---- /// Gets or sets the _baz /// </summary> ! public Baz Baz { get *************** *** 96,100 **** /// Gets or sets the _name /// </summary> ! public string name { get --- 96,100 ---- /// Gets or sets the _name /// </summary> ! public string Name { get *************** *** 116,120 **** /// Gets or sets the _object /// </summary> ! public object @object { get --- 116,120 ---- /// Gets or sets the _object /// </summary> ! public object Object { get Index: NestingComponent.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NestingComponent.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NestingComponent.cs 8 Apr 2004 17:22:08 -0000 1.1 --- NestingComponent.cs 2 Jun 2004 04:53:24 -0000 1.2 *************** *** 4,8 **** namespace NHibernate.DomainModel { ! public class NestingComponent { /// <summary> /// Holds the _nested --- 4,8 ---- namespace NHibernate.DomainModel { ! [Serializable] public class NestingComponent { /// <summary> /// Holds the _nested *************** *** 13,17 **** /// Gets or sets the _nested /// </summary> ! public ComponentCollection nested { get --- 13,17 ---- /// Gets or sets the _nested /// </summary> ! public ComponentCollection Nested { get Index: Abstract.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Abstract.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Abstract.cs 8 Apr 2004 16:44:19 -0000 1.1 --- Abstract.cs 2 Jun 2004 04:53:24 -0000 1.2 *************** *** 15,19 **** /// Gets or sets the _time /// </summary> ! public DateTime time { get --- 15,19 ---- /// Gets or sets the _time /// </summary> ! public DateTime Time { get *************** *** 34,38 **** /// Gets or sets the _abstract /// </summary> ! public IList abstracts { get --- 34,38 ---- /// Gets or sets the _abstract /// </summary> ! public IList Abstracts { get --- NEW FILE: CustomPersister.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for CustomPersister. /// </summary> public class CustomPersister { public CustomPersister() { // // TODO: Add constructor logic here // } } } --- NEW FILE: Custom.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Custom. /// </summary> public class Custom : ICloneable { long _id; string _name; public long Id { get { return _id; } set { _id = value; } } public string Name { get { return _name; } set { _name = value; } } #region ICloneable Members public object Clone() { return this.MemberwiseClone(); //TODO: h2.0.3 had a try-catch block -> not sure where it was used. } #endregion } } --- NEW FILE: Detail.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Detail. /// </summary> [Serializable] public class Detail { private Master _master; private int _i; private IDictionary _details; //set in mapping private int _x; public Master Master { get { return _master;} set { _master = value; } } public int I { get { return _i;} set {_i = value; } } public IDictionary SubDetails { get { return _details;} set { _details = value; } } public int X { get { return _x;} set { _x = value; } } } } Index: FooBar.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FooBar.hbm.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FooBar.hbm.xml 29 Apr 2004 16:04:57 -0000 1.5 --- FooBar.hbm.xml 2 Jun 2004 04:53:24 -0000 1.6 *************** *** 107,125 **** proxy="NHibernate.DomainModel.AbstractProxy, NHibernate.DomainModel" discriminator-value="null"> ! <set name="abstracts"> <key column="abstract_id"/> <one-to-many class="NHibernate.DomainModel.Abstract, NHibernate.DomainModel"/> </set> ! <property name="time" column="the_time"/> <subclass name="NHibernate.DomainModel.Bar, NHibernate.DomainModel" proxy="NHibernate.DomainModel.BarProxy, NHibernate.DomainModel" discriminator-value="B"> ! <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"/> --- 107,125 ---- proxy="NHibernate.DomainModel.AbstractProxy, NHibernate.DomainModel" discriminator-value="null"> ! <set name="Abstracts"> <key column="abstract_id"/> <one-to-many class="NHibernate.DomainModel.Abstract, NHibernate.DomainModel"/> </set> ! <property name="Time" column="the_time"/> <subclass name="NHibernate.DomainModel.Bar, NHibernate.DomainModel" proxy="NHibernate.DomainModel.BarProxy, NHibernate.DomainModel" discriminator-value="B"> ! <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"/> *************** *** 131,135 **** </array> </component> ! <any name="object" id-type="Int64" cascade="all"> <column name="clazz" length="100"/> <column name="gen_id"/> --- 131,135 ---- </array> </component> ! <any name="Object" id-type="Int64" cascade="all"> <column name="clazz" length="100"/> <column name="gen_id"/> Index: Baz.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Baz.hbm.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Baz.hbm.xml 3 May 2004 04:52:48 -0000 1.7 --- Baz.hbm.xml 2 Jun 2004 04:53:24 -0000 1.8 *************** *** 224,234 **** <component name="collectionComponent"> ! <component name="nested"> ! <property name="str"/> ! <bag name="foos" cascade="all"> <key column="baz_compon_id"/> <one-to-many class="NHibernate.DomainModel.Foo, NHibernate.DomainModel"/> </bag> ! <bag name="floats" table="baz_floats_bag"> <key column="baz_compon_id"/> <element type="Int64" column="float_value"/> --- 224,234 ---- <component name="collectionComponent"> ! <component name="Nested"> ! <property name="Str"/> ! <bag name="Foos" cascade="all"> <key column="baz_compon_id"/> <one-to-many class="NHibernate.DomainModel.Foo, NHibernate.DomainModel"/> </bag> ! <bag name="Floats" table="baz_floats_bag"> <key column="baz_compon_id"/> <element type="Int64" column="float_value"/> Index: AbstractProxy.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/AbstractProxy.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AbstractProxy.cs 8 Apr 2004 16:44:19 -0000 1.1 --- AbstractProxy.cs 2 Jun 2004 04:53:24 -0000 1.2 *************** *** 6,15 **** public interface AbstractProxy : FooProxy { ! IList abstracts { get; set; } ! DateTime time { get; --- 6,15 ---- public interface AbstractProxy : FooProxy { ! IList Abstracts { get; set; } ! DateTime Time { get; --- NEW FILE: Container.cs --- using System; namespace NHibernate.DomainModel { //TODO: write all of this... /// <summary> /// Summary description for Container. /// </summary> public class Container { public Container() { // // TODO: Add constructor logic here // } } } Index: Child.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Child.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Child.cs 10 Feb 2004 19:12:58 -0000 1.1 --- Child.cs 2 Jun 2004 04:53:24 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- namespace NHibernate.DomainModel { + //TODO: this conflicts with a H2.0.3 class for testing... /// <summary> /// Summary description for Child. --- NEW FILE: Circular.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Circular. /// </summary> public class Circular { private string _id; private System.Type _clazz; private Circular _other; private object _anyEntity; public string Id { get { return _id; } set { _id = value; } } public System.Type Clazz { get { return _clazz; } set { _clazz = value; } } public Circular Other { get { return _other; } set { _other = value; } } public object AnyEntity { get { return _anyEntity; } set { _anyEntity = value; } } } } --- NEW FILE: Master.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Master. /// </summary> public class Master { public Master() { // // TODO: Add constructor logic here // } } } Index: NHibernate.DomainModel-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel-1.1.csproj,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NHibernate.DomainModel-1.1.csproj 11 May 2004 19:44:58 -0000 1.11 --- NHibernate.DomainModel-1.1.csproj 2 Jun 2004 04:53:24 -0000 1.12 *************** *** 118,121 **** --- 118,126 ---- /> <File + RelPath = "Assignable.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "AuditComponent.cs" SubType = "Code" *************** *** 147,150 **** --- 152,160 ---- /> <File + RelPath = "BasicNameable.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Baz.cs" SubType = "Code" *************** *** 156,159 **** --- 166,174 ---- /> <File + RelPath = "Blobber.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "C1.cs" SubType = "Code" *************** *** 166,169 **** --- 181,189 ---- /> <File + RelPath = "Category.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Child.cs" SubType = "Code" *************** *** 175,178 **** --- 195,203 ---- /> <File + RelPath = "Circular.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "ClassWithCompositeId.cs" SubType = "Code" *************** *** 199,206 **** --- 224,251 ---- /> <File + RelPath = "Contained.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Container.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Container.hbm.xml" BuildAction = "EmbeddedResource" /> <File + RelPath = "Custom.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "CustomPersister.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "D.cs" SubType = "Code" *************** *** 208,211 **** --- 253,261 ---- /> <File + RelPath = "Detail.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "DoubleStringType.cs" SubType = "Code" *************** *** 322,325 **** --- 372,380 ---- /> <File + RelPath = "Master.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Multiplicity.cs" SubType = "Code" --- NEW FILE: Contained.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Contained. /// </summary> public class Contained { private Container _container; private long _id; private IList _bag = new ArrayList(); private IList _lazyBag = new ArrayList(); # region object overrides public override bool Equals(object obj) { if(obj==null) return false; return _id==( (Contained)obj).Id; } public override int GetHashCode() { return _id.GetHashCode(); } #endregion public Container Container { get { return _container; } set { _container = value; } } public long Id { get { return _id; } set { _id = value; } } public IList Bag { get { return _bag; } set { _bag = value; } } public IList LazyBag { get { return _lazyBag; } set { _lazyBag = value; } } } } Index: BarProxy.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/BarProxy.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BarProxy.cs 8 Apr 2004 17:22:08 -0000 1.1 --- BarProxy.cs 2 Jun 2004 04:53:24 -0000 1.2 *************** *** 6,24 **** public interface BarProxy : AbstractProxy { ! Baz baz { get; set; } ! FooComponent barComponent { get; set; } ! string barString { get; } ! object @object { get; --- 6,24 ---- public interface BarProxy : AbstractProxy { ! Baz Baz { get; set; } ! FooComponent BarComponent { get; set; } ! string BarString { get; } ! object Object { get; --- NEW FILE: Blobber.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Blobber. /// </summary> public class Blobber { public Blobber() { // // TODO: Add constructor logic here // } } } Index: ComponentCollection.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/ComponentCollection.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ComponentCollection.cs 8 Apr 2004 17:22:08 -0000 1.1 --- ComponentCollection.cs 2 Jun 2004 04:53:24 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- namespace NHibernate.DomainModel { + [Serializable] public class ComponentCollection { /// <summary> *************** *** 13,17 **** /// Gets or sets the _foos /// </summary> ! public IList foos { get --- 14,18 ---- /// Gets or sets the _foos /// </summary> ! public IList Foos { get *************** *** 34,38 **** /// Gets or sets the _str /// </summary> ! public string str { get --- 35,39 ---- /// Gets or sets the _str /// </summary> ! public string Str { get *************** *** 52,56 **** /// Gets or sets the _floats /// </summary> ! public IList floats { get --- 53,57 ---- /// Gets or sets the _floats /// </summary> ! public IList Floats { get --- NEW FILE: Assignable.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Assignable. /// </summary> public class Assignable { private string _id; private ICollection _categories; public string Id { get { return _id; } set { _id = value; } } public ICollection Categories { get { return _categories; } set { _categories = value; } } } } --- NEW FILE: Category.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { /// <summary> /// Summary description for Category. /// </summary> public class Category { private static readonly string RootCategory = "/"; private long _id; private string _name; private IList _subcategories = new ArrayList(); private Assignable _assignable; public long Id { get { return _id; } set { _id = value; } } public string Name { get { return _name; } set { _name = value; } } public IList Subcategories { get { return _subcategories; } set { _subcategories = value; } } public Assignable Assignable { get { return _assignable; } set { _assignable = value; } } } } --- NEW FILE: BasicNameable.cs --- using System; namespace NHibernate.DomainModel { /// <summary> /// Summary description for BasicNameable. /// </summary> public class BasicNameable { private string _name; private long _id; public string Name { get { return _name; } set { _name = value; } } public long Key { get { return _id; } set { _id = value; } } } } |
From: Peter S. <sz...@us...> - 2004-06-01 13:00:20
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11466/src/NHibernate/Hql Modified Files: WhereParser.cs Log Message: Hotfix on booleanoperators Index: WhereParser.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/WhereParser.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** WhereParser.cs 28 May 2004 09:08:57 -0000 1.15 --- WhereParser.cs 1 Jun 2004 13:00:11 -0000 1.16 *************** *** 40,44 **** if (booleanOperatorsAsRegEx.Length != 0) return booleanOperatorsAsRegEx; ! StringBuilder sb = new StringBuilder("(?:"); foreach(string s in booleanOperators) { --- 40,44 ---- if (booleanOperatorsAsRegEx.Length != 0) return booleanOperatorsAsRegEx; ! StringBuilder sb = new StringBuilder(@"(?:\(|"); foreach(string s in booleanOperators) { |
From: Michael D. <mik...@us...> - 2004-06-01 01:36:19
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Type In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22694/Type Modified Files: ArrayType.cs MapType.cs PersistentCollectionType.cs Log Message: Fixed method naming inconsitencies with ElementCollection and GetElementCollection and added correct overrides to MapType class. Fixes problem reported on forum about <map>s not cascading. Index: MapType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/MapType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MapType.cs 10 Feb 2004 18:41:42 -0000 1.3 --- MapType.cs 1 Jun 2004 01:36:11 -0000 1.4 *************** *** 20,28 **** } ! public ICollection ElementsCollection(object collection) { return ((IDictionary) collection).Values; } ! public override PersistentCollection Wrap(ISessionImplementor session, object collection) { return new Map( session, (IDictionary) collection ); } --- 20,30 ---- } ! public override ICollection GetElementsCollection(object collection) ! { return ((IDictionary) collection).Values; } ! public override PersistentCollection Wrap(ISessionImplementor session, object collection) ! { return new Map( session, (IDictionary) collection ); } Index: ArrayType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/ArrayType.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ArrayType.cs 24 Mar 2004 19:54:02 -0000 1.5 --- ArrayType.cs 1 Jun 2004 01:36:11 -0000 1.6 *************** *** 28,32 **** } ! public ICollection ElementsCollection(object collection) { return ((object[])collection); } --- 28,32 ---- } ! public override ICollection GetElementsCollection(object collection) { return ((object[])collection); } Index: PersistentCollectionType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/PersistentCollectionType.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PersistentCollectionType.cs 24 May 2004 05:49:19 -0000 1.11 --- PersistentCollectionType.cs 1 Jun 2004 01:36:11 -0000 1.12 *************** *** 88,101 **** } ! //Is it correct? ! //Was: ! //public Iterator getElementsIterator(Object collection) { ! // return ( (java.util.Collection) collection ).iterator(); ! //} /// <summary> ! /// Returns a reference to the underlying ICollection /// </summary> /// <param name="collection">The object that holds the ICollection.</param> ! /// <returns>An ICollection.</returns> public virtual ICollection GetElementsCollection(object collection) { return ( (ICollection)collection ); --- 88,102 ---- } ! /// <summary> ! /// Returns a reference to the elements in the collection. /// </summary> /// <param name="collection">The object that holds the ICollection.</param> ! /// <returns>An ICollection of the Elements(classes) in the Collection.</returns> ! /// <remarks> ! /// By default the parameter <c>collection</c> is just cast to an ICollection. Collections ! /// such as Maps and Sets should override this so that the Elements are returned - not a ! /// DictionaryEntry. ! /// </remarks> public virtual ICollection GetElementsCollection(object collection) { return ( (ICollection)collection ); |
From: Peter S. <sz...@us...> - 2004-05-28 11:49:23
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1770/src/NHibernate/Impl Modified Files: SessionFactoryImpl.cs Log Message: Modified exception handling a bit, compilation of queries should be much faster now. Index: SessionFactoryImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/SessionFactoryImpl.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** SessionFactoryImpl.cs 16 May 2004 03:53:26 -0000 1.18 --- SessionFactoryImpl.cs 28 May 2004 11:49:04 -0000 1.19 *************** *** 403,407 **** //(IClassPersister) was replaced by as IClassPersister result = classPersistersByName[className] as IClassPersister; ! if ( result==null) throw new MappingException( "No persister for: " + className ); return result; } --- 403,407 ---- //(IClassPersister) was replaced by as IClassPersister result = classPersistersByName[className] as IClassPersister; ! //if ( result==null) throw new MappingException( "No persister for: " + className ); return result; } |
From: Peter S. <sz...@us...> - 2004-05-28 11:49:22
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1770/src/NHibernate.Test Modified Files: PerformanceTest.cs Log Message: Modified exception handling a bit, compilation of queries should be much faster now. Index: PerformanceTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/PerformanceTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PerformanceTest.cs 26 May 2004 15:47:50 -0000 1.2 --- PerformanceTest.cs 28 May 2004 11:49:05 -0000 1.3 *************** *** 61,65 **** [Test] ! //[Ignore("User should comment this out if they want it to run. Does not test any functions.")] public void Many() { --- 61,65 ---- [Test] ! [Ignore("User should comment this out if they want it to run. Does not test any functions.")] public void Many() { |
From: Peter S. <sz...@us...> - 2004-05-28 11:49:22
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1770/src/NHibernate/Util Modified Files: ReflectHelper.cs Log Message: Modified exception handling a bit, compilation of queries should be much faster now. Index: ReflectHelper.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/ReflectHelper.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ReflectHelper.cs 13 Apr 2004 10:25:46 -0000 1.10 --- ReflectHelper.cs 28 May 2004 11:49:05 -0000 1.11 *************** *** 142,145 **** --- 142,146 ---- /// <returns>The Type for the Class.</returns> public static System.Type ClassForName(string name) { + if (name == " ") return null; return System.Type.GetType(name, true); } |
From: Peter S. <sz...@us...> - 2004-05-28 09:09:07
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5074 Modified Files: QueryTranslator.cs WhereParser.cs Log Message: Changed handling of boolean ops to be regex based. Fixed error with 'in' HQLs. Index: WhereParser.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/WhereParser.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** WhereParser.cs 27 May 2004 18:49:44 -0000 1.14 --- WhereParser.cs 28 May 2004 09:08:57 -0000 1.15 *************** *** 32,36 **** private static StringCollection expressionOpeners = new StringCollection(); //tokens that open a sub expression //TODO: HACK to make this internal for QueryTranslator... ! internal static StringCollection booleanOperators = new StringCollection(); //tokens that would indicate a sub expression is a boolean expression private static IDictionary negations = new Hashtable(); private Dialect.Dialect d; --- 32,55 ---- private static StringCollection expressionOpeners = new StringCollection(); //tokens that open a sub expression //TODO: HACK to make this internal for QueryTranslator... ! private static StringCollection booleanOperators = new StringCollection(); //tokens that would indicate a sub expression is a boolean expression ! private static string booleanOperatorsAsRegEx = string.Empty; ! internal static string BooleanOperatorsAsRegEx ! { ! get ! { ! if (booleanOperatorsAsRegEx.Length != 0) ! return booleanOperatorsAsRegEx; ! StringBuilder sb = new StringBuilder("(?:"); ! foreach(string s in booleanOperators) ! { ! sb.Append(s); ! sb.Append("|"); ! } ! sb.Remove(sb.Length-1, 1); ! sb.Append(@")[^\w]*$"); ! booleanOperatorsAsRegEx = sb.ToString(); ! return booleanOperatorsAsRegEx; ! } ! } private static IDictionary negations = new Hashtable(); private Dialect.Dialect d; Index: QueryTranslator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/QueryTranslator.cs,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** QueryTranslator.cs 27 May 2004 18:49:43 -0000 1.29 --- QueryTranslator.cs 28 May 2004 09:08:57 -0000 1.30 *************** *** 4,7 **** --- 4,8 ---- using System.Data; using System.Text; + using System.Text.RegularExpressions; using System.Reflection; using System.Runtime.Serialization; *************** *** 1349,1360 **** private bool EndsWithBoolOperator(string sqlFragment) { ! string sql = sqlFragment.Trim(); ! ! for(int i = 0; i < WhereParser.booleanOperators.Count; i++) ! { ! if( sql.EndsWith(WhereParser.booleanOperators[i]) ) return true; ! } ! ! return false; } } --- 1350,1355 ---- private bool EndsWithBoolOperator(string sqlFragment) { ! Regex r = new Regex(WhereParser.BooleanOperatorsAsRegEx, RegexOptions.IgnoreCase | RegexOptions.Compiled); ! return r.Match(sqlFragment).Success; } } |
From: Michael D. <mik...@us...> - 2004-05-27 18:49:55
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28170/NHibernate/Hql Modified Files: QueryTranslator.cs WhereParser.cs Log Message: Fixed the broken parameter parsing. Does not just check for "=" anymore, it now uses the booleanOperators in WhereParser. Index: WhereParser.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/WhereParser.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** WhereParser.cs 20 May 2004 21:07:58 -0000 1.13 --- WhereParser.cs 27 May 2004 18:49:44 -0000 1.14 *************** *** 31,35 **** private static StringCollection expressionTerminators = new StringCollection(); //tokens that close a sub expression private static StringCollection expressionOpeners = new StringCollection(); //tokens that open a sub expression ! private static StringCollection booleanOperators = new StringCollection(); //tokens that would indicate a sub expression is a boolean expression private static IDictionary negations = new Hashtable(); private Dialect.Dialect d; --- 31,36 ---- private static StringCollection expressionTerminators = new StringCollection(); //tokens that close a sub expression private static StringCollection expressionOpeners = new StringCollection(); //tokens that open a sub expression ! //TODO: HACK to make this internal for QueryTranslator... ! internal static StringCollection booleanOperators = new StringCollection(); //tokens that would indicate a sub expression is a boolean expression private static IDictionary negations = new Hashtable(); private Dialect.Dialect d; Index: QueryTranslator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/QueryTranslator.cs,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** QueryTranslator.cs 20 May 2004 21:05:29 -0000 1.28 --- QueryTranslator.cs 27 May 2004 18:49:43 -0000 1.29 *************** *** 1248,1253 **** /// </para> /// <para> ! /// This should not be considered a permanent solution because it is not very smart - it splits on ! /// a <c>?</c> as long as the previous token ends with <c>"="</c> or <c>"= "</c>. /// </para> /// <para> --- 1248,1253 ---- /// </para> /// <para> ! /// This should not be considered a permanent solution. While parsing the HQL we should be building ! /// a SqlString, not a string that contains sql... /// </para> /// <para> *************** *** 1323,1327 **** if(token.Equals(StringHelper.SqlParameter) ! && ( previousToken.EndsWith("=") || previousToken.EndsWith("= ") ) ) { Parameter param = Parameter.GenerateParameters(session.Factory, new string[]{paramIndex.ToString()}, paramTypes[paramIndex])[0]; --- 1323,1327 ---- if(token.Equals(StringHelper.SqlParameter) ! && ( EndsWithBoolOperator( previousToken ) ) ) //.EndsWith("=") || previousToken.EndsWith("= ") ) ) { Parameter param = Parameter.GenerateParameters(session.Factory, new string[]{paramIndex.ToString()}, paramTypes[paramIndex])[0]; *************** *** 1340,1343 **** --- 1340,1361 ---- } + + /// <summary> + /// Temp method to help us figure out if the string ends with character that indicate that + /// a parameter is likely to follow. + /// </summary> + /// <param name="sqlFragment">A string that contains sql.</param> + /// <returns>true when a Parameter might follow this sql.</returns> + private bool EndsWithBoolOperator(string sqlFragment) + { + string sql = sqlFragment.Trim(); + + for(int i = 0; i < WhereParser.booleanOperators.Count; i++) + { + if( sql.EndsWith(WhereParser.booleanOperators[i]) ) return true; + } + + return false; + } } } \ No newline at end of file |
From: Michael D. <mik...@us...> - 2004-05-27 13:55:49
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3212/NHibernate/SqlCommand Modified Files: Parameter.cs Log Message: Fixed problem with Equals and null TableAlias Index: Parameter.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/Parameter.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Parameter.cs 25 May 2004 17:14:27 -0000 1.5 --- Parameter.cs 27 May 2004 13:55:39 -0000 1.6 *************** *** 154,161 **** //Step 3: Check each important field - return this.DbType.Equals(rhs.DbType) - && this.Name.Equals(rhs.Name) - && this.TableAlias.Equals(rhs.TableAlias); } --- 154,174 ---- //Step 3: Check each important field + // these 2 fields will not be null so compare them... + if(this.DbType.Equals(rhs.DbType)==false || this.Name.Equals(rhs.Name)==false) return false; + + // becareful with TableAlias being null + if(this.TableAlias==null && rhs.TableAlias==null) + { + return true; + } + else if (this.TableAlias==null && rhs.TableAlias!=null) + { + return false; + } + else + { + return this.TableAlias.Equals(rhs.TableAlias); + } } |
From: Michael D. <mik...@us...> - 2004-05-26 15:48:00
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23016/NHibernate.Test Modified Files: PerformanceTest.cs Log Message: Changed test to generate the exact same sql with NHibernate and direct ADO.NET with IDbCommand & IDataReader. Index: PerformanceTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/PerformanceTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PerformanceTest.cs 25 May 2004 17:21:45 -0000 1.1 --- PerformanceTest.cs 26 May 2004 15:47:50 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Collections; using System.Data; *************** *** 23,27 **** /// <para> /// On a production machine, the finest level of detail you should log is WARN. On my machines ! /// test take 3 times the amount of time to run with a log level of DEBUG as WARN. /// </para> /// </remarks> --- 24,41 ---- /// <para> /// On a production machine, the finest level of detail you should log is WARN. On my machines ! /// test take about 3 times the amount of time to run with a log level of DEBUG compared to WARN. ! /// </para> ! /// <para> ! /// Currently (2004-05-26) NHibernate adds about 20% overhead versus a straight DataReader when ! /// the exact same sql is issued. NHibernate's DriverConnectionProvider has not implemented a ! /// Connection Cache or Prepared IDbCommand cache yet. No cache was configured for the class Simple for ! /// this test. So there are optimizations that are yet to be made, even then it is performing ! /// well compared to a DataReader. I plan on making a seperate csproj to store Performance ! /// Test because NProf has problems with getting performance figures from dlls running in NUnit - or ! /// atleast I have not been able to get it to work. ! /// </para> ! /// <para> ! /// Also test with a larger amount of data in the tables so they can be compared to a DataSet & Type DataSet ! /// will later be added. /// </para> /// </remarks> *************** *** 47,50 **** --- 61,65 ---- [Test] + //[Ignore("User should comment this out if they want it to run. Does not test any functions.")] public void Many() { *************** *** 54,58 **** long adonet = 0; ! for(int n = 0; n < 5; n++) { Simple[] simples = new Simple[n]; --- 69,74 ---- long adonet = 0; ! //for(int n = 0; n < 20; n++) ! for(int n = 0; n < 20; n++) { Simple[] simples = new Simple[n]; *************** *** 117,120 **** --- 133,137 ---- System.Console.Out.Write("NHibernate: " + hiber + "ms / Direct ADO.NET: " + adonet + "ms = Ratio: " + (((float)hiber/adonet)).ToString() ); + //cp.Close(); System.GC.Collect(); } *************** *** 138,153 **** } ! private void Hibernate(ISession s, Simple[] simples, object[] ids, int n, string runname) { ITransaction t = s.BeginTransaction(); ! for(int i = 0; i < n; i++) { s.Save(simples[i]); //, ids[i]); } ! for(int i = 0; i < n; i++) { ! simples[i].Name = "NH - A Different Name!" + i + n + runname; } --- 155,171 ---- } ! private void Hibernate(ISession s, Simple[] simples, object[] ids, int N, string runname) { ITransaction t = s.BeginTransaction(); ! for(int i = 0; i < N; i++) { s.Save(simples[i]); //, ids[i]); } + s.Flush(); ! for(int i = 0; i < N; i++) { ! simples[i].Name = "NH - " + i + N + runname + " - " + System.DateTime.Now.Ticks; } *************** *** 158,164 **** // hql is throwing perf way off... //Assert.IsTrue( s.Delete("from s in class NHibernate.DomainModel.Simple") == n); ! for(int i = 0; i < n; i++) { ! s.Delete(simples[i]); } s.Flush(); --- 176,185 ---- // hql is throwing perf way off... //Assert.IsTrue( s.Delete("from s in class NHibernate.DomainModel.Simple") == n); ! ! IList simpleList = s.CreateCriteria(typeof(Simple)).List(); ! ! for(int i = 0; i < simpleList.Count; i++) { ! s.Delete((Simple)simpleList[i]); } s.Flush(); *************** *** 167,171 **** } ! private void DirectAdoNet(IDbConnection c, Simple[] simples, object[] ids, int n, string runname) { IDbCommand insert = InsertCommand(); --- 188,192 ---- } ! private void DirectAdoNet(IDbConnection c, Simple[] simples, object[] ids, int N, string runname) { IDbCommand insert = InsertCommand(); *************** *** 191,195 **** update.Prepare(); ! for(int i = 0; i < n; i++) { ((IDbDataParameter)insert.Parameters[0]).Value = simples[i].Name; --- 212,216 ---- update.Prepare(); ! for(int i = 0; i < N; i++) { ((IDbDataParameter)insert.Parameters[0]).Value = simples[i].Name; *************** *** 203,209 **** } ! for(int i = 0; i < n; i++) { ! ((IDbDataParameter)update.Parameters[0]).Value = "DR - A Different Name!" + i + n + runname; ((IDbDataParameter)update.Parameters[1]).Value = simples[i].Address; ((IDbDataParameter)update.Parameters[2]).Value = simples[i].Count; --- 224,230 ---- } ! for(int i = 0; i < N; i++) { ! ((IDbDataParameter)update.Parameters[0]).Value = "DR - " + i + N + runname + " - " + System.DateTime.Now.Ticks; ((IDbDataParameter)update.Parameters[1]).Value = simples[i].Address; ((IDbDataParameter)update.Parameters[2]).Value = simples[i].Count; *************** *** 216,221 **** IDataReader reader = select.ExecuteReader(); ! long[] keys = new long[n]; ! Simple[] simplesFromReader = new Simple[n]; int j = 0; --- 237,242 ---- IDataReader reader = select.ExecuteReader(); ! long[] keys = new long[N]; ! Simple[] simplesFromReader = new Simple[N]; int j = 0; *************** *** 225,230 **** { //SELECT s.id_, s.name, s.address, s.count_, s.date_, s.other - simplesFromReader[j] = new Simple(); keys[j] = (long)reader[0]; simplesFromReader[j].Key = keys[j]; simplesFromReader[j].Name = (string)reader[1]; --- 246,251 ---- { //SELECT s.id_, s.name, s.address, s.count_, s.date_, s.other keys[j] = (long)reader[0]; + simplesFromReader[j] = new Simple(); simplesFromReader[j].Key = keys[j]; simplesFromReader[j].Name = (string)reader[1]; *************** *** 243,247 **** reader.Close(); ! for(int i = 0; i < n; i++) { ((IDbDataParameter)delete.Parameters[0]).Value = (long)keys[i]; --- 264,268 ---- reader.Close(); ! for(int i = 0; i < N; i++) { ((IDbDataParameter)delete.Parameters[0]).Value = (long)keys[i]; |
From: Michael D. <mik...@us...> - 2004-05-25 17:21:55
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13645/NHibernate.Test Modified Files: NHibernate.Test-1.1.csproj Added Files: PerformanceTest.cs Log Message: Added the PerformanceTest - the log4net log level is very important to the performance of nhibernate. --- NEW FILE: PerformanceTest.cs --- using System; using System.Data; using NHibernate.Cfg; using NHibernate.Connection; using NHibernate.Driver; using NHibernate.DomainModel; using NUnit.Framework; namespace NHibernate.Test { /// <summary> /// Does some quick & dirty Performance Tests. /// </summary> /// <remarks> /// <para> /// The results of these tests are highly dependant upon your log4net settings. NHibernate /// logs alot of information and some of the log messages involve string concatenation and /// calling other methods to generate a useful message. /// </para> /// <para> /// On a production machine, the finest level of detail you should log is WARN. On my machines /// test take 3 times the amount of time to run with a log level of DEBUG as WARN. /// </para> /// </remarks> [TestFixture] public class PerformanceTest : TestCase { string driverClass = null; IDriver driver = null; [SetUp] public void SetUp() { ExportSchema( new string[] { "Simple.hbm.xml"} ); driverClass = (string)cfg.Properties["hibernate.connection.driver_class"]; if(driverClass.IndexOf(",") < 0) { driverClass += ", NHibernate"; } driver = (IDriver)Activator.CreateInstance(System.Type.GetType(driverClass)); } [Test] public void Many() { IConnectionProvider cp = ConnectionProviderFactory.NewConnectionProvider( Cfg.Environment.Properties ); long hiber = 0; long adonet = 0; for(int n = 0; n < 5; n++) { Simple[] simples = new Simple[n]; object[] ids = new object[n]; for(int i = 0; i < n; i++) { simples[i] = new Simple(); simples[i].Init(); simples[i].Count = i; simples[i].Key = (long)i; ids[i] = (long)i; } // allow cache to settle ISession s = sessions.OpenSession(); Hibernate(s, simples, ids, n, "h0"); s.Close(); IDbConnection c = cp.GetConnection(); DirectAdoNet(c, simples, ids, n, "j0"); cp.CloseConnection(c); s = sessions.OpenSession(); Hibernate(s, simples, ids, n, "h0"); s.Close(); c = cp.GetConnection(); DirectAdoNet(c, simples, ids, n, "j0"); cp.CloseConnection(c); // now do timings int loops = 30; for(int runIndex = 1; runIndex < 4; runIndex++) { long time = DateTime.Now.Ticks; for(int i = 0; i < loops; i++) { s = sessions.OpenSession(); Hibernate(s, simples, ids, n, "h" + runIndex.ToString()); s.Connection.Close(); s.Close(); } hiber += DateTime.Now.Ticks - time; time = DateTime.Now.Ticks; for(int i = 0; i < loops; i++) { c = cp.GetConnection(); DirectAdoNet(c, simples, ids, n, "j" + runIndex.ToString()); cp.CloseConnection(c); } adonet += DateTime.Now.Ticks - time; } } System.Console.Out.Write("NHibernate: " + hiber + "ms / Direct ADO.NET: " + adonet + "ms = Ratio: " + (((float)hiber/adonet)).ToString() ); System.GC.Collect(); } [Test] [Ignore("Have not written yet.")] public void Simultaneous() { } [Test] [Ignore("Have not written yet.")] public void HibernateOnly() { } [Test] [Ignore("Have not written yet.")] public void AdoNetOnly() { } private void Hibernate(ISession s, Simple[] simples, object[] ids, int n, string runname) { ITransaction t = s.BeginTransaction(); for(int i = 0; i < n; i++) { s.Save(simples[i]); //, ids[i]); } for(int i = 0; i < n; i++) { simples[i].Name = "NH - A Different Name!" + i + n + runname; } s.Flush(); // the results of this test are highly dependent upon // how many times we flush! // hql is throwing perf way off... //Assert.IsTrue( s.Delete("from s in class NHibernate.DomainModel.Simple") == n); for(int i = 0; i < n; i++) { s.Delete(simples[i]); } s.Flush(); t.Commit(); } private void DirectAdoNet(IDbConnection c, Simple[] simples, object[] ids, int n, string runname) { IDbCommand insert = InsertCommand(); IDbCommand delete = DeleteCommand(); IDbCommand select = SelectCommand(); IDbCommand update = UpdateCommand(); IDbTransaction t = c.BeginTransaction(); insert.Connection = c; delete.Connection = c; select.Connection = c; update.Connection = c; insert.Transaction = t; delete.Transaction = t; select.Transaction = t; update.Transaction = t; insert.Prepare(); delete.Prepare(); select.Prepare(); update.Prepare(); for(int i = 0; i < n; i++) { ((IDbDataParameter)insert.Parameters[0]).Value = simples[i].Name; ((IDbDataParameter)insert.Parameters[1]).Value = simples[i].Address; ((IDbDataParameter)insert.Parameters[2]).Value = simples[i].Count; ((IDbDataParameter)insert.Parameters[3]).Value = simples[i].Date; ((IDbDataParameter)insert.Parameters[4]).Value = DBNull.Value; ((IDbDataParameter)insert.Parameters[5]).Value = (long)ids[i]; insert.ExecuteNonQuery(); } for(int i = 0; i < n; i++) { ((IDbDataParameter)update.Parameters[0]).Value = "DR - A Different Name!" + i + n + runname; ((IDbDataParameter)update.Parameters[1]).Value = simples[i].Address; ((IDbDataParameter)update.Parameters[2]).Value = simples[i].Count; ((IDbDataParameter)update.Parameters[3]).Value = simples[i].Date; ((IDbDataParameter)update.Parameters[4]).Value = DBNull.Value; ((IDbDataParameter)update.Parameters[5]).Value = (long)ids[i]; update.ExecuteNonQuery(); } IDataReader reader = select.ExecuteReader(); long[] keys = new long[n]; Simple[] simplesFromReader = new Simple[n]; int j = 0; long other; while(reader.Read()) { //SELECT s.id_, s.name, s.address, s.count_, s.date_, s.other simplesFromReader[j] = new Simple(); keys[j] = (long)reader[0]; simplesFromReader[j].Key = keys[j]; simplesFromReader[j].Name = (string)reader[1]; simplesFromReader[j].Address = (string)reader[2]; simplesFromReader[j].Count = (int)reader[3]; simplesFromReader[j].Date = (DateTime)reader[4]; if(reader.IsDBNull(5)==false) { other = reader.GetInt64(5); } j++; } reader.Close(); for(int i = 0; i < n; i++) { ((IDbDataParameter)delete.Parameters[0]).Value = (long)keys[i]; delete.ExecuteNonQuery(); } t.Commit(); } private IDbCommand DeleteCommand() { string sql = "delete from Simple where id_ = "; sql += driver.FormatNameForSql("iup0"); IDbCommand cmd = driver.CreateCommand(); cmd.CommandText = sql; IDbDataParameter prm = cmd.CreateParameter(); prm.ParameterName = driver.FormatNameForParameter("iup0"); prm.DbType = DbType.Int64; cmd.Parameters.Add(prm); return cmd; } private IDbCommand InsertCommand() { string sql = "insert into Simple ( name, address, count_, date_, other, id_ ) values ("; for(int i = 0; i < 6; i++ ) { if(i > 0) sql += ", "; sql += driver.FormatNameForSql("iup" + i.ToString()); } sql += ")"; IDbCommand cmd = driver.CreateCommand(); cmd.CommandText = sql; AppendInsertUpdateParams(cmd); return cmd; } private IDbCommand SelectCommand() { string sql = "SELECT s.id_, s.name, s.address, s.count_, s.date_, s.other FROM Simple s"; IDbCommand cmd = driver.CreateCommand(); cmd.CommandText = sql; return cmd; } private IDbCommand UpdateCommand() { string sql = "update Simple set"; sql += ( " name = " + driver.FormatNameForSql("iup0") ) ; sql += ( ", address = " + driver.FormatNameForSql("iup1") ); sql += ( ", count_ = " + driver.FormatNameForSql("iup2") ); sql += ( ", date_ = " + driver.FormatNameForSql("iup3") ); sql += ( ", other = " + driver.FormatNameForSql("iup4") ); sql += " where id_ = " + driver.FormatNameForSql("iup5"); IDbCommand cmd = driver.CreateCommand(); cmd.CommandText = sql; AppendInsertUpdateParams(cmd); return cmd; } private void AppendInsertUpdateParams(IDbCommand cmd) { IDbDataParameter[] prm = new IDbDataParameter[6]; for(int j = 0; j < 6 ; j++) { prm[j] = cmd.CreateParameter(); prm[j].ParameterName = driver.FormatNameForParameter("iup" + j.ToString()); cmd.Parameters.Add(prm[j]); } int i = 0; prm[i].DbType = DbType.String; prm[i].Size = 255; i++; prm[i].DbType = DbType.String; prm[i].Size = 200; i++; prm[i].DbType = DbType.Int32; i++; prm[i].DbType = DbType.DateTime; i++; prm[i].DbType = DbType.Int64; i++; prm[i].DbType = DbType.Int64; i++; } } } Index: NHibernate.Test-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHibernate.Test-1.1.csproj,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** NHibernate.Test-1.1.csproj 19 May 2004 12:49:53 -0000 1.22 --- NHibernate.Test-1.1.csproj 25 May 2004 17:21:45 -0000 1.23 *************** *** 193,196 **** --- 193,201 ---- /> <File + RelPath = "PerformanceTest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "SimpleComponentTest.cs" SubType = "Code" |
From: Michael D. <mik...@us...> - 2004-05-25 17:15:53
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11467/NHibernate/Impl Modified Files: PreparerImpl.cs Log Message: changed a foreach loop to a for loop. Index: PreparerImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/PreparerImpl.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PreparerImpl.cs 13 Apr 2004 13:02:00 -0000 1.3 --- PreparerImpl.cs 25 May 2004 17:15:44 -0000 1.4 *************** *** 89,94 **** StringBuilder builder = new StringBuilder(sqlString.SqlParts.Length * 15); ! foreach(object part in sqlString.SqlParts) { Parameter parameter = part as Parameter; --- 89,95 ---- StringBuilder builder = new StringBuilder(sqlString.SqlParts.Length * 15); ! for(int i = 0; i < sqlString.SqlParts.Length; i++) { + object part = sqlString.SqlParts[i]; Parameter parameter = part as Parameter; *************** *** 122,125 **** --- 123,127 ---- /// <returns>A IDbCommand with a valid Transaction property.</returns> private IDbCommand JoinTransaction(IDbCommand command) { + IDbTransaction sessionAdoTrx = null; |
From: Michael D. <mik...@us...> - 2004-05-25 17:14:46
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10900/NHibernate/SqlCommand Modified Files: Parameter.cs ParameterLength.cs ParameterPrecisionScale.cs SqlString.cs Log Message: added an override to GetHashCode Index: Parameter.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/Parameter.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Parameter.cs 13 Apr 2004 13:01:59 -0000 1.4 --- Parameter.cs 25 May 2004 17:14:27 -0000 1.5 *************** *** 140,144 **** } ! public override bool Equals(object obj) { Parameter rhs; --- 140,147 ---- } ! #region object Members ! ! public override bool Equals(object obj) ! { Parameter rhs; *************** *** 157,165 **** } - // override to prevent compiler warning CS0659 - // TODO: this may need a different impl public override int GetHashCode() { ! return base.GetHashCode (); } --- 160,177 ---- } public override int GetHashCode() { ! int hashCode; ! ! unchecked ! { ! hashCode = dbType.GetHashCode() + name.GetHashCode(); ! if(tableAlias!=null) ! { ! hashCode += tableAlias.GetHashCode(); ! } ! ! return hashCode; ! } } *************** *** 171,178 **** } ! #region ICloneable Members ! public Parameter Clone() { Parameter paramClone = (Parameter)this.MemberwiseClone(); --- 183,192 ---- } ! #endregion ! #region ICloneable Members ! public Parameter Clone() ! { Parameter paramClone = (Parameter)this.MemberwiseClone(); Index: SqlString.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/SqlString.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SqlString.cs 20 Mar 2004 22:28:50 -0000 1.5 --- SqlString.cs 25 May 2004 17:14:27 -0000 1.6 *************** *** 14,18 **** public class SqlString : ICloneable { - readonly object[] sqlParts; --- 14,17 ---- *************** *** 50,53 **** --- 49,90 ---- } + #region object Members + + + public override bool Equals(object obj) + { + SqlString rhs; + + // Step1: Perform an equals test + if(obj==this) return true; + + // Step 2: Instance of check + rhs = obj as SqlString; + if(rhs==null) return false; + + //Step 3: Check each important field + for(int i = 0; i < sqlParts.Length; i++) + { + if( this.sqlParts[i].Equals(rhs.SqlParts[i]) == false ) return false; + } + + return true; + } + + public override int GetHashCode() + { + int hashCode = 0; + + unchecked + { + for(int i = 0; i < sqlParts.Length; i++) + { + hashCode += sqlParts[i].GetHashCode(); + } + } + + return hashCode; + } + /// <summary> /// Returns the SqlString in a string where it looks like *************** *** 62,68 **** { StringBuilder builder = new StringBuilder(sqlParts.Length * 15); ! foreach(object part in sqlParts) { ! builder.Append(part.ToString()); } --- 99,106 ---- { StringBuilder builder = new StringBuilder(sqlParts.Length * 15); ! ! for(int i = 0; i < sqlParts.Length; i++) { ! builder.Append(sqlParts[i].ToString()); } *************** *** 70,77 **** } #region ICloneable Members ! public SqlString Clone() { object[] clonedParts = new object[sqlParts.Length]; Parameter param; --- 108,117 ---- } + #endregion #region ICloneable Members ! public SqlString Clone() ! { object[] clonedParts = new object[sqlParts.Length]; Parameter param; Index: ParameterLength.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/ParameterLength.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ParameterLength.cs 13 Apr 2004 13:01:59 -0000 1.3 --- ParameterLength.cs 25 May 2004 17:14:27 -0000 1.4 *************** *** 36,41 **** return param; } ! ! public override bool Equals(object obj) { if(base.Equals(obj)) { ParameterLength rhs; --- 36,44 ---- return param; } ! ! #region object Members ! ! public override bool Equals(object obj) ! { if(base.Equals(obj)) { ParameterLength rhs; *************** *** 53,63 **** } - // override to prevent compiler warning CS0659 - // TODO: this may need a different impl public override int GetHashCode() { ! return base.GetHashCode (); } } --- 56,68 ---- } public override int GetHashCode() { ! unchecked ! { ! return base.GetHashCode() + length.GetHashCode(); ! } } + #endregion } Index: ParameterPrecisionScale.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/ParameterPrecisionScale.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ParameterPrecisionScale.cs 13 Apr 2004 13:01:59 -0000 1.3 --- ParameterPrecisionScale.cs 25 May 2004 17:14:27 -0000 1.4 *************** *** 45,49 **** } ! public override bool Equals(object obj) { if(base.Equals(obj)) { ParameterPrecisionScale rhs; --- 45,52 ---- } ! #region object Members ! ! public override bool Equals(object obj) ! { if(base.Equals(obj)) { ParameterPrecisionScale rhs; *************** *** 54,59 **** //Step 3: Check each important field ! return this.Precision.Equals(rhs.Precision) ! && this.Scale.Equals(rhs.Scale); } else { --- 57,62 ---- //Step 3: Check each important field ! return this.Precision==rhs.Precision ! && this.Scale==rhs.Scale; } else { *************** *** 62,72 **** } - // override to prevent compiler warning CS0659 - // TODO: this may need a different impl public override int GetHashCode() { ! return base.GetHashCode (); } } --- 65,77 ---- } public override int GetHashCode() { ! unchecked ! { ! return base.GetHashCode() + precision.GetHashCode() + scale.GetHashCode(); ! } } + #endregion } |
From: Michael D. <mik...@us...> - 2004-05-24 20:52:57
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16202/NHibernate/Impl Modified Files: ScheduledUpdate.cs SessionImpl.cs Log Message: Fixed problems with an unneeded Update being issued before a Delete. Index: SessionImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/SessionImpl.cs,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** SessionImpl.cs 20 May 2004 20:59:19 -0000 1.26 --- SessionImpl.cs 24 May 2004 20:52:47 -0000 1.27 *************** *** 2279,2302 **** } ! private void Execute() { ! log.Debug("executing flush"); ! try { ExecuteAll( insertions ); - ExecuteAll( updates ); - ExecuteAll( collectionRemovals ); - ExecuteAll( collectionUpdates ); - ExecuteAll( collectionCreations ); - ExecuteAll( deletions ); - - // have to do this here because ICollection does not have a remove method insertions.Clear(); updates.Clear(); collectionRemovals.Clear(); collectionUpdates.Clear(); collectionCreations.Clear(); deletions.Clear(); ! } catch (Exception e) { throw new ADOException("could not synchronize database state with session", e); } --- 2279,2310 ---- } ! private void Execute() ! { log.Debug("executing flush"); ! try ! { ! // see the comments in ExecuteAll for why the Clear() has been added here... ExecuteAll( insertions ); insertions.Clear(); + + ExecuteAll( updates ); updates.Clear(); + + ExecuteAll( collectionRemovals ); collectionRemovals.Clear(); + + ExecuteAll( collectionUpdates ); collectionUpdates.Clear(); + + ExecuteAll( collectionCreations ); collectionCreations.Clear(); + + ExecuteAll( deletions ); deletions.Clear(); ! ! } ! catch (Exception e) ! { throw new ADOException("could not synchronize database state with session", e); } *************** *** 2331,2337 **** executions.Add(e); e.Execute(); ! //TODO: h2.0.3 has this but not NH // iter.remove -> coll.Remove()?? } if ( batcher!=null ) batcher.ExecuteBatch(); } --- 2339,2347 ---- executions.Add(e); e.Execute(); ! // this was moved to Execute because there is no way to ! // remove an item from an enumerator... // iter.remove -> coll.Remove()?? } + if ( batcher!=null ) batcher.ExecuteBatch(); } Index: ScheduledUpdate.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/ScheduledUpdate.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ScheduledUpdate.cs 28 Mar 2004 06:08:10 -0000 1.3 --- ScheduledUpdate.cs 24 May 2004 20:52:47 -0000 1.4 *************** *** 22,26 **** } ! public ScheduledUpdate(object id, object[] fields, int[] dirtyProperties, object lastVersion, object nextVersion, object instance, object[] updateState, IClassPersister persister, ISessionImplementor session) : base(session, id, instance, persister) { this.fields = fields; --- 22,26 ---- } ! public ScheduledUpdate(object id, object[] fields, int[] dirtyProperties, object lastVersion, object nextVersion, object instance, object[] updatedState, IClassPersister persister, ISessionImplementor session) : base(session, id, instance, persister) { this.fields = fields; |