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-04-08 21:24:44
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13890/Mapping Modified Files: Set.cs Log Message: minor mods with SortedSet - removed a ctor and made property Comparer read only because SortedList does not have a way to change the Comparer after being initialized. Index: Set.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/Set.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Set.cs 10 Feb 2004 18:35:30 -0000 1.2 --- Set.cs 8 Apr 2004 21:11:32 -0000 1.3 *************** *** 39,43 **** public override System.Type WrapperClass { get { - //TODO: modify when added implementation of sorted set return IsSorted ? typeof(NCollection.SortedSet) : --- 39,42 ---- |
From: Peter S. <sz...@us...> - 2004-04-08 17:35:19
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29550/NHibernate.DomainModel Modified Files: Baz.hbm.xml NHibernate.DomainModel-1.1.csproj Added Files: Bar.cs BarProxy.cs ComponentCollection.cs NestingComponent.cs ReverseComparator.cs StringComparator.cs Log Message: Still some entities. --- NEW FILE: Bar.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { public class Bar : Abstract, BarProxy { /// <summary> /// Holds the _x /// </summary> private int _x; /// <summary> /// Gets or sets the _x /// </summary> public new int x { get { return _x; } set { _x = value; } } /// <summary> /// Holds the _barString /// </summary> private string _barString; /// <summary> /// Gets or sets the _barString /// </summary> 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 /// </summary> public FooComponent barComponent { get { return _barComponent; } set { _barComponent = value; } } /// <summary> /// Holds the _baz /// </summary> private Baz _baz; /// <summary> /// Gets or sets the _baz /// </summary> public Baz baz { get { return _baz; } set { _baz = value; } } /// <summary> /// Holds the _name /// </summary> private string _name = "bar"; /// <summary> /// Gets or sets the _name /// </summary> public string name { get { return _name; } set { _name = value; } } /// <summary> /// Holds the _object /// </summary> private object _object; /// <summary> /// Gets or sets the _object /// </summary> public object @object { get { return _object; } set { _object = value; } } } } Index: Baz.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Baz.hbm.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Baz.hbm.xml 8 Apr 2004 15:55:46 -0000 1.3 --- Baz.hbm.xml 8 Apr 2004 17:22:08 -0000 1.4 *************** *** 23,27 **** </key> <index column="i"/> ! <element column="j" type="int"/> </primitive-array> <set name="fooSet" lazy="true" order-by="string_"> --- 23,27 ---- </key> <index column="i"/> ! <element column="j" type="Int32"/> </primitive-array> <set name="fooSet" lazy="true" order-by="string_"> *************** *** 53,57 **** </key> <index column="j"/> ! <element column="the_time" type="time"/> </array> <bag name="bag" order-by="`name!`" table="`$%^^b'a'g`"> --- 53,57 ---- </key> <index column="j"/> ! <element column="the_time" type="Time"/> </array> <bag name="bag" order-by="`name!`" table="`$%^^b'a'g`"> --- NEW FILE: ReverseComparator.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { public class ReverseComparator : IComparer { #region IComparer Members public int Compare(object x, object y) { return - ((IComparable)x).CompareTo(y); } #endregion } } --- NEW FILE: NestingComponent.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { public class NestingComponent { /// <summary> /// Holds the _nested /// </summary> private ComponentCollection _nested; /// <summary> /// Gets or sets the _nested /// </summary> public ComponentCollection nested { get { return _nested; } set { _nested = value; } } } } Index: NHibernate.DomainModel-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel-1.1.csproj,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NHibernate.DomainModel-1.1.csproj 8 Apr 2004 16:44:19 -0000 1.7 --- NHibernate.DomainModel-1.1.csproj 8 Apr 2004 17:22:08 -0000 1.8 *************** *** 128,131 **** --- 128,141 ---- /> <File + RelPath = "Bar.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "BarProxy.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "BasicClass.cs" SubType = "Code" *************** *** 174,177 **** --- 184,192 ---- /> <File + RelPath = "ComponentCollection.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "CompositeElement.cs" SubType = "Code" *************** *** 292,295 **** --- 307,315 ---- /> <File + RelPath = "NestingComponent.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "NHibernate.DomainModel.build" BuildAction = "None" *************** *** 332,335 **** --- 352,360 ---- /> <File + RelPath = "ReverseComparator.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "SexType.cs" SubType = "Code" *************** *** 364,367 **** --- 389,397 ---- /> <File + RelPath = "StringComparator.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Stuff.hbm.xml" BuildAction = "EmbeddedResource" --- NEW FILE: BarProxy.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { public interface BarProxy : AbstractProxy { Baz baz { get; set; } FooComponent barComponent { get; set; } string barString { get; } object @object { get; set; } } } --- NEW FILE: StringComparator.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { public class StringComparator : IComparer { #region IComparer Members public int Compare(object x, object y) { return ( (String) x ).ToLower().CompareTo( ( (String) y ).ToLower() ); } #endregion } } --- NEW FILE: ComponentCollection.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { public class ComponentCollection { /// <summary> /// Holds the _foos /// </summary> private IList _foos; /// <summary> /// Gets or sets the _foos /// </summary> public IList foos { get { return _foos; } set { _foos = value; } } /// <summary> /// Holds the _str /// </summary> private string _str; /// <summary> /// Gets or sets the _str /// </summary> public string str { get { return _str; } set { _str = value; } } /// <summary> /// Holds the _floats /// </summary> private IList _floats; /// <summary> /// Gets or sets the _floats /// </summary> public IList floats { get { return _floats; } set { _floats = value; } } } } |
From: Peter S. <sz...@us...> - 2004-04-08 16:57:30
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21187/NHibernate.DomainModel Modified Files: NHibernate.DomainModel-1.1.csproj Added Files: Abstract.cs AbstractProxy.cs Trivial.cs Log Message: Still adding testentities. --- NEW FILE: Abstract.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { public abstract class Abstract : Foo, AbstractProxy { /// <summary> /// Holds the _time /// </summary> private DateTime _time; /// <summary> /// Gets or sets the _time /// </summary> public DateTime time { get { return _time; } set { _time = value; } } /// <summary> /// Holds the _abstract /// </summary> private IList _abstracts; /// <summary> /// Gets or sets the _abstract /// </summary> public IList abstracts { get { return _abstracts; } set { _abstracts = value; } } } } --- NEW FILE: Trivial.cs --- using System; namespace NHibernate.DomainModel { public class Trivial : Foo { } } Index: NHibernate.DomainModel-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel-1.1.csproj,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** NHibernate.DomainModel-1.1.csproj 8 Apr 2004 14:59:32 -0000 1.6 --- NHibernate.DomainModel-1.1.csproj 8 Apr 2004 16:44:19 -0000 1.7 *************** *** 103,106 **** --- 103,116 ---- /> <File + RelPath = "Abstract.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "AbstractProxy.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "AssemblyInfo.cs" SubType = "Code" *************** *** 376,379 **** --- 386,394 ---- /> <File + RelPath = "Trivial.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "UnsavedType.cs" SubType = "Code" --- NEW FILE: AbstractProxy.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { public interface AbstractProxy : FooProxy { IList abstracts { get; set; } DateTime time { get; set; } } } |
From: Peter S. <sz...@us...> - 2004-04-08 16:50:53
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19618/NHibernate.DomainModel Modified Files: Foo.cs FooBar.hbm.xml FooComponent.cs Log Message: Test is evolving... Index: FooBar.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FooBar.hbm.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FooBar.hbm.xml 8 Apr 2004 15:55:47 -0000 1.3 --- FooBar.hbm.xml 8 Apr 2004 16:37:39 -0000 1.4 *************** *** 55,66 **** <property name="zero" column="zero_"/> <property name="int" column="int_"/> ! <property name="String"> ! <column name="String_" length="48" index="fbstridx"/> </property> <property name="byte" column="byte_"/> ! <property name="yesno" type="yes_no"/> ! <property name="blob" type="NHibernate.DomainModel.Foo$Struct, NHibernate.DomainModel" column="blobb_"/> ! <property name="nullBlob" type="serializable"/> ! <property name="status" column="`status_@###`"/> <property name="binary" column="bin_"/> <property name="locale" column="`localeayzabc123!@#$`"/> --- 55,66 ---- <property name="zero" column="zero_"/> <property name="int" column="int_"/> ! <property name="string"> ! <column name="string_" length="48" index="fbstridx"/> </property> <property name="byte" column="byte_"/> ! <property name="yesno" /> ! <property name="blob" type="NHibernate.DomainModel.Foo+Struct, NHibernate.DomainModel" column="blobb_"/> ! <property name="nullBlob" type="System.Object"/> ! <property name="status" column="`status_@###`" type="NHibernate.DomainModel.FooStatus, NHibernate.DomainModel"/> <property name="binary" column="bin_"/> <property name="locale" column="`localeayzabc123!@#$`"/> *************** *** 74,78 **** <many-to-one name="dependent" class="NHibernate.DomainModel.Fee, NHibernate.DomainModel" cascade="all" not-null="true"/> <component name="component"> ! <property name="count" column="count_" type="int" not-null="true"/> <property name="name"> <column name="name_" length="32" not-null="true"/> --- 74,78 ---- <many-to-one name="dependent" class="NHibernate.DomainModel.Fee, NHibernate.DomainModel" cascade="all" not-null="true"/> <component name="component"> ! <property name="count" column="count_" type="Int32" not-null="true"/> <property name="name"> <column name="name_" length="32" not-null="true"/> *************** *** 86,90 **** <key column="foo_id"/> <index column="i"/> ! <element column="date_" type="DateTime"/> </array> <many-to-one name="fee" column="fee_sub" cascade="all" class="NHibernate.DomainModel.Fee, NHibernate.DomainModel" outer-join="false"/> --- 86,90 ---- <key column="foo_id"/> <index column="i"/> ! <element column="date_" type="Time"/> </array> <many-to-one name="fee" column="fee_sub" cascade="all" class="NHibernate.DomainModel.Fee, NHibernate.DomainModel" outer-join="false"/> Index: FooComponent.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FooComponent.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FooComponent.cs 8 Apr 2004 14:59:32 -0000 1.1 --- FooComponent.cs 8 Apr 2004 16:37:39 -0000 1.2 *************** *** 35,45 **** private Int32 _count; ! private DateTime[] importantDates; ! private FooComponent subcomponent; ! private Fee fee = new Fee(); ! private GlarchProxy glarch; ! private FooProxy parent; ! private Baz baz; #endregion --- 35,45 ---- private Int32 _count; ! private DateTime[] _importantDates; ! private FooComponent _subcomponent; ! private Fee _fee = new Fee(); ! private GlarchProxy _glarch; ! private FooProxy _parent; ! private Baz _baz; #endregion *************** *** 112,138 **** } } ! public DateTime[] ImportantDates { get { ! return importantDates; } set { ! this.importantDates = value; } } ! public FooComponent Subcomponent { get { ! return subcomponent; } set { ! this.subcomponent = value; } } ! private String Null { get --- 112,138 ---- } } ! public DateTime[] importantDates { get { ! return _importantDates; } set { ! this._importantDates = value; } } ! public FooComponent subcomponent { get { ! return _subcomponent; } set { ! this._subcomponent = value; } } ! private String @null { get *************** *** 146,196 **** } } ! public Fee Fee { get { ! return fee; } set { ! this.fee = value; } } ! public GlarchProxy Glarch { get { ! return glarch; } set { ! this.glarch = value; } } ! public FooProxy Parent { get { ! return parent; } set { ! if (parent==null) throw new ArgumentNullException("null parent set"); ! this.parent = value; } } ! public Baz Baz { get { ! return baz; } set { ! this.baz = value; } } --- 146,196 ---- } } ! public Fee fee { get { ! return _fee; } set { ! this._fee = value; } } ! public GlarchProxy glarch { get { ! return _glarch; } set { ! this._glarch = value; } } ! public FooProxy parent { get { ! return _parent; } set { ! if (value==null) throw new ArgumentNullException("null parent set"); ! this._parent = value; } } ! public Baz baz { get { ! return _baz; } set { ! this._baz = value; } } *************** *** 213,221 **** String result = "FooComponent: " + name + "=" + count; result+="; dates=["; ! if ( importantDates!=null) { ! for ( int i=0; i<importantDates.Length; i++ ) { ! result+=(i==0 ?"":", ") + importantDates[i]; } } --- 213,221 ---- String result = "FooComponent: " + name + "=" + count; result+="; dates=["; ! if ( _importantDates!=null) { ! for ( int i=0; i<_importantDates.Length; i++ ) { ! result+=(i==0 ?"":", ") + _importantDates[i]; } } Index: Foo.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Foo.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Foo.cs 8 Apr 2004 15:04:30 -0000 1.2 --- Foo.cs 8 Apr 2004 16:37:39 -0000 1.3 *************** *** 686,690 **** }; component = new FooComponent("foo", 12, new DateTime[] { _date, _timestamp, DateTime.MinValue, new DateTime() }, new FooComponent("bar", 666, new DateTime[] { new DateTime(123456L), DateTime.MinValue }, null ) ); ! component.Glarch = new Glarch(); dependent = new Fee(); dependent.Fi = "belongs to foo # " + key; --- 686,690 ---- }; component = new FooComponent("foo", 12, new DateTime[] { _date, _timestamp, DateTime.MinValue, new DateTime() }, new FooComponent("bar", 666, new DateTime[] { new DateTime(123456L), DateTime.MinValue }, null ) ); ! component.glarch = new Glarch(); dependent = new Fee(); dependent.Fi = "belongs to foo # " + key; |
From: Peter S. <sz...@us...> - 2004-04-08 16:50:53
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19618/NHibernate.Test Modified Files: FooBarTest.cs Log Message: Test is evolving... Index: FooBarTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FooBarTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FooBarTest.cs 8 Apr 2004 15:55:47 -0000 1.2 --- FooBarTest.cs 8 Apr 2004 16:37:39 -0000 1.3 *************** *** 14,39 **** { ExportSchema(new string[] { "FooBar.hbm.xml", ! "Baz.hbm.xml", ! "Qux.hbm.xml", ! "Glarch.hbm.xml", ! "Simple.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", ! "XY.hbm.xml"}); } [Test] ! [Ignore("Maps haven't been converted yet")] public void FetchInitializedCollection() { --- 14,39 ---- { ExportSchema(new string[] { "FooBar.hbm.xml", ! "Baz.hbm.xml" ! // "Qux.hbm.xml", ! // "Glarch.hbm.xml", ! // "Simple.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", ! // "XY.hbm.xml"}); ! }); } [Test] ! //[Ignore("Maps haven't been converted yet")] public void FetchInitializedCollection() { |
From: Peter S. <sz...@us...> - 2004-04-08 16:08:57
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9574/NHibernate.Test Modified Files: FooBarTest.cs Log Message: CharacterType changed to CharType (System.Character doesn't exists, but System.Char does) Index: FooBarTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FooBarTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FooBarTest.cs 6 Apr 2004 12:56:39 -0000 1.1 --- FooBarTest.cs 8 Apr 2004 15:55:47 -0000 1.2 *************** *** 17,20 **** --- 17,21 ---- "Qux.hbm.xml", "Glarch.hbm.xml", + "Simple.hbm.xml", "Fum.hbm.xml", "Fumm.hbm.xml", *************** *** 38,64 **** { ISession s = sessions.OpenSession(); ! /* Baz baz = new Baz(); ! ICollection fooBag = new ArrayList(); ! fooBag.add( new Foo() ); ! fooBag.add( new Foo() ); ! baz.setFooBag(fooBag); ! s.save(baz); ! fooBag = baz.getFooBag(); s.Find("from Baz baz left join fetch baz.fooBag"); Assert.IsTrue( NHibernate.IsInitialized(fooBag) ); ! Assert.IsTrue( fooBag==baz.getFooBag() ); ! Assert.IsTrue( baz.getFooBag().size()==2 ); s.Close(); ! ! s = sessions.OpenSession(); ! baz = (Baz) s.load( typeof(Baz), baz.getCode() ); ! Object bag = baz.getFooBag(); ! Assert.IsFalse( NHibernate.IsInitialized(bag) ); ! s.Find("from Baz baz left join fetch baz.fooBag"); ! Assert.IsFalse( NHibernate.IsInitialized(bag) ); ! Assert.IsTrue( bag==baz.getFooBag() ); ! Assert.IsTrue( baz.getFooBag().size()==2 ); ! s.Delete(baz); ! s.Flush();*/ s.Close(); } --- 39,66 ---- { ISession s = sessions.OpenSession(); ! Baz baz = new Baz(); ! IList fooBag = new ArrayList(); ! 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 baz.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.getCode() ); ! // Object bag = baz.getFooBag(); ! // Assert.IsFalse( NHibernate.IsInitialized(bag) ); ! // s.Find("from Baz baz left join fetch baz.fooBag"); ! // Assert.IsFalse( NHibernate.IsInitialized(bag) ); ! // Assert.IsTrue( bag==baz.getFooBag() ); ! // Assert.IsTrue( baz.getFooBag().size()==2 ); ! // s.Delete(baz); ! // s.Flush(); ! s.Close(); } |
From: Peter S. <sz...@us...> - 2004-04-08 16:08:57
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9574/NHibernate.DomainModel Modified Files: BasicClass.hbm.xml Baz.hbm.xml FooBar.hbm.xml Log Message: CharacterType changed to CharType (System.Character doesn't exists, but System.Char does) Index: BasicClass.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/BasicClass.hbm.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BasicClass.hbm.xml 9 Mar 2004 16:36:48 -0000 1.3 --- BasicClass.hbm.xml 8 Apr 2004 15:55:46 -0000 1.4 *************** *** 12,16 **** <property name="BooleanProperty" type="Boolean" /> <property name="ByteProperty" type="Byte" /> ! <property name="CharacterProperty" type="Character" /> <property name="ClassProperty" type="Type" /> <property name="CultureInfoProperty" type="CultureInfo" /> --- 12,16 ---- <property name="BooleanProperty" type="Boolean" /> <property name="ByteProperty" type="Byte" /> ! <property name="CharacterProperty" type="Char" /> <property name="ClassProperty" type="Type" /> <property name="CultureInfoProperty" type="CultureInfo" /> Index: FooBar.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FooBar.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FooBar.hbm.xml 8 Apr 2004 14:59:32 -0000 1.2 --- FooBar.hbm.xml 8 Apr 2004 15:55:47 -0000 1.3 *************** *** 15,19 **** <jcs-cache usage="nonstrict-read-write"/> ! <id name="key" type="string"> <column name="`foo_id`" length="36"/> <generator class="uuid.hex"> --- 15,19 ---- <jcs-cache usage="nonstrict-read-write"/> ! <id name="key" type="String"> <column name="`foo_id`" length="36"/> <generator class="uuid.hex"> *************** *** 21,25 **** </generator> </id> ! <discriminator column="`$foo_subclass^`" type="character"/> <version name="version"/> <!--<version name="versionCalendar" type="calendar"/>--> --- 21,25 ---- </generator> </id> ! <discriminator column="`$foo_subclass^`" type="Char"/> <version name="version"/> <!--<version name="versionCalendar" type="calendar"/>--> *************** *** 43,51 **** <key column="id"/> <index column="i"/> ! <element column="byte_" type="byte"/> </primitive-array> ! <property name="date" type="date" column="date_"/> ! <property name="timestamp" type="timestamp" column="timestamp_"/> <property name="boolean" column="boolean_"/> <property name="bool" column="bool_"/> --- 43,51 ---- <key column="id"/> <index column="i"/> ! <element column="byte_" type="Byte"/> </primitive-array> ! <property name="date" type="DateTime" column="date_"/> ! <property name="timestamp" type="Timestamp" column="timestamp_"/> <property name="boolean" column="boolean_"/> <property name="bool" column="bool_"/> *************** *** 55,60 **** <property name="zero" column="zero_"/> <property name="int" column="int_"/> ! <property name="string"> ! <column name="string_" length="48" index="fbstridx"/> </property> <property name="byte" column="byte_"/> --- 55,60 ---- <property name="zero" column="zero_"/> <property name="int" column="int_"/> ! <property name="String"> ! <column name="String_" length="48" index="fbstridx"/> </property> <property name="byte" column="byte_"/> *************** *** 86,90 **** <key column="foo_id"/> <index column="i"/> ! <element column="date_" type="time"/> </array> <many-to-one name="fee" column="fee_sub" cascade="all" class="NHibernate.DomainModel.Fee, NHibernate.DomainModel" outer-join="false"/> --- 86,90 ---- <key column="foo_id"/> <index column="i"/> ! <element column="date_" type="DateTime"/> </array> <many-to-one name="fee" column="fee_sub" cascade="all" class="NHibernate.DomainModel.Fee, NHibernate.DomainModel" outer-join="false"/> *************** *** 93,97 **** <key column="foo_id"/> <index column="i"/> ! <element column="date_" type="date"/> </array> </component> --- 93,97 ---- <key column="foo_id"/> <index column="i"/> ! <element column="date_" type="DateTime"/> </array> </component> *************** *** 118,122 **** <many-to-one name="baz"/> <property name="barString"> ! <column name="bar_string" length="24"/> </property> <property name="name" column="name_name"/> --- 118,122 ---- <many-to-one name="baz"/> <property name="barString"> ! <column name="bar_String" length="24"/> </property> <property name="name" column="name_name"/> *************** *** 128,132 **** <key column="id" /> <index column="i"/> ! <element column="date_" type="date"/> </array> </component> --- 128,132 ---- <key column="id" /> <index column="i"/> ! <element column="date_" type="DateTime"/> </array> </component> Index: Baz.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Baz.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Baz.hbm.xml 8 Apr 2004 14:59:32 -0000 1.2 --- Baz.hbm.xml 8 Apr 2004 15:55:46 -0000 1.3 *************** *** 172,176 **** <map name="topGlarchez"> <key column="idtopglarch" /> ! <index column="mapkey" type="character"/> <one-to-many class = "NHibernate.DomainModel.Glarch, NHibernate.DomainModel"/> </map> --- 172,176 ---- <map name="topGlarchez"> <key column="idtopglarch" /> ! <index column="mapkey" type="Char"/> <one-to-many class = "NHibernate.DomainModel.Glarch, NHibernate.DomainModel"/> </map> |
From: Peter S. <sz...@us...> - 2004-04-08 16:08:56
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9574/NHibernate Modified Files: NHibernate-1.1.csproj NHibernate.cs nhibernate-mapping-2.0.xsd Log Message: CharacterType changed to CharType (System.Character doesn't exists, but System.Char does) Index: NHibernate-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/NHibernate-1.1.csproj,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** NHibernate-1.1.csproj 7 Apr 2004 17:13:38 -0000 1.15 --- NHibernate-1.1.csproj 8 Apr 2004 15:55:45 -0000 1.16 *************** *** 1569,1578 **** /> <File ! RelPath = "Type\CharacterType.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Type\CharBooleanType.cs" SubType = "Code" BuildAction = "Compile" --- 1569,1578 ---- /> <File ! RelPath = "Type\CharBooleanType.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Type\CharType.cs" SubType = "Code" BuildAction = "Compile" Index: NHibernate.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/NHibernate.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** NHibernate.cs 18 Mar 2004 19:05:41 -0000 1.13 --- NHibernate.cs 8 Apr 2004 15:55:45 -0000 1.14 *************** *** 33,37 **** /// NHibernate character type /// </summary> ! public static readonly NullableType Character = TypeFactory.GetCharacterType(); /// <summary> --- 33,37 ---- /// NHibernate character type /// </summary> ! public static readonly NullableType Character = TypeFactory.GetCharType(); /// <summary> Index: nhibernate-mapping-2.0.xsd =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/nhibernate-mapping-2.0.xsd,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nhibernate-mapping-2.0.xsd 9 Mar 2004 16:46:09 -0000 1.2 --- nhibernate-mapping-2.0.xsd 8 Apr 2004 15:55:46 -0000 1.3 *************** *** 245,249 **** <xs:attribute name='name' use='required' /> <xs:attribute name='column' /> ! <xs:attribute name='type' default='integer' /> </xs:complexType> </xs:element> --- 245,249 ---- <xs:attribute name='name' use='required' /> <xs:attribute name='column' /> ! <xs:attribute name='type' default='Int32' /> </xs:complexType> </xs:element> |
From: Peter S. <sz...@us...> - 2004-04-08 16:08:56
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Type In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9574/NHibernate/Type Modified Files: TypeFactory.cs Added Files: CharType.cs Removed Files: CharacterType.cs Log Message: CharacterType changed to CharType (System.Character doesn't exists, but System.Char does) --- CharacterType.cs DELETED --- Index: TypeFactory.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/TypeFactory.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** TypeFactory.cs 1 Apr 2004 14:16:01 -0000 1.22 --- TypeFactory.cs 8 Apr 2004 15:55:46 -0000 1.23 *************** *** 88,92 **** TypeFactory.GetBooleanType(); TypeFactory.GetByteType(); ! TypeFactory.GetCharacterType(); TypeFactory.GetCultureInfoType(); TypeFactory.GetDateTimeType(); --- 88,92 ---- TypeFactory.GetBooleanType(); TypeFactory.GetByteType(); ! TypeFactory.GetCharType(); TypeFactory.GetCultureInfoType(); TypeFactory.GetDateTimeType(); *************** *** 472,482 **** /// </summary> /// <returns></returns> ! public static NullableType GetCharacterType() { ! string key = GetKeyForLengthBased(typeof(CharacterType).FullName, 1); NullableType returnType = (NullableType)typeByTypeOfName[key]; if(returnType==null) { ! returnType = new CharacterType(SqlTypeFactory.GetStringFixedLength(1)); AddToTypeOfName(key, returnType); } --- 472,482 ---- /// </summary> /// <returns></returns> ! public static NullableType GetCharType() { ! string key = GetKeyForLengthBased(typeof(CharType).FullName, 1); NullableType returnType = (NullableType)typeByTypeOfName[key]; if(returnType==null) { ! returnType = new CharType(SqlTypeFactory.GetStringFixedLength(1)); AddToTypeOfName(key, returnType); } --- NEW FILE: CharType.cs --- using System; using System.Data; using NHibernate.Sql; using NHibernate.SqlTypes; namespace NHibernate.Type { /// <summary> /// Summary description for CharacterType. /// </summary> public class CharType : PrimitiveType , IDiscriminatorType { internal CharType(StringFixedLengthSqlType sqlType) : base(sqlType) { } public override object Get(IDataReader rs, int index) { string str = rs.GetString(index); if (str==null) { return null; } else { return str[0]; } } public override object Get(IDataReader rs, string name) { return Get(rs, rs.GetOrdinal(name)); } public override System.Type PrimitiveClass { get { return typeof(char); } } public override System.Type ReturnedClass { get { return typeof(char); } } public override void Set(IDbCommand cmd, object value, int index) { ( (IDataParameter) cmd.Parameters[index] ).Value = (char) value; } public override string Name { get { return "Char"; } } public override string ObjectToSQLString(object value) { return '\'' + value.ToString() + '\''; } public virtual object StringToObject(string xml) { if ( xml.Length != 1 ) throw new MappingException("multiple or zero characters found parsing string"); return xml[0]; } } } |
From: Peter S. <sz...@us...> - 2004-04-08 16:05:09
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Tool/hbm2net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8208/NHibernate/Tool/hbm2net Modified Files: ClassMapping.cs Log Message: Added another valuecheck. Index: ClassMapping.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Tool/hbm2net/ClassMapping.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ClassMapping.cs 6 Apr 2004 10:51:41 -0000 1.10 --- ClassMapping.cs 8 Apr 2004 15:51:57 -0000 1.11 *************** *** 779,787 **** // Collect the keys foreignKeys = new SupportClass.HashSetSupport(); ! foreignKeys.Add(collection["key"].Attributes["column"].Value); for (System.Collections.IEnumerator iter = collection["key"].SelectNodes("urn:column", CodeGenerator.nsmgr).GetEnumerator(); iter.MoveNext(); ) { ! foreignKeys.Add(((Element) iter.Current).Attributes["name"].Value); } --- 779,789 ---- // Collect the keys foreignKeys = new SupportClass.HashSetSupport(); ! if (collection["key"].Attributes["column"] != null) ! foreignKeys.Add(collection["key"].Attributes["column"].Value); for (System.Collections.IEnumerator iter = collection["key"].SelectNodes("urn:column", CodeGenerator.nsmgr).GetEnumerator(); iter.MoveNext(); ) { ! if (((Element) iter.Current).Attributes["name"] != null) ! foreignKeys.Add(((Element) iter.Current).Attributes["name"].Value); } |
From: Peter S. <sz...@us...> - 2004-04-08 15:17:53
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30470/NHibernate.DomainModel Modified Files: Foo.cs Glarch.cs Log Message: Some quick fix on the newly created entities. Index: Glarch.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Glarch.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Glarch.cs 8 Apr 2004 14:59:32 -0000 1.1 --- Glarch.cs 8 Apr 2004 15:04:30 -0000 1.2 *************** *** 16,24 **** get { ! return x; } set { ! this.x = value; } } --- 16,24 ---- get { ! return _x; } set { ! this._x = value; } } *************** *** 32,36 **** set { ! this.version = value; } } --- 32,36 ---- set { ! this._version = value; } } Index: Foo.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Foo.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Foo.cs 8 Apr 2004 14:59:32 -0000 1.1 --- Foo.cs 8 Apr 2004 15:04:30 -0000 1.2 *************** *** 58,66 **** get { ! return component; } set { ! component = value; } } --- 58,66 ---- get { ! return _component; } set { ! _component = value; } } |
From: Peter S. <sz...@us...> - 2004-04-08 15:12:45
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29516/NHibernate.DomainModel Modified Files: Baz.hbm.xml C1.cs FooBar.hbm.xml NHibernate.DomainModel-1.1.csproj Added Files: Baz.cs CompositeElement.cs DoubleStringType.cs Fee.cs Foo.cs FooComponent.cs FooProxy.cs FooStatus.cs Glarch.cs GlarchProxy.cs Multiplicity.cs Qux.cs Sortable.cs Super.cs Log Message: Added a few new entities. --- NEW FILE: Glarch.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { public class Glarch : Super, GlarchProxy, ILifecycle { 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> /// Gets or sets the _next /// </summary> public GlarchProxy next { get { return _next; } set { _next = value; } } /// <summary> /// Holds the _order /// </summary> private short _order; /// <summary> /// Gets or sets the _order /// </summary> public short order { get { return _order; } set { _order = value; } } /// <summary> /// Holds the _strings /// </summary> private IList _strings; /// <summary> /// Gets or sets the _strings /// </summary> public IList strings { get { return _strings; } set { _strings = value; } } /// <summary> /// Holds the _stringSets /// </summary> private IDictionary _stringSets; /// <summary> /// Gets or sets the _stringSets /// </summary> public IDictionary stringSets { get { return _stringSets; } set { _stringSets = value; } } /// <summary> /// Holds the _fooComponents /// </summary> private IList _fooComponents; /// <summary> /// Gets or sets the _fooComponents /// </summary> public IList fooComponents { get { return _fooComponents; } set { _fooComponents = value; } } /// <summary> /// Holds the _proxyArray /// </summary> private GlarchProxy[] _proxyArray; /// <summary> /// Gets or sets the _proxyArray /// </summary> public GlarchProxy[] proxyArray { get { return _proxyArray; } set { _proxyArray = value; } } /// <summary> /// Holds the _proxySet /// </summary> private IList _proxySet; /// <summary> /// Gets or sets the _proxySet /// </summary> public IList proxySet { get { return _proxySet; } set { _proxySet = value; } } public LifecycleVeto OnDelete(ISession s) { return LifecycleVeto.NoVeto; } public void OnLoad(ISession s, object id) { if ( ! ( ( (String) id ).Length==32 ) ) throw new ArgumentException("id problem"); } public LifecycleVeto OnSave(ISession s) { /* DynaClass dc = new BasicDynaClass( "dyna", BasicDynaBean.class, new DynaProperty[] { new DynaProperty("foo", tString.class), new DynaProperty("bar", Integer.class) } ); try { dynaBean = dc.newInstance(); } catch (Exception e) { throw new CallbackException(e); } dynaBean.set("foo", "foo"); dynaBean.set("bar", new Integer(66)); immutable="never changes!"; */ return LifecycleVeto.NoVeto; } public LifecycleVeto OnUpdate(ISession s) { return LifecycleVeto.NoVeto; } /// <summary> /// Holds the _dynaBean /// </summary> private object _dynaBean; /// <summary> /// Gets or sets the _dynaBean /// </summary> public object dynaBean { get { return _dynaBean; } set { _dynaBean = value; } } /// <summary> /// Holds the _immutable /// </summary> private string _immutable; /// <summary> /// Gets or sets the _immutable /// </summary> 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> /// Gets or sets the _multiple /// </summary> public Multiplicity multiple { get { return _multiple; } set { _multiple = value; } } public new string name { get { return base.name; } set { this.name = value; } } } } Index: NHibernate.DomainModel-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel-1.1.csproj,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** NHibernate.DomainModel-1.1.csproj 6 Apr 2004 12:56:38 -0000 1.5 --- NHibernate.DomainModel-1.1.csproj 8 Apr 2004 14:59:32 -0000 1.6 *************** *** 80,83 **** --- 80,88 ---- HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" /> + <Reference + Name = "NHibernate-1.1" + Project = "{0D8B57B0-1310-4EF0-B50C-DD22F37310C7}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> </References> </Build> *************** *** 122,125 **** --- 127,135 ---- /> <File + RelPath = "Baz.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Baz.hbm.xml" BuildAction = "EmbeddedResource" *************** *** 154,157 **** --- 164,172 ---- /> <File + RelPath = "CompositeElement.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "CompositeId.cs" SubType = "Code" *************** *** 168,171 **** --- 183,196 ---- /> <File + RelPath = "DoubleStringType.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Fee.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Fee.hbm.xml" BuildAction = "EmbeddedResource" *************** *** 176,183 **** --- 201,228 ---- /> <File + RelPath = "Foo.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "FooBar.hbm.xml" BuildAction = "EmbeddedResource" /> <File + RelPath = "FooComponent.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "FooProxy.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "FooStatus.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Fum.hbm.xml" BuildAction = "EmbeddedResource" *************** *** 188,195 **** --- 233,250 ---- /> <File + RelPath = "Glarch.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Glarch.hbm.xml" BuildAction = "EmbeddedResource" /> <File + RelPath = "GlarchProxy.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Holder.hbm.xml" BuildAction = "EmbeddedResource" *************** *** 222,225 **** --- 277,285 ---- /> <File + RelPath = "Multiplicity.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "NHibernate.DomainModel.build" BuildAction = "None" *************** *** 253,256 **** --- 313,321 ---- /> <File + RelPath = "Qux.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Qux.hbm.xml" BuildAction = "EmbeddedResource" *************** *** 284,287 **** --- 349,357 ---- /> <File + RelPath = "Sortable.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Stuff.hbm.xml" BuildAction = "EmbeddedResource" *************** *** 292,295 **** --- 362,370 ---- /> <File + RelPath = "Super.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Team.cs" SubType = "Code" Index: C1.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/C1.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** C1.cs 6 Apr 2004 10:51:42 -0000 1.1 --- C1.cs 8 Apr 2004 14:59:32 -0000 1.2 *************** *** 33,37 **** /// Holder for d /// </summary> ! private NHibernate.DomainModel.D _d; #endregion --- 33,37 ---- /// Holder for d /// </summary> ! private D _d; #endregion *************** *** 53,57 **** /// <param name="address">Initial address value</param> /// <param name="d">Initial d value</param> ! public C1(String name, Int32 count, System.Collections.IDictionary map, String address, NHibernate.DomainModel.D d) : base(name, count, map) { --- 53,57 ---- /// <param name="address">Initial address value</param> /// <param name="d">Initial d value</param> ! public C1(String name, Int32 count, System.Collections.IDictionary map, String address, D d) : base(name, count, map) { *************** *** 89,93 **** /// Get/set for d /// </summary> ! public NHibernate.DomainModel.D d { get --- 89,93 ---- /// Get/set for d /// </summary> ! public D d { get --- NEW FILE: Foo.cs --- //------------------------------------------------------------------------------ // <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; namespace NHibernate.DomainModel { /// <summary> /// POJO for Foo /// </summary> /// <remark> /// This class is autogenerated /// </remark> [Serializable] public class Foo : FooProxy, ILifecycle { [Serializable] public class Struct { public string name; public int count; public override bool Equals(object obj) { Struct s = (Struct) obj; return ( s.name==name || s.name.Equals(name) ) && s.count==count; } public override int GetHashCode() { return count; } } #region Fields /// <summary> /// Holder for key /// </summary> private string _key; /// <summary> /// Holds the component /// </summary> private FooComponent _component; /// <summary> /// Gets or sets the component /// </summary> public FooComponent component { get { return component; } set { component = value; } } /// <summary> /// Holder for long /// </summary> private long _long; /// <summary> /// Holder for integer /// </summary> private int _integer; /// <summary> /// Holder for float /// </summary> private float _float; /// <summary> /// Holder for x /// </summary> private String _x; /// <summary> /// Holder for double /// </summary> private double _double; /// <summary> /// Holder for date /// </summary> private DateTime _date; /// <summary> /// Holder for timestamp /// </summary> private DateTime _timestamp; /// <summary> /// Holder for boolean /// </summary> private bool _boolean; /// <summary> /// Holder for bool /// </summary> private bool _bool; /// <summary> /// Holder for null /// </summary> private int _null; /// <summary> /// Holder for short /// </summary> private short _short; /// <summary> /// Holder for char /// </summary> private char _char; /// <summary> /// Holder for zero /// </summary> private float _zero; /// <summary> /// Holder for int /// </summary> private int _int; /// <summary> /// Holder for string /// </summary> private String _string; /// <summary> /// Holder for byte /// </summary> private byte _byte; /// <summary> /// Holder for yesno /// </summary> private bool _yesno; /// <summary> /// Holder for blob /// </summary> private Foo.Struct _blob; /// <summary> /// Holder for nullBlob /// </summary> private object _nullBlob; /// <summary> /// Holder for status /// </summary> private FooStatus _status; /// <summary> /// Holder for binary /// </summary> private byte[] _binary; private byte[] _bytes; /// <summary> /// Holder for locale /// </summary> private String _locale; /// <summary> /// Holder for formula /// </summary> private String _formula; /// <summary> /// Holder for custom /// </summary> private string[] _custom; /// <summary> /// Holder for version /// </summary> private String _version; /// <summary> /// Holder for foo /// </summary> private FooProxy _foo; /// <summary> /// Holder for dependent /// </summary> private Fee _dependent; #endregion #region Constructors /// <summary> /// Default constructor for class Foo /// </summary> public Foo() { } #endregion #region Properties /// <summary> /// Get/set for key /// </summary> public string key { get { return this._key; } set { this._key = value; } } /// <summary> /// Get/set for long /// </summary> public long @long { get { return this._long; } set { this._long = value; } } /// <summary> /// Get/set for integer /// </summary> public int integer { get { return this._integer; } set { this._integer = value; } } /// <summary> /// Get/set for float /// </summary> public float @float { get { return this._float; } set { this._float = value; } } /// <summary> /// Get/set for x /// </summary> public String x { get { return this._x; } set { this._x = value; } } /// <summary> /// Get/set for double /// </summary> public double @double { get { return this._double; } set { this._double = value; } } /// <summary> /// Get/set for date /// </summary> public DateTime date { get { return this._date; } set { this._date = value; } } /// <summary> /// Get/set for timestamp /// </summary> public DateTime timestamp { get { return this._timestamp; } set { this._timestamp = value; } } /// <summary> /// Get/set for boolean /// </summary> public bool boolean { get { return this._boolean; } set { this._boolean = value; } } /// <summary> /// Get/set for bool /// </summary> public bool @bool { get { return this._bool; } set { this._bool = value; } } /// <summary> /// Get/set for null /// </summary> public int @null { get { return this._null; } set { this._null = value; } } /// <summary> /// Get/set for short /// </summary> public short @short { get { return this._short; } set { this._short = value; } } /// <summary> /// Get/set for char /// </summary> public char @char { get { return this._char; } set { this._char = value; } } /// <summary> /// Get/set for zero /// </summary> public float zero { get { return this._zero; } set { this._zero = value; } } /// <summary> /// Get/set for int /// </summary> public int @int { get { return this._int; } set { this._int = value; } } /// <summary> /// Get/set for string /// </summary> public string @string { get { return this._string; } set { this._string = value; } } /// <summary> /// Get/set for byte /// </summary> public byte @byte { get { return this._byte; } set { this._byte = value; } } /// <summary> /// Get/set for yesno /// </summary> public bool yesno { get { return this._yesno; } set { this._yesno = value; } } /// <summary> /// Get/set for blob /// </summary> public Foo.Struct blob { get { return this._blob; } set { this._blob = value; } } /// <summary> /// Get/set for nullBlob /// </summary> public object nullBlob { get { return this._nullBlob; } set { this._nullBlob = value; } } /// <summary> /// Get/set for status /// </summary> public FooStatus status { get { return this._status; } set { this._status = value; } } /// <summary> /// Get/set for binary /// </summary> public byte[] binary { get { return this._binary; } set { this._binary = value; } } public byte[] bytes { get { return this._bytes; } set { this._bytes = value; } } /// <summary> /// Get/set for locale /// </summary> public String locale { get { return this._locale; } set { this._locale = value; } } /// <summary> /// Get/set for formula /// </summary> public String formula { get { return this._formula; } set { this._formula = value; } } /// <summary> /// Get/set for custom /// </summary> public string[] custom { get { return this._custom; } set { this._custom = value; } } /// <summary> /// Get/set for version /// </summary> public String version { get { return this._version; } set { this._version = value; } } /// <summary> /// Get/set for foo /// </summary> public FooProxy foo { get { return this._foo; } set { this._foo = value; } } /// <summary> /// Get/set for dependent /// </summary> public Fee dependent { get { return this._dependent; } set { this._dependent = value; } } #endregion #region ILifecycle Members public LifecycleVeto OnUpdate(ISession s) { return LifecycleVeto.NoVeto; } public void OnLoad(ISession s, object id) { } public LifecycleVeto OnSave(ISession s) { _string = "a string"; _date = new DateTime(123); _timestamp = DateTime.Now; _integer = -666; _long = 696969696969696969L - count++; _short = 42; _float = 6666.66f; //_double = new Double( 1.33e-69 ); // this double is too big for the sap db jdbc driver _double = 1.12e-36; _boolean = true; _byte = 127; _int = 2; _char = '@'; _bytes = System.Text.Encoding.ASCII.GetBytes(_string); Struct ss = new Struct(); ss.name="name"; ss.count = 69; blob = ss; status=FooStatus.ON; binary = System.Text.Encoding.ASCII.GetBytes( _string + "yada yada yada" ); custom = new string[] { "foo", "bar" }; component = new FooComponent("foo", 12, new DateTime[] { _date, _timestamp, DateTime.MinValue, new DateTime() }, new FooComponent("bar", 666, new DateTime[] { new DateTime(123456L), DateTime.MinValue }, null ) ); component.Glarch = new Glarch(); dependent = new Fee(); dependent.Fi = "belongs to foo # " + key; locale = System.Threading.Thread.CurrentThread.CurrentCulture.Name; return LifecycleVeto.NoVeto; } public LifecycleVeto OnDelete(ISession s) { return LifecycleVeto.NoVeto; } #endregion public void disconnect() { if ( _foo!=null) _foo.disconnect(); _foo=null; } public override bool Equals(object obj) { Foo other = (Foo)obj; if ( _bytes!=other._bytes ) { if ( _bytes==null || other._bytes==null ) return false; if ( _bytes.Length!=other._bytes.Length ) return false; for ( int i=0; i< _bytes.Length; i++) { if ( _bytes[i] != other._bytes[i] ) return false; } } return ( this._bool == other._bool ) && ( ( this._boolean == other._boolean ) || ( this._boolean.Equals(other._boolean) ) ) && ( ( this._byte == other._byte ) || ( this._byte.Equals(other._byte) ) ) //&& ( ( this._date == other._date ) || ( this._date.getDate() == other._date.getDate() && this._date.getMonth() == other._date.getMonth() && this._date.getYear() == other._date.getYear() ) ) && ( ( this._double == other._double ) || ( this._double.Equals(other._double) ) ) && ( ( this._float == other._float ) || ( this._float.Equals(other._float) ) ) && ( this._int == other._int ) && ( ( this._integer == other._integer ) || ( this._integer.Equals(other._integer) ) ) && ( ( this._long == other._long ) || ( this._long.Equals(other._long) ) ) && ( this._null == other._null ) && ( ( this._short == other._short ) || ( this._short.Equals(other._short) ) ) && ( ( this._string == other._string) || ( this._string.Equals(other._string) ) ) //&& ( ( this._timestamp==other._timestamp) || ( this._timestamp.getDate() == other._timestamp.getDate() && this._timestamp.getYear() == other._timestamp.getYear() && this._timestamp.getMonth() == other._timestamp.getMonth() ) ) && ( this._zero == other._zero ) && ( ( this._foo == other._foo ) || ( this._foo.key.Equals( other._foo.key ) ) ) && ( ( this.blob == other.blob ) || ( this.blob.Equals(other.blob) ) ) && ( this.yesno == other.yesno ) && ( this.status == other.status ) && ( ( this.binary == other.binary ) || this.binary.Equals(other._binary)) && ( this.key.Equals(other.key) ) && ( this.locale.Equals(other.locale) ) && ( ( this.custom == other.custom ) || ( this.custom[0].Equals(other.custom[0]) && this.custom[1].Equals(other.custom[1]) ) ); } public override int GetHashCode() { return key.GetHashCode() - _string.GetHashCode(); } public FooComponent nullComponent { get { return null; } set { if (value!=null) throw new Exception("Null component"); } } private static int count=0; } } --- NEW FILE: GlarchProxy.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { public interface GlarchProxy { int version { get; set; } int derivedVersion { get; } string name { get; set; } GlarchProxy next { get; set; } short order { get; set; } IList strings { get; set; } object dynaBean { get; set; } IDictionary stringSets { get; set; } IList fooComponents { get; set; } GlarchProxy[] proxyArray { get; set; } IList proxySet { get; set; } Multiplicity multiple { get; set; } object any { get; set; } } } --- NEW FILE: Baz.cs --- //------------------------------------------------------------------------------ // <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; namespace NHibernate.DomainModel { /// <summary> /// POJO for Baz /// </summary> /// <remark> /// This class is autogenerated /// </remark> [Serializable] public class Baz : IComparable { #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.SortedList _stringDateMap; /// <summary> /// Holder for topGlarchez /// </summary> private System.Collections.IDictionary _topGlarchez; /// <summary> /// Holder for cachedMap /// </summary> private System.Collections.SortedList _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.IList _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.IList _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 #region Constructors /// <summary> /// Default constructor for class Baz /// </summary> public Baz() { } #endregion #region Properties /// <summary> /// Get/set for code /// </summary> public String code { get { return this._code; } set { this._code = value; } } /// <summary> /// Get/set for count /// </summary> public Int32 count { get { return this._count; } set { this._count = value; } } /// <summary> /// Get/set for name /// </summary> public String name { get { return this._name; } set { this._name = value; } } /// <summary> /// Get/set for foo /// </summary> public Foo foo { get { return this._foo; } set { this._foo = value; } } /// <summary> /// Get/set for stringList /// </summary> public System.Collections.IList stringList { get { return this._stringList; } set { this._stringList = value; } } /// <summary> /// Get/set for fees /// </summary> public System.Collections.IList fees { get { return this._fees; } set { this._fees = value; } } /// <summary> /// Get/set for customs /// </summary> public System.Collections.IList customs { get { return this._customs; } set { this._customs = value; } } /// <summary> /// Get/set for topComponents /// </summary> public System.Collections.IList topComponents { get { return this._topComponents; } set { this._topComponents = value; } } /// <summary> /// Get/set for fooToGlarch /// </summary> public System.Collections.IDictionary fooToGlarch { get { return this._fooToGlarch; } set { this._fooToGlarch = value; } } /// <summary> /// Get/set for fooComponentToFoo /// </summary> public System.Collections.IDictionary fooComponentToFoo { get { return this._fooComponentToFoo; } set { this._fooComponentToFoo = value; } } /// <summary> /// Get/set for glarchToFoo /// </summary> public System.Collections.IDictionary glarchToFoo { get { return this._glarchToFoo; } set { this._glarchToFoo = value; } } /// <summary> /// Get/set for stringDateMap /// </summary> public System.Collections.SortedList stringDateMap { get { return this._stringDateMap; } set { this._stringDateMap = value; } } /// <summary> /// Get/set for topGlarchez /// </summary> public System.Collections.IDictionary topGlarchez { get { return this._topGlarchez; } set { this._topGlarchez = value; } } /// <summary> /// Get/set for cachedMap /// </summary> public System.Collections.SortedList cachedMap { get { return this._cachedMap; } set { this._cachedMap = value; } } /// <summary> /// Get/set for stringGlarchMap /// </summary> public System.Collections.IDictionary stringGlarchMap { get { return this._stringGlarchMap; } set { this._stringGlarchMap = value; } } /// <summary> /// Get/set for anyToAny /// </summary> public System.Collections.IDictionary anyToAny { get { return this._anyToAny; } set { this._anyToAny = value; } } /// <summary> /// Get/set for fooSet /// </summary> public System.Collections.IDictionary fooSet { get { return this._fooSet; } set { this._fooSet = value; } } /// <summary> /// Get/set for stringSet /// </summary> public System.Collections.IList stringSet { get { return this._stringSet; } set { this._stringSet = value; } } /// <summary> /// Get/set for topFoos /// </summary> public System.Collections.IDictionary topFoos { get { return this._topFoos; } set { this._topFoos = value; } } /// <summary> /// Get/set for cascadingBars /// </summary> public System.Collections.IDictionary cascadingBars { get { return this._cascadingBars; } set { this._cascadingBars = value; } } /// <summary> /// Get/set for cached /// </summary> public System.Collections.IList cached { get { return this._cached; } set { this._cached = value; } } /// <summary> /// Get/set for sortablez /// </summary> public System.Collections.IDictionary sortablez { get { return this._sortablez; } set { this._sortablez = value; } } /// <summary> /// Get/set for bag /// </summary> public System.Collections.IList bag { get { return this._bag; } set { this._bag = value; } } /// <summary> /// Get/set for fooBag /// </summary> public System.Collections.IList fooBag { get { return this._fooBag; } set { this._fooBag = value; } } /// <summary> /// Get/set for bazez /// </summary> public System.Collections.IList bazez { get { return this._bazez; } set { this._bazez = value; } } /// <summary> /// Get/set for idFooBag /// </summary> public System.Collections.IList idFooBag { get { return this._idFooBag; } set { this._idFooBag = value; } } /// <summary> /// Get/set for byteBag /// </summary> public System.Collections.IList byteBag { get { return this._byteBag; } set { this._byteBag = value; } } #endregion public void setDefaults() { stringSet = new ArrayList(); stringSet.Add("foo"); stringSet.Add("bar"); stringSet.Add("baz"); 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); 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(123) }, null) ); topComponents.Add( new FooComponent("bar", 22, new DateTime[] { new DateTime(7), new DateTime(456) }, null) ); topComponents.Add( null ); bag = new ArrayList(); bag.Add("duplicate"); bag.Add("duplicate"); bag.Add("duplicate"); bag.Add("unique"); cached = new ArrayList(); CompositeElement ce = new CompositeElement(); ce.foo = "foo"; ce.bar = "bar"; CompositeElement ce2 = new CompositeElement(); ce2.foo = "fooxxx"; ce2.bar = "barxxx"; cached.Add(ce); cached.Add(ce2); cachedMap = new SortedList(); cachedMap.Add(this, ce); } #region IComparable Members public int CompareTo(object obj) { return ( (Baz) obj ).code.CompareTo(code); } #endregion } } --- NEW FILE: Qux.cs --- using System; using System.Collections; namespace NHibernate.DomainModel { public class Qux : ILifecycle { private ISession session; public Qux() { } public Qux(String s) { stuff=s; } public LifecycleVeto OnSave(ISession session) { created=true; try { foo = new Foo(); session.Save(foo); } catch (Exception e) { throw new CallbackException(e); } foo.@string = "child of a qux"; return LifecycleVeto.NoVeto; } public LifecycleVeto OnDelete(ISession session) { deleted=true; try { session.Delete(foo); } catch (Exception e) { throw new CallbackException(e); } //if (child!=null) session.delete(child); return LifecycleVeto.NoVeto; } public void OnLoad(ISession session, object id) { loaded=true; this.session=session; } public void store() { } /// <summary> /// Holds the _foo /// </summary> private FooProxy _foo; /// <summary> /// Gets or sets the _foo /// </summary> public FooProxy foo { get { return _foo; } set { _foo = value; } } /// <summary> /// Holds the _created /// </summary> private bool _created; /// <summary> /// Gets or sets the _created /// </summary> public bool created { get { return _created; } set { _created = value; } } /// <summary> /// Holds the _deleted /// </summary> private bool _deleted; /// <summary> /// Gets or sets the _deleted /// </summary> public bool deleted { get { return _deleted; } set { _deleted = value; } } /// <summary> /// Holds the _loaded /// </summary> private bool _loaded; /// <summary> /// Gets or sets the _loaded /// </summary> public bool loaded { get { return _loaded; } set { _loaded = value; } } /// <summary> /// Holds the _stored /// </summary> private bool _stored; /// <summary> /// Gets or sets the _stored /// </summary> public bool stored { get { return _stored; } set { _stored = value; } } /// <summary> /// Holds the _key /// </summary> private long _key; /// <summary> /// Gets or sets the _key /// </summary> public long key { get { return _key; } set { _key = value; } } public long TheKey { set { this.key = value; } } /// <summary> /// Holds the _stuff /// </summary> private string _stuff; /// <summary> /// Gets or sets the _stuff /// </summary> public string stuff { get { return _stuff; } set { _stuff = value; } } /// <summary> /// Holds the _fums /// </summary> private IDictionary _fums; /// <summary> /// Gets or sets the _fums /// </summary> public IDictionary fums { get { return _fums; } set { _fums = value; } } /// <summary> /// Holds the _moreFums /// </summary> private IList _moreFums; /// <summary> /// Gets or sets the _moreFums /// </summary> public IList moreFums { get { return _moreFums; } set { _moreFums = value; } } private Qux _child; public Qux child { get { stored=true; this.childKey = child==null ? 0 : child.key; if (childKey!=0 && child==null) child = (Qux) session.Load(typeof(Qux), childKey); return _child; } set { this._child = value; } } /// <summary> /// Holds the _childKey /// </summary> private long _childKey; /// <summary> /// Gets or sets the _childKey /// </summary> public long childKey { get { return _childKey; } set { _childKey = value; } } public LifecycleVeto OnUpdate(ISession s) { return LifecycleVeto.NoVeto; } } } --- NEW FILE: FooStatus.cs --- using System; namespace NHibernate.DomainModel { public enum FooStatus { OFF, ON } } --- NEW FILE: Fee.cs --- using System; namespace NHibernate.DomainModel { [Serializable] public class Fee { public Fee _fee; public Fee anotherFee; public String fi; public String key; public System.Collections.IDictionary fees; private Qux qux; private FooComponent compon; private int count; public Fee() { } public Fee fee { get { return fee; } set { this.fee = value; } } public string Fi { get { return fi; } set { this.fi = value; } } public string Key { get { return key; } set { this.key = value; } } public System.Collections.IDictionary Fees { get { return fees; } set { this.fees = value; } } public Fee AnotherFee { get { return anotherFee; } set { this.anotherFee = value; } } public Qux Qux { get { return qux; } set { this.qux = value; } } public FooComponent Compon { get { return compon; } set { this.compon = value; } } public int Count { get { return count; } set { count = value; } } } } --- NEW FILE: Sortable.cs --- //------------------------------------------------------------------------------ // <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; namespace NHibernate.DomainModel { /// <summary> /// POJO for Sortable /// </summary> /// <remark> /// This class is autogenerated /// </remark> [Serializable] public class Sortable : IComparable { #region Fields /// <summary> /// Holder for id /// </summary> private Int32 _id; /// <summary> /// Holder for name /// </summary> private String _name; #endregion #region Constructors /// <summary> /// Default constructor for class Sortable /// </summary> public Sortable() { } /// <summary> /// Constructor for class Sortable /// </summary> /// <param name="name">Initial name value</param> public Sortable(String name) { this._name = name; } #endregion #region Properties /// <summary> /// Get/set for id /// </summary> public Int32 id { get { return this._id; } set { this._id = value; } } /// <summary> /// Get/set for name /// </summary> public String name { get { return this._name; } set { this._name = value; } } #endregion #region IComparable Members public int CompareTo(object obj) { return name.CompareTo( ( (Sortable) obj).name ); } #endregion } } Index: FooBar.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FooBar.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FooBar.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- FooBar.hbm.xml 8 Apr 2004 14:59:32 -0000 1.2 *************** *** 2,12 **** <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <import class="net.sf.hibernate.test.Result"/> ! <import class="net.sf.hibernate.test.Named"/> <class ! name="net.sf.hibernate.test.Foo" table="`foos`" ! proxy="net.sf.hibernate.test.FooProxy" discriminator-value="F" dynamic-update="true" --- 2,12 ---- <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <import class="NHibernate.DomainModel.Result, NHibernate.DomainModel"/> ! <import class="NHibernate.DomainModel.Named, NHibernate.DomainModel"/> <class ! name="NHibernate.DomainModel.Foo, NHibernate.DomainModel" table="`foos`" ! proxy="NHibernate.DomainModel.FooProxy, NHibernate.DomainModel" discriminator-value="F" dynamic-update="true" *************** *** 25,29 **** <!--<version name="versionCalendar" type="calendar"/>--> <!--<timestamp name="versionTimestamp"/>--> ! <many-to-one name="foo" class="net.sf.hibernate.test.Foo"> <column name="foo" length="36" index="fbmtoidx"/> </many-to-one> --- 25,29 ---- <!--<version name="versionCalendar" type="calendar"/>--> <!--<timestamp name="versionTimestamp"/>--> ! <many-to-one name="foo" class="NHibernate.DomainModel.Foo, NHibernate.DomainModel"> <column name="foo" length="36" index="fbmtoidx"/> </many-to-one> *************** *** 60,64 **** <property name="byte" column="byte_"/> <property name="yesno" type="yes_no"/> ! <property name="blob" type="net.sf.hibernate.test.Foo$Struct" column="blobb_"/> <property name="nullBlob" type="serializable"/> <property name="status" column="`status_@###`"/> --- 60,64 ---- <property name="byte" column="byte_"/> <property name="yesno" type="yes_no"/> ! <property name="blob" type="NHibernate.DomainModel.Foo$Struct, NHibernate.DomainModel" column="blobb_"/> <property name="nullBlob" type="serializable"/> <property name="status" column="`status_@###`"/> *************** *** 68,76 **** <property name="formula" formula="1/2 * int_"/> ! <property name="custom" type="net.sf.hibernate.test.DoubleStringType"> <column name="first_name" length="66"/> <column name="surname" length="66"/> </property> ! <many-to-one name="dependent" class="net.sf.hibernate.test.Fee" cascade="all" not-null="true"/> <component name="component"> <property name="count" column="count_" type="int" not-null="true"/> --- 68,76 ---- <property name="formula" formula="1/2 * int_"/> ! <property name="custom" type="NHibernate.DomainModel.DoubleStringType, NHibernate.DomainModel"> <column name="first_name" length="66"/> <column name="surname" length="66"/> </property> ! <many-to-one name="dependent" class="NHibernate.DomainModel.Fee, NHibernate.DomainModel" cascade="all" not-null="true"/> <component name="component"> <property name="count" column="count_" type="int" not-null="true"/> *************** *** 78,82 **** <column name="name_" length="32" not-null="true"/> </property> ! <many-to-one name="glarch" column="g__" cascade="all" class="net.sf.hibernate.test.Glarch" outer-join="true"/> <property name="null" column="cmpnt_null_"/> <component name="subcomponent"> --- 78,82 ---- <column name="name_" length="32" not-null="true"/> </property> ! <many-to-one name="glarch" column="g__" cascade="all" class="NHibernate.DomainModel.Glarch, NHibernate.DomainModel" outer-join="true"/> <property name="null" column="cmpnt_null_"/> <component name="subcomponent"> *************** *** 88,92 **** <element column="date_" type="time"/> </array> ! <many-to-one name="fee" column="fee_sub" cascade="all" class="net.sf.hibernate.test.Fee" outer-join="false"/> </component> <array name="importantDates" table="foo_dates"> --- 88,92 ---- <element column="date_" type="time"/> </array> ! <many-to-one name="fee" column="fee_sub" cascade="all" class="NHibernate.DomainModel.Fee, NHibernate.DomainModel" outer-join="false"/> </component> <array name="importantDates" table="foo_dates"> *************** *** 100,118 **** </component> <subclass ! name="net.sf.hibernate.test.Trivial" ! proxy="net.sf.hibernate.test.FooProxy" discriminator-value="T"/> <subclass ! name="net.sf.hibernate.test.Abstract" ! proxy="net.sf.hibernate.test.AbstractProxy" discriminator-value="null"> <set name="abstracts"> <key column="abstract_id"/> ! <one-to-many class="net.sf.hibernate.test.Abstract"/> </set> <property name="time" column="the_time"/> <subclass ! name="net.sf.hibernate.test.Bar" ! proxy="net.sf.hibernate.test.BarProxy" discriminator-value="B"> <many-to-one name="baz"/> --- 100,118 ---- </component> <subclass ! name="NHibernate.DomainModel.Trivial, NHibernate.DomainModel" ! proxy="NHibernate.DomainModel.FooProxy, NHibernate.DomainModel" discriminator-value="T"/> <subclass ! name="NHibernate.DomainModel.Abstract, NHibernate.DomainModel" ! 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"/> *************** *** 121,125 **** </property> <property name="name" column="name_name"/> ! <component name="barComponent" class="net.sf.hibernate.test.FooComponent"> <parent name="parent"/> <property name="count" column="bar_count"/> --- 121,125 ---- </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"/> --- NEW FILE: DoubleStringType.cs --- using System; using System.Data; namespace NHibernate.DomainModel { public class DoubleStringType : ICompositeUserType { public System.Type ReturnedClass { get { return typeof(String[]); } } public new bool Equals(object x, object y) { 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] ); } public Object DeepCopy(Object x) { if (x==null) return null; String[] result = new String[2]; String[] input = (String[]) x; result[0] = input[0]; result[1] = input[1]; return result; } public bool IsMutable { get { return true; } } public Object NullSafeGet(IDataReader rs, String[] names, Engine.ISessionImplementor session, Object owner) { String first = (String) Type.TypeFactory.Basic("String").NullSafeGet(rs, names[0], session, owner); String second = (String) Type.TypeFactory.Basic("String").NullSafeGet(rs, names[1], session, owner); return ( first==null && second==null ) ? null : new String[] { first, second }; } public void NullSafeSet(IDbCommand st, Object value, int index, Engine.ISessionImplementor session) { String[] strings = (value==null) ? new String[2] : (String[]) value; Type.TypeFactory.Basic("String").NullSafeSet(st, strings[0], index, session); Type.TypeFactory.Basic("String").NullSafeSet(st, strings[1], index+1, session); } public String[] PropertyNames { get { return new String[] { "s1", "s2" }; } } public Type.IType[] PropertyTypes { get { return new Type.IType[] { Type.TypeFactory.Basic("String"), Type.TypeFactory.Basic("String") }; } } public Object GetPropertyValue(Object component, int property) { return ( (String[]) component )[property]; } public void SetPropertyValue( Object component, int property, Object value) { ( (String[]) component )[property] = (String) value; } public object Assemble( object cached, Engine.ISessionImplementor session, object owner) { return DeepCopy(cached); } public object Disassemble(Object value, Engine.ISessionImplementor session) { return DeepCopy(value); } } } Index: Baz.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Baz.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Baz.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- Baz.hbm.xml 8 Apr 2004 14:59:32 -0000 1.2 *************** *** 2,13 **** <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="net.sf.hibernate.test.Baz" 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"/> <property name="name" column="name_b"/> ! <many-to-one name="foo" outer-join="true" class="net.sf.hibernate.test.Foo"/> <list name="stringList" table="string_list"> --- 2,13 ---- <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"> *************** *** 16,20 **** </key> <index column="`i`"/> ! <element column="element" type="string"/> </list> <primitive-array name="intArray" table="int_array"> --- 16,20 ---- </key> <index column="`i`"/> ! <element column="element" type="String"/> </list> <primitive-array name="intArray" table="int_array"> *************** *** 29,33 **** <column name="baz_id" length="16"/> </key> ! <one-to-many class="net.sf.hibernate.test.Foo"/> </set> <array name="components" table="bazcomponents"> --- 29,33 ---- <column name="baz_id" length="16"/> </key> ! <one-to-many class="NHibernate.DomainModel.Foo, NHibernate.DomainModel"/> </set> <array name="components" table="bazcomponents"> *************** *** 36,48 **** </key> <index column="i"/> ! <composite-element class="net.sf.hibernate.test.FooComponent"> <parent name="baz"/> <property name="name"> <column name="name" length="56"/> </property> ! <property name="count" column="count_"/> ! <nested-composite-element name="subcomponent" class="net.sf.hibernate.test.FooComponent"> <property name="name" column="x_"/> ! <property name="count" column="y_"/> </nested-composite-element> </composite-element> --- 36,48 ---- </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"/> </nested-composite-element> </composite-element> *************** *** 59,63 **** <column name="`baz_id@#$`" length="16"/> </key> ! <element column="`name!`" type="string"/> </bag> <map name="fooToGlarch"> --- 59,63 ---- <column name="`baz_id@#$`" length="16"/> </key> ! <element column="`name!`" type="String"/> </bag> <map name="fooToGlarch"> *************** *** 65,70 **** <column name="baz_id" length="16"/> </key> ! <index-many-to-many column="foo_id" class="net.sf.hibernate.test.Foo"/> ! <many-to-many column="glarch_id" class="net.sf.hibernate.test.Glarch"/> </map> <map name="fooComponentToFoo"> --- 65,70 ---- <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"> *************** *** 73,81 **** <column name="baz_id" length="16"/> </key> ! <composite-index class="net.sf.hibernate.test.FooComponent"> <key-property name="name" length="32"/> ! <key-property name="count" column="count_"/> </composite-index> ! <many-to-many column="foo_id" class="net.sf.hibernate.test.Foo" outer-join="true"/> </map> <map name="glarchToFoo"> --- 73,81 ---- <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"> *************** *** 83,107 **** <column name="gtf_baz_id" length="16"/> </key> ! <index-many-to-many column="gtf_foo_id" class="net.sf.hibernate.test.Foo"/> ! <one-to-many class="net.sf.hibernate.test.Glarch"/> </map> ! <set name="stringSet" lazy="true" sort="net.sf.hibernate.test.StringComparator"> <!--<jcs-cache usage="read-write"/>--> <key column="id_"/> ! <element column="element" type="string" not-null="true" length="32"/> </set> ! <map name="stringDateMap" lazy="true" sort="net.sf.hibernate.test.ReverseComparator"> <key column="id_"/> ! <index column="map_key" type="string" length="32"/> <element column="map_value" type="date"/> </map> ! <array name="fooArray" element-class="net.sf.hibernate.test.FooProxy" where="i<8"> <jcs-cache usage="read-write"/> <key column="id_"/> <index column="i"/> ! <many-to-many class="net.sf.hibernate.test.Foo"> <column name="foo" length="36"/> </many-to-many> --- 83,107 ---- <column name="gtf_baz_id" length="16"/> </key> ! <index-many-to-many column="gtf_foo_id" class="NHibernate.DomainModel.Foo, NHibernate.DomainModel"/> ! <one-to-many class="NHibernate.DomainModel.Glarch, NHibernate.DomainModel"/> </map> ! <set name="stringSet" lazy="true" sort="NHibernate.DomainModel.StringComparator, NHibernate.DomainModel"> <!--<jcs-cache usage="read-write"/>--> <key column="id_"/> ! <element column="element" type="String" not-null="true" length="32"/> </set> ! <map name="stringDateMap" lazy="true" sort="NHibernate.DomainModel.ReverseComparator, NHibernate.DomainModel"> <key column="id_"/> ! <index column="map_key" type="String" length="32"/> <element column="map_value" type="date"/> </map> ! <array name="fooArray" element-class="NHibernate.DomainModel.FooProxy, NHibernate.DomainModel" where="i<8"> <jcs-cache usage="read-write"/> <key column="id_"/> <index column="i"/> ! <many-to-many class="NHibernate.DomainModel.Foo, NHibernate.DomainModel"> <column name="foo" length="36"/> </many-to-many> *************** *** 110,114 **** <bag ... [truncated message content] |
From: Peter S. <sz...@us...> - 2004-04-08 07:56:35
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11213/NHibernate.Test Modified Files: TestCase.cs Log Message: I think we may need this for later use :) Index: TestCase.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TestCase.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestCase.cs 7 Apr 2004 21:24:21 -0000 1.5 --- TestCase.cs 8 Apr 2004 07:43:29 -0000 1.6 *************** *** 43,46 **** --- 43,78 ---- new SchemaExport(cfg).Drop(true, true); } + public void ExecuteStatement(string sql) + { + ExecuteStatement(sql, true); + } + + public void ExecuteStatement(string sql, bool error) + { + SqlConnection conn = null; + SqlTransaction tran = null; + try + { + conn = new SqlConnection("Server=localhost;initial catalog=nhibernate;User ID=someuser;Password=somepwd"); + conn.Open(); + tran = conn.BeginTransaction(); + System.Data.SqlClient.SqlCommand comm = conn.CreateCommand(); + comm.CommandText = sql; + comm.Transaction = tran; + comm.CommandType = CommandType.Text; + comm.ExecuteNonQuery(); + tran.Commit(); + } + catch + { + tran.Rollback(); + if (error) + throw; + } + finally + { + conn.Close(); + } + } } |
From: Michael D. <mik...@us...> - 2004-04-07 21:37:23
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2572/NHibernate.Test Modified Files: ABCProxyTest.cs ABCTest.cs TestCase.cs Log Message: Added a method to execute DropSchema so all test can remove their tables in a [TearDown] method instead of needing the ExecuteStatement method. Index: TestCase.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TestCase.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TestCase.cs 6 Apr 2004 13:36:18 -0000 1.4 --- TestCase.cs 7 Apr 2004 21:24:21 -0000 1.5 *************** *** 14,17 **** --- 14,18 ---- public abstract class TestCase { + protected Configuration cfg; protected ISessionFactory sessions; protected Dialect.Dialect dialect; *************** *** 24,28 **** public void ExportSchema(string[] files, bool exportSchema) { ! Configuration cfg = new Configuration(); for (int i=0; i<files.Length; i++) --- 25,29 ---- public void ExportSchema(string[] files, bool exportSchema) { ! cfg = new Configuration(); for (int i=0; i<files.Length; i++) *************** *** 38,73 **** } ! public void ExecuteStatement(string sql) { ! ExecuteStatement(sql, true); } - public void ExecuteStatement(string sql, bool error) - { - SqlConnection conn = null; - SqlTransaction tran = null; - try - { - conn = new SqlConnection("Server=localhost;initial catalog=nhibernate;User ID=someuser;Password=somepwd"); - conn.Open(); - tran = conn.BeginTransaction(); - System.Data.SqlClient.SqlCommand comm = conn.CreateCommand(); - comm.CommandText = sql; - comm.Transaction = tran; - comm.CommandType = CommandType.Text; - comm.ExecuteNonQuery(); - tran.Commit(); - } - catch - { - tran.Rollback(); - if (error) - throw; - } - finally - { - conn.Close(); - } - } } } --- 39,47 ---- } ! public void DropSchema(string[] files) { ! new SchemaExport(cfg).Drop(true, true); } } } Index: ABCProxyTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ABCProxyTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ABCProxyTest.cs 6 Apr 2004 13:36:18 -0000 1.2 --- ABCProxyTest.cs 7 Apr 2004 21:24:21 -0000 1.3 *************** *** 13,22 **** public void SetUp() { - ExecuteStatement("drop table D", false); - ExecuteStatement("drop table A", false); - ExecuteStatement("drop table map", false); ExportSchema(new string[] { "ABCProxy.hbm.xml"}); } [Test] [Ignore("Test will fail because of proxy initalization problems")] --- 13,25 ---- public void SetUp() { ExportSchema(new string[] { "ABCProxy.hbm.xml"}); } + [TearDown] + public void TearDown() + { + DropSchema(new string[] { "ABCProxy.hbm.xml"}); + } + [Test] [Ignore("Test will fail because of proxy initalization problems")] Index: ABCTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ABCTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ABCTest.cs 6 Apr 2004 13:36:18 -0000 1.2 --- ABCTest.cs 7 Apr 2004 21:24:21 -0000 1.3 *************** *** 16,25 **** public void SetUp() { - ExecuteStatement("drop table D", false); - ExecuteStatement("drop table A", false); - ExecuteStatement("drop table map", false); ExportSchema(new string[] { "ABC.hbm.xml"}); } [Test] public void Subclassing() --- 16,28 ---- public void SetUp() { ExportSchema(new string[] { "ABC.hbm.xml"}); } + [TearDown] + public void TearDown() + { + DropSchema(new string[] { "ABC.hbm.xml"}); + } + [Test] public void Subclassing() |
From: Michael D. <mik...@us...> - 2004-04-07 21:36:19
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2281/NHibernate.DomainModel Modified Files: ABC.hbm.xml ABCProxy.hbm.xml Log Message: changed generator to native instead of increment because increment was dropped from project because of how poor of an id strategy it is. Index: ABCProxy.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/ABCProxy.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ABCProxy.hbm.xml 6 Apr 2004 10:51:42 -0000 1.1 --- ABCProxy.hbm.xml 7 Apr 2004 21:23:16 -0000 1.2 *************** *** 4,11 **** proxy="NHibernate.DomainModel.A, NHibernate.DomainModel"> <id name="id" unsaved-value="null" type="Int64"> ! <generator class="increment"> ! <param name="table">A</param> ! <param name="column">id</param> ! </generator> </id> <discriminator column="clazz" type="Int32" force="true" not-null="false" /> --- 4,8 ---- 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" /> Index: ABC.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/ABC.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ABC.hbm.xml 6 Apr 2004 12:56:38 -0000 1.2 --- ABC.hbm.xml 7 Apr 2004 21:23:16 -0000 1.3 *************** *** 3,10 **** <class name="NHibernate.DomainModel.A, NHibernate.DomainModel" discriminator-value="0"> <id name="id" unsaved-value="null"> ! <generator class="increment"> ! <param name="table">A</param> ! <param name="column">id</param> ! </generator> </id> <discriminator column="clazz" type="Int32" not-null="false" /> --- 3,7 ---- <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" /> |
From: Peter S. <sz...@us...> - 2004-04-07 17:26:40
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12676/NHibernate Modified Files: NHibernate-1.1.csproj Log Message: Removed IncrementGenerator Index: NHibernate-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/NHibernate-1.1.csproj,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** NHibernate-1.1.csproj 6 Apr 2004 02:31:32 -0000 1.14 --- NHibernate-1.1.csproj 7 Apr 2004 17:13:38 -0000 1.15 *************** *** 849,857 **** /> <File - RelPath = "Id\IncrementGenerator.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "Id\IPersistentIdentifierGenerator.cs" SubType = "Code" --- 849,852 ---- |
From: Peter S. <sz...@us...> - 2004-04-07 17:26:38
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Id In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12676/NHibernate/Id Modified Files: IdentifierGeneratorFactory.cs Removed Files: IncrementGenerator.cs Log Message: Removed IncrementGenerator --- IncrementGenerator.cs DELETED --- Index: IdentifierGeneratorFactory.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Id/IdentifierGeneratorFactory.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** IdentifierGeneratorFactory.cs 6 Apr 2004 00:53:20 -0000 1.8 --- IdentifierGeneratorFactory.cs 7 Apr 2004 17:13:38 -0000 1.9 *************** *** 54,58 **** idgenerators.Add("seqhilo", typeof(SequenceHiLoGenerator)); idgenerators.Add("vm", typeof(CounterGenerator)); - idgenerators.Add("increment", typeof(IncrementGenerator)); idgenerators.Add("foreign", typeof(ForeignGenerator)); idgenerators.Add("guid", typeof(GuidGenerator)); --- 54,57 ---- |
From: Peter S. <sz...@us...> - 2004-04-06 13:49:10
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19133/NHibernate.DomainModel Modified Files: Container.hbm.xml Fee.hbm.xml Fo.hbm.xml Fum.hbm.xml Fumm.hbm.xml Glarch.hbm.xml Holder.hbm.xml Immutable.hbm.xml Location.hbm.xml Many.hbm.xml One.hbm.xml Qux.hbm.xml Stuff.hbm.xml Vetoer.hbm.xml XY.hbm.xml Log Message: Added executestatement to testcase and to testcases. Modified hbms' doctype accordingly. Index: Location.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Location.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Location.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- Location.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 *************** *** 1,16 **** ! <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > ! <hibernate-mapping> ! ! <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,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 Index: Stuff.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Stuff.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Stuff.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- Stuff.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 *************** *** 1,33 **** ! <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > ! <hibernate-mapping> ! ! <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,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 Index: Fumm.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Fumm.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Fumm.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- Fumm.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 *************** *** 1,17 **** ! <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > ! <hibernate-mapping> ! ! <class name="net.sf.hibernate.test.Fumm"> ! <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="date"/> ! </composite-id> ! <property name="locale"/> ! <one-to-one name="fum" cascade="all" constrained="true"/> ! </class> ! </hibernate-mapping> \ No newline at end of file --- 1,14 ---- ! <?xml version="1.0" ?> ! <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="net.sf.hibernate.test.Fumm"> ! <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="date" /> ! </composite-id> ! <property name="locale" /> ! <one-to-one name="fum" cascade="all" constrained="true" /> ! </class> </hibernate-mapping> \ No newline at end of file Index: XY.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/XY.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XY.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- XY.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 *************** *** 1,22 **** ! <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE hibernate-mapping ! PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" ! "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> ! <hibernate-mapping> ! <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> ! \ No newline at end of file --- 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> Index: Immutable.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Immutable.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Immutable.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- Immutable.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 *************** *** 1,14 **** ! <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > ! <hibernate-mapping> ! <class name="net.sf.hibernate.test.Immutable" table="immut" mutable="false"> ! <jcs-cache usage="read-only"/> <id name="id" column="id_" length="64"> ! <generator class="uuid.hex"/> </id> ! <property name="foo"/> ! <property name="bar"/> </class> - </hibernate-mapping> \ No newline at end of file --- 1,11 ---- ! <?xml version="1.0" ?> ! <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="net.sf.hibernate.test.Immutable" table="immut" mutable="false"> ! <jcs-cache usage="read-only" /> <id name="id" column="id_" length="64"> ! <generator class="uuid.hex" /> </id> ! <property name="foo" /> ! <property name="bar" /> </class> </hibernate-mapping> \ No newline at end of file Index: One.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/One.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** One.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- One.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 *************** *** 1,18 **** ! <?xml version="1.0"?> ! ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > ! ! <hibernate-mapping> <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> </hibernate-mapping> - --- 1,14 ---- ! <?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> </hibernate-mapping> Index: Many.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Many.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Many.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- Many.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 *************** *** 1,14 **** ! <?xml version="1.0"?> ! ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > ! ! <hibernate-mapping> ! <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,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> Index: Fum.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Fum.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Fum.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- Fum.hbm.xml 6 Apr 2004 13:36:17 -0000 1.2 *************** *** 1,39 **** ! <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > ! <hibernate-mapping> ! <class name="net.sf.hibernate.test.Fum"> <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="date"/> </composite-id> ! <version name="lastUpdated" type="calendar"/> ! <property name="fum" not-null="true"/> <many-to-one name="fo"> ! <column name="fo_string" length="10"/> ! <column name="fo_short"/> ! <column name="fo_date"/> </many-to-one> <set name="friends"> <key> ! <column name="fr_string" length="10"/> ! <column name="fr_short"/> ! <column name="fr_date"/> </key> ! <one-to-many class="net.sf.hibernate.test.Fum"/> </set> <array name="quxArray"> <key> ! <column name="fum_str_" length="10"/> ! <column name="fum_sho_"/> ! <column name="fum_dat_"/> </key> ! <index column="i"/> ! <one-to-many class="net.sf.hibernate.test.Qux"/> </array> </class> - </hibernate-mapping> \ No newline at end of file --- 1,36 ---- ! <?xml version="1.0" ?> ! <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="net.sf.hibernate.test.Fum"> <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="date" /> </composite-id> ! <version name="lastUpdated" type="calendar" /> ! <property name="fum" not-null="true" /> <many-to-one name="fo"> ! <column name="fo_string" length="10" /> ! <column name="fo_short" /> ! <column name="fo_date" /> </many-to-one> <set name="friends"> <key> ! <column name="fr_string" length="10" /> ! <column name="fr_short" /> ! <column name="fr_date" /> </key> ! <one-to-many class="net.sf.hibernate.test.Fum" /> </set> <array name="quxArray"> <key> ! <column name="fum_str_" length="10" /> ! <column name="fum_sho_" /> ! <column name="fum_dat_" /> </key> ! <index column="i" /> ! <one-to-many class="net.sf.hibernate.test.Qux" /> </array> </class> </hibernate-mapping> \ No newline at end of file Index: Container.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Container.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Container.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- Container.hbm.xml 6 Apr 2004 13:36:17 -0000 1.2 *************** *** 1,12 **** ! <?xml version="1.0"?> ! ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > ! ! <hibernate-mapping 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"> --- 1,7 ---- ! <?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"> *************** *** 14,83 **** </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"> --- 9,77 ---- </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"> *************** *** 85,96 **** </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> - </hibernate-mapping> --- 79,89 ---- </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> </hibernate-mapping> Index: Vetoer.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Vetoer.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Vetoer.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- Vetoer.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 *************** *** 1,13 **** ! <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > ! <hibernate-mapping> ! ! <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,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 Index: Qux.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Qux.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Qux.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- Qux.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 *************** *** 1,33 **** ! <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > ! <hibernate-mapping> ! <class name="net.sf.hibernate.test.Qux" table="quux" proxy="net.sf.hibernate.test.Qux"> <!----> <id name="key" column="qux_key" unsaved-value="0"> ! <generator class="hilo"/> </id> <many-to-one name="foo" class="net.sf.hibernate.test.Foo"> ! <column name="foo" length="36"/> </many-to-one> ! <property name="deleted"/> ! <property name="loaded"/> ! <property name="stored"/> ! <property name="created"/> ! <property name="childKey" type="long"/> ! <property name="stuff"/> <set name="fums" lazy="true"> ! <key column="qux_id"/> <many-to-many class="net.sf.hibernate.test.Fum"> ! <column name="fum_string" length="10" not-null="true"/> ! <column name="fum_short" not-null="true"/> ! <column name="fum_date" not-null="true"/> </many-to-many> </set> <list name="moreFums" lazy="true"> ! <key column="qux_id"/> ! <index column="posn"/> ! <one-to-many class="net.sf.hibernate.test.Fum"/> </list> </class> - </hibernate-mapping> \ No newline at end of file --- 1,30 ---- ! <?xml version="1.0" ?> ! <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="net.sf.hibernate.test.Qux" table="quux" proxy="net.sf.hibernate.test.Qux"> <!----> <id name="key" column="qux_key" unsaved-value="0"> ! <generator class="hilo" /> </id> <many-to-one name="foo" class="net.sf.hibernate.test.Foo"> ! <column name="foo" length="36" /> </many-to-one> ! <property name="deleted" /> ! <property name="loaded" /> ! <property name="stored" /> ! <property name="created" /> ! <property name="childKey" type="long" /> ! <property name="stuff" /> <set name="fums" lazy="true"> ! <key column="qux_id" /> <many-to-many class="net.sf.hibernate.test.Fum"> ! <column name="fum_string" length="10" not-null="true" /> ! <column name="fum_short" not-null="true" /> ! <column name="fum_date" not-null="true" /> </many-to-many> </set> <list name="moreFums" lazy="true"> ! <key column="qux_id" /> ! <index column="posn" /> ! <one-to-many class="net.sf.hibernate.test.Fum" /> </list> </class> </hibernate-mapping> \ 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.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Fo.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- Fo.hbm.xml 6 Apr 2004 13:36:17 -0000 1.2 *************** *** 1,19 **** ! <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > ! <hibernate-mapping> ! <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="date"/> </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,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="date" /> </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 Index: Holder.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Holder.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Holder.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- Holder.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 *************** *** 1,8 **** ! <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > ! <hibernate-mapping> ! <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> </hibernate-mapping> \ No newline at end of file --- 1,23 ---- ! <?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> </hibernate-mapping> \ No newline at end of file Index: Fee.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Fee.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Fee.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- Fee.hbm.xml 6 Apr 2004 13:36:17 -0000 1.2 *************** *** 1,24 **** ! <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > ! <hibernate-mapping> ! ! <class name="net.sf.hibernate.test.Fee" table="`the fees`"> ! <id type="string" name="key" column="id_" length="64" unsaved-value="null"> ! <generator class="uuid.hex"/> ! </id> ! <property name="fi"/> ! <many-to-one name="fee"/> ! <many-to-one name="anotherFee"/> ! <many-to-one name="qux" cascade="all"/> ! <property name="count" column="count_"/> ! <set name="fees"> ! <key column="fee_id"/> ! <element column="str_" type="string"/> ! </set> ! <component name="compon" update="false"> ! <property name="name"/> ! <property name="null" column="null_prop"/> ! </component> ! </class> ! </hibernate-mapping> \ No newline at end of file --- 1,21 ---- ! <?xml version="1.0" ?> ! <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="net.sf.hibernate.test.Fee" table="`the fees`"> ! <id type="string" name="key" column="id_" length="64" unsaved-value="null"> ! <generator class="uuid.hex" /> ! </id> ! <property name="fi" /> ! <many-to-one name="fee" /> ! <many-to-one name="anotherFee" /> ! <many-to-one name="qux" cascade="all" /> ! <property name="count" column="count_" /> ! <set name="fees"> ! <key column="fee_id" /> ! <element column="str_" type="string" /> ! </set> ! <component name="compon" update="false"> ! <property name="name" /> ! <property name="null" column="null_prop" /> ! </component> ! </class> </hibernate-mapping> \ No newline at end of file Index: Glarch.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Glarch.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Glarch.hbm.xml 6 Apr 2004 12:56:38 -0000 1.1 --- Glarch.hbm.xml 6 Apr 2004 13:36:18 -0000 1.2 *************** *** 1,62 **** ! <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > ! <hibernate-mapping> ! ! <class name="net.sf.hibernate.test.Glarch" ! table="`glarchez`" ! proxy="net.sf.hibernate.test.GlarchProxy" ! dynamic-update="true"> ! <!--<jcs-cache usage="read-write"/>--> ! <id type="string" column="tha_key" length="32"> ! <generator class="uuid.hex"/> ! </id> ! <version name="version"/> ! <property name="name" column="namecvbnmasdf"/> ! <!-- <property name="currency"/> --> ! <many-to-one name="next" column="next_" class="net.sf.hibernate.test.Glarch"/> ! <property name="order" column="order_"/> ! <dynabean name="dynaBean" dynaclass="foo"> ! <property name="foo" type="string"/> ! <property name="bar" type="integer"/> ! </dynabean> ! <property name="x"/> ! <list name="strings"> ! <key column="glarch_key"/> ! <index column="`!@# i`"/> ! <element type="string" column="`tha_stryng`"/> ! </list> ! <list name="fooComponents" lazy="true" cascade="all"> ! <key column="glarch_key"/> ! <index column="tha_indecks"/> ! <composite-element class="net.sf.hibernate.test.FooComponent"> ! <property name="name" column="name_"/> ! <property name="count" column="count_"/> ! <nested-composite-element name="subcomponent" class="net.sf.hibernate.test.FooComponent"> ! <property name="name" column="x_"/> ! <property name="count" column="y_"/> ! </nested-composite-element> ! <many-to-one name="fee" cascade="all" outer-join="true"/> ! </composite-element> ! </list> ! <array name="proxyArray" element-class="net.sf.hibernate.test.GlarchProxy"> ! <key column="array_key"/> ! <index column="array_indecks"/> ! <one-to-many class="net.sf.hibernate.test.Glarch"/> ! </array> ! <set name="proxySet"> ! <key column="set_key"/> ! <one-to-many class="net.sf.hibernate.test.Glarch"/> ! </set> ! <property name="immutable" update="false"/> ! <property name="derivedVersion" insert="false" update="false" column="version"/> ! <property name="any" type="object"> ! <column name="`any_id of object`"/> ! <column name="`any_class of object`"/> ! </property> ! <property name="multiple" type="net.sf.hibernate.test.MultiplicityType"> ! <column name="count_"/> ! <column name="glarch_"/> ! </property> ! </class> ! </hibernate-mapping> \ No newline at end of file --- 1,57 ---- ! <?xml version="1.0" ?> ! <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> ! <class name="net.sf.hibernate.test.Glarch" table="`glarchez`" proxy="net.sf.hibernate.test.GlarchProxy" ! dynamic-update="true"> ! <!--<jcs-cache usage="read-write"/>--> ! <id type="string" column="tha_key" length="32"> ! <generator class="uuid.hex" /> ! </id> ! <version name="version" /> ! <property name="name" column="namecvbnmasdf" /> ! <!-- <property name="currency"/> --> ! <many-to-one name="next" column="next_" class="net.sf.hibernate.test.Glarch" /> ! <property name="order" column="order_" /> ! <dynabean name="dynaBean" dynaclass="foo"> ! <property name="foo" type="string" /> ! <property name="bar" type="integer" /> ! </dynabean> ! <property name="x" /> ! <list name="strings"> ! <key column="glarch_key" /> ! <index column="`!@# i`" /> ! <element type="string" column="`tha_stryng`" /> ! </list> ! <list name="fooComponents" lazy="true" cascade="all"> ! <key column="glarch_key" /> ! <index column="tha_indecks" /> ! <composite-element class="net.sf.hibernate.test.FooComponent"> ! <property name="name" column="name_" /> ! <property name="count" column="count_" /> ! <nested-composite-element name="subcomponent" class="net.sf.hibernate.test.FooComponent"> ! <property name="name" column="x_" /> ! <property name="count" column="y_" /> ! </nested-composite-element> ! <many-to-one name="fee" cascade="all" outer-join="true" /> ! </composite-element> ! </list> ! <array name="proxyArray" element-class="net.sf.hibernate.test.GlarchProxy"> ! <key column="array_key" /> ! <index column="array_indecks" /> ! <one-to-many class="net.sf.hibernate.test.Glarch" /> ! </array> ! <set name="proxySet"> ! <key column="set_key" /> ! <one-to-many class="net.sf.hibernate.test.Glarch" /> ! </set> ! <property name="immutable" update="false" /> ! <property name="derivedVersion" insert="false" update="false" column="version" /> ! <property name="any" type="object"> ! <column name="`any_id of object`" /> ! <column name="`any_class of object`" /> ! </property> ! <property name="multiple" type="net.sf.hibernate.test.MultiplicityType"> ! <column name="count_" /> ! <column name="glarch_" /> ! </property> ! </class> </hibernate-mapping> \ No newline at end of file |
From: Peter S. <sz...@us...> - 2004-04-06 13:49:07
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19133/NHibernate.Test Modified Files: ABCProxyTest.cs ABCTest.cs TestCase.cs Log Message: Added executestatement to testcase and to testcases. Modified hbms' doctype accordingly. Index: TestCase.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TestCase.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestCase.cs 6 Apr 2004 12:56:39 -0000 1.3 --- TestCase.cs 6 Apr 2004 13:36:18 -0000 1.4 *************** *** 40,44 **** public void ExecuteStatement(string sql) { ! SqlConnection conn = new SqlConnection(""); } } --- 40,72 ---- public void ExecuteStatement(string sql) { ! ExecuteStatement(sql, true); ! } ! ! public void ExecuteStatement(string sql, bool error) ! { ! SqlConnection conn = null; ! SqlTransaction tran = null; ! try ! { ! conn = new SqlConnection("Server=localhost;initial catalog=nhibernate;User ID=someuser;Password=somepwd"); ! conn.Open(); ! tran = conn.BeginTransaction(); ! System.Data.SqlClient.SqlCommand comm = conn.CreateCommand(); ! comm.CommandText = sql; ! comm.Transaction = tran; ! comm.CommandType = CommandType.Text; ! comm.ExecuteNonQuery(); ! tran.Commit(); ! } ! catch ! { ! tran.Rollback(); ! if (error) ! throw; ! } ! finally ! { ! conn.Close(); ! } } } Index: ABCProxyTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ABCProxyTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ABCProxyTest.cs 6 Apr 2004 10:51:42 -0000 1.1 --- ABCProxyTest.cs 6 Apr 2004 13:36:18 -0000 1.2 *************** *** 13,16 **** --- 13,19 ---- public void SetUp() { + ExecuteStatement("drop table D", false); + ExecuteStatement("drop table A", false); + ExecuteStatement("drop table map", false); ExportSchema(new string[] { "ABCProxy.hbm.xml"}); } Index: ABCTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ABCTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ABCTest.cs 6 Apr 2004 12:56:39 -0000 1.1 --- ABCTest.cs 6 Apr 2004 13:36:18 -0000 1.2 *************** *** 16,19 **** --- 16,22 ---- public void SetUp() { + ExecuteStatement("drop table D", false); + ExecuteStatement("drop table A", false); + ExecuteStatement("drop table map", false); ExportSchema(new string[] { "ABC.hbm.xml"}); } |
From: Peter S. <sz...@us...> - 2004-04-06 13:49:07
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Eg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19133/NHibernate/Eg Modified Files: Edge.hbm.xml Vertex.hbm.xml Log Message: Added executestatement to testcase and to testcases. Modified hbms' doctype accordingly. Index: Edge.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Eg/Edge.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Edge.hbm.xml 18 Mar 2003 20:27:45 -0000 1.1 --- Edge.hbm.xml 6 Apr 2004 13:36:17 -0000 1.2 *************** *** 1,7 **** <?xml version="1.0" ?> ! <!DOCTYPE hibernate-mapping PUBLIC ! "-//Hibernate/Hibernate Mapping DTD//EN" ! "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> ! <hibernate-mapping> <class name="NHibernate.Eg.Edge" table="edge"> <!--<jcs-cache usage="read-write"/>--> --- 1,4 ---- <?xml version="1.0" ?> ! <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="NHibernate.Eg.Edge" table="edge"> <!--<jcs-cache usage="read-write"/>--> Index: Vertex.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Eg/Vertex.hbm.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Vertex.hbm.xml 20 Mar 2003 21:46:23 -0000 1.3 --- Vertex.hbm.xml 6 Apr 2004 13:36:17 -0000 1.4 *************** *** 1,7 **** <?xml version="1.0" ?> ! <!DOCTYPE hibernate-mapping PUBLIC ! "-//Hibernate/Hibernate Mapping DTD//EN" ! "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> ! <hibernate-mapping> <class name="NHibernate.Eg.Vertex" table="vertex"> <!--<jcs-cache usage="read-write"/>--> --- 1,4 ---- <?xml version="1.0" ?> ! <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="NHibernate.Eg.Vertex" table="vertex"> <!--<jcs-cache usage="read-write"/>--> |
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10408/NHibernate.DomainModel Modified Files: ABC.hbm.xml NHibernate.DomainModel-1.1.csproj Added Files: Baz.hbm.xml Container.hbm.xml Fee.hbm.xml Fo.hbm.xml FooBar.hbm.xml Fum.hbm.xml Fumm.hbm.xml Glarch.hbm.xml Holder.hbm.xml Immutable.hbm.xml Location.hbm.xml Many.hbm.xml One.hbm.xml Qux.hbm.xml Stuff.hbm.xml Vetoer.hbm.xml XY.hbm.xml Log Message: Another fix on incrementgenerator, a new TC in ABCTest, and the original hbms for some new tests. Testcase is going to be extended with executestatement for some nasty tricks in tests (deleting table/row, etc) --- NEW FILE: Location.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <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> --- NEW FILE: Stuff.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <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> Index: NHibernate.DomainModel-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHibernate.DomainModel-1.1.csproj,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NHibernate.DomainModel-1.1.csproj 6 Apr 2004 10:51:42 -0000 1.4 --- NHibernate.DomainModel-1.1.csproj 6 Apr 2004 12:56:38 -0000 1.5 *************** *** 122,125 **** --- 122,129 ---- /> <File + RelPath = "Baz.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "C1.cs" SubType = "Code" *************** *** 155,158 **** --- 159,166 ---- /> <File + RelPath = "Container.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "D.cs" SubType = "Code" *************** *** 160,163 **** --- 168,203 ---- /> <File + RelPath = "Fee.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "Fo.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "FooBar.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "Fum.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "Fumm.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "Glarch.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "Holder.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "Immutable.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "JoinedSubclass.hbm.xml" BuildAction = "EmbeddedResource" *************** *** 174,177 **** --- 214,225 ---- /> <File + RelPath = "Location.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "Many.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "NHibernate.DomainModel.build" BuildAction = "None" *************** *** 187,190 **** --- 235,242 ---- /> <File + RelPath = "One.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "Parent.cs" SubType = "Code" *************** *** 201,204 **** --- 253,260 ---- /> <File + RelPath = "Qux.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "SexType.cs" SubType = "Code" *************** *** 228,231 **** --- 284,291 ---- /> <File + RelPath = "Stuff.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "Subclass.hbm.xml" BuildAction = "EmbeddedResource" *************** *** 249,252 **** --- 309,320 ---- BuildAction = "EmbeddedResource" /> + <File + RelPath = "Vetoer.hbm.xml" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "XY.hbm.xml" + BuildAction = "EmbeddedResource" + /> </Include> </Files> --- NEW FILE: Fumm.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <class name="net.sf.hibernate.test.Fumm"> <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="date"/> </composite-id> <property name="locale"/> <one-to-one name="fum" cascade="all" constrained="true"/> </class> </hibernate-mapping> --- NEW FILE: XY.hbm.xml --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <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> Index: ABC.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/ABC.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ABC.hbm.xml 6 Apr 2004 10:51:42 -0000 1.1 --- ABC.hbm.xml 6 Apr 2004 12:56:38 -0000 1.2 *************** *** 1,29 **** ! <?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="increment"/> </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"> ! <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,30 ---- ! <?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="increment"> ! <param name="table">A</param> ! <param name="column">id</param> ! </generator> </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: Immutable.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <class name="net.sf.hibernate.test.Immutable" table="immut" mutable="false"> <jcs-cache usage="read-only"/> <id name="id" column="id_" length="64"> <generator class="uuid.hex"/> </id> <property name="foo"/> <property name="bar"/> </class> </hibernate-mapping> --- NEW FILE: One.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <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> </hibernate-mapping> --- NEW FILE: Many.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <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> --- NEW FILE: Fum.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <class name="net.sf.hibernate.test.Fum"> <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="date"/> </composite-id> <version name="lastUpdated" type="calendar"/> <property name="fum" not-null="true"/> <many-to-one name="fo"> <column name="fo_string" length="10"/> <column name="fo_short"/> <column name="fo_date"/> </many-to-one> <set name="friends"> <key> <column name="fr_string" length="10"/> <column name="fr_short"/> <column name="fr_date"/> </key> <one-to-many class="net.sf.hibernate.test.Fum"/> </set> <array name="quxArray"> <key> <column name="fum_str_" length="10"/> <column name="fum_sho_"/> <column name="fum_dat_"/> </key> <index column="i"/> <one-to-many class="net.sf.hibernate.test.Qux"/> </array> </class> </hibernate-mapping> --- NEW FILE: Container.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping 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> </hibernate-mapping> --- NEW FILE: FooBar.hbm.xml --- <?xml version="1.0"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <import class="net.sf.hibernate.test.Result"/> <import class="net.sf.hibernate.test.Named"/> <class name="net.sf.hibernate.test.Foo" table="`foos`" proxy="net.sf.hibernate.test.FooProxy" discriminator-value="F" dynamic-update="true" dynamic-insert="true"> <jcs-cache usage="nonstrict-read-write"/> <id name="key" type="string"> <column name="`foo_id`" length="36"/> <generator class="uuid.hex"> <param name="seperator">:</param> </generator> </id> <discriminator column="`$foo_subclass^`" type="character"/> <version name="version"/> <!--<version name="versionCalendar" type="calendar"/>--> <!--<timestamp name="versionTimestamp"/>--> <many-to-one name="foo" class="net.sf.hibernate.test.Foo"> <column name="foo" length="36" index="fbmtoidx"/> </many-to-one> <property name="long"> <column name="long_" index="fbmtoidx" unique-key="abc" not-null="true"/> </property> <property name="integer"> <column name="`@@##integer_ *`" unique-key="abc" not-null="true"/> </property> <property name="float"> <column name="float_" unique-key="abc" not-null="true"/> </property> <property name="x"/> <property name="double" column="double_"/> <primitive-array name="bytes" table="foobytes"> <key column="id"/> <index column="i"/> <element column="byte_" type="byte"/> </primitive-array> <property name="date" type="date" column="date_"/> <property name="timestamp" type="timestamp" column="timestamp_"/> <property name="boolean" column="boolean_"/> <property name="bool" column="bool_"/> <property name="null" column="null_"/> <property name="short" column="short_"/> <property name="char" column="char_"/> <property name="zero" column="zero_"/> <property name="int" column="int_"/> <property name="string"> <column name="string_" length="48" index="fbstridx"/> </property> <property name="byte" column="byte_"/> <property name="yesno" type="yes_no"/> <property name="blob" type="net.sf.hibernate.test.Foo$Struct" column="blobb_"/> <property name="nullBlob" type="serializable"/> <property name="status" column="`status_@###`"/> <property name="binary" column="bin_"/> <property name="locale" column="`localeayzabc123!@#$`"/> <property name="formula" formula="1/2 * int_"/> <property name="custom" type="net.sf.hibernate.test.DoubleStringType"> <column name="first_name" length="66"/> <column name="surname" length="66"/> </property> <many-to-one name="dependent" class="net.sf.hibernate.test.Fee" cascade="all" not-null="true"/> <component name="component"> <property name="count" column="count_" type="int" not-null="true"/> <property name="name"> <column name="name_" length="32" not-null="true"/> </property> <many-to-one name="glarch" column="g__" cascade="all" class="net.sf.hibernate.test.Glarch" outer-join="true"/> <property name="null" column="cmpnt_null_"/> <component name="subcomponent"> <property name="count" column="subcount"/> <property name="name" column="subname"/> <array name="importantDates" table="foo_times"> <key column="foo_id"/> <index column="i"/> <element column="date_" type="time"/> </array> <many-to-one name="fee" column="fee_sub" cascade="all" class="net.sf.hibernate.test.Fee" outer-join="false"/> </component> <array name="importantDates" table="foo_dates"> <key column="foo_id"/> <index column="i"/> <element column="date_" type="date"/> </array> </component> <component name="nullComponent"> <property name="name" column="null_cmpnt_"/> </component> <subclass name="net.sf.hibernate.test.Trivial" proxy="net.sf.hibernate.test.FooProxy" discriminator-value="T"/> <subclass name="net.sf.hibernate.test.Abstract" proxy="net.sf.hibernate.test.AbstractProxy" discriminator-value="null"> <set name="abstracts"> <key column="abstract_id"/> <one-to-many class="net.sf.hibernate.test.Abstract"/> </set> <property name="time" column="the_time"/> <subclass name="net.sf.hibernate.test.Bar" proxy="net.sf.hibernate.test.BarProxy" 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="net.sf.hibernate.test.FooComponent"> <parent name="parent"/> <property name="count" column="bar_count"/> <property name="name" length="64"/> <array name ="importantDates"> <key column="id" /> <index column="i"/> <element column="date_" type="date"/> </array> </component> <any name="object" id-type="long" cascade="all"> <column name="clazz" length="100"/> <column name="gen_id"/> </any> </subclass> </subclass> </class> </hibernate-mapping> --- NEW FILE: Vetoer.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <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> --- NEW FILE: Baz.hbm.xml --- <?xml version="1.0"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="net.sf.hibernate.test.Baz" 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"/> <property name="name" column="name_b"/> <many-to-one name="foo" outer-join="true" class="net.sf.hibernate.test.Foo"/> <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="int"/> </primitive-array> <set name="fooSet" lazy="true" order-by="string_"> <key> <column name="baz_id" length="16"/> </key> <one-to-many class="net.sf.hibernate.test.Foo"/> </set> <array name="components" table="bazcomponents"> <key> <column name="baz_id" length="16"/> </key> <index column="i"/> <composite-element class="net.sf.hibernate.test.FooComponent"> <parent name="baz"/> <property name="name"> <column name="name" length="56"/> </property> <property name="count" column="count_"/> <nested-composite-element name="subcomponent" class="net.sf.hibernate.test.FooComponent"> <property name="name" column="x_"/> <property name="count" column="y_"/> </nested-composite-element> </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="net.sf.hibernate.test.Foo"/> <many-to-many column="glarch_id" class="net.sf.hibernate.test.Glarch"/> </map> <map name="fooComponentToFoo"> <jcs-cache usage="read-write"/> <key> <column name="baz_id" length="16"/> </key> <composite-index class="net.sf.hibernate.test.FooComponent"> <key-property name="name" length="32"/> <key-property name="count" column="count_"/> </composite-index> <many-to-many column="foo_id" class="net.sf.hibernate.test.Foo" outer-join="true"/> </map> <map name="glarchToFoo"> <key> <column name="gtf_baz_id" length="16"/> </key> <index-many-to-many column="gtf_foo_id" class="net.sf.hibernate.test.Foo"/> <one-to-many class="net.sf.hibernate.test.Glarch"/> </map> <set name="stringSet" lazy="true" sort="net.sf.hibernate.test.StringComparator"> <!--<jcs-cache usage="read-write"/>--> <key column="id_"/> <element column="element" type="string" not-null="true" length="32"/> </set> <map name="stringDateMap" lazy="true" sort="net.sf.hibernate.test.ReverseComparator"> <key column="id_"/> <index column="map_key" type="string" length="32"/> <element column="map_value" type="date"/> </map> <array name="fooArray" element-class="net.sf.hibernate.test.FooProxy" where="i<8"> <jcs-cache usage="read-write"/> <key column="id_"/> <index column="i"/> <many-to-many class="net.sf.hibernate.test.Foo"> <column name="foo" length="36"/> </many-to-many> </array> <bag name="fooBag" lazy="true" table="baz_foo" cascade="all-delete-orphan" inverse="false"> <key column="baz"/> <many-to-many class="net.sf.hibernate.test.Foo" column="foo" outer-join="true"/> </bag> <idbag name="idFooBag" lazy="true" table="baz_id_foo" cascade="all"> <collection-id column="pkid" type="long"> <generator class="hilo"/> </collection-id> <key column="baz"/> <many-to-many class="net.sf.hibernate.test.Foo" column="foo" outer-join="true"/> </idbag> <idbag name="byteBag" lazy="true" table="baz_byte_bag" cascade="all"> <collection-id column="pkid" type="long"> <generator class="hilo"/> </collection-id> <key column="baz"/> <element type="binary" column="bytez" not-null="true"/> </idbag> <array name="stringArray"> <key column="id_"/> <index column="i"/> <element column="name" type="string"/> </array> <list name="fees" lazy="true" cascade="all"> <key column="bazid"/> <index column="bazind"/> <one-to-many class="net.sf.hibernate.test.Fee"/> </list> <list name="customs"> <key column="id_"/> <index column="indx"/> <element type="net.sf.hibernate.test.DoubleStringType"> <column name="first_"/> <column name="second_"/> </element> </list> <list name="topComponents" table="topcomponents"> <jcs-cache usage="read-write"/> <key column="id_"/> <index column="i"/> <composite-element class="net.sf.hibernate.test.FooComponent"> <property name="name"/> <property name="count" column="count_"/> </composite-element> </list> <set name="topFoos"> <key column="idtopbar" /> <one-to-many class = "net.sf.hibernate.test.Bar"/> </set> <set name="cascadingBars" cascade="all-delete-orphan"> <key column="idtopbar" /> <one-to-many class = "net.sf.hibernate.test.Bar"/> </set> <map name="topGlarchez"> <key column="idtopglarch" /> <index column="mapkey" type="character"/> <one-to-many class = "net.sf.hibernate.test.Glarch"/> </map> <set name="cached" sort="natural" table="cached_set"> <jcs-cache usage="read-write"/> <key column="baz"/> <composite-element class="net.sf.hibernate.test.CompositeElement"> <property name="foo"/> <property name="bar"/> </composite-element> </set> <map name="cachedMap" sort="natural" table="cached_map"> <jcs-cache usage="read-write"/> <key column="baz"/> <index-many-to-many column="another_baz" class="net.sf.hibernate.test.Baz"/> <composite-element class="net.sf.hibernate.test.CompositeElement"> <property name="foo"/> <property name="bar"/> </composite-element> </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"/> <one-to-many class="net.sf.hibernate.test.Glarch"/> </map> <map name="anyToAny" lazy="true"> <key column="baz"/> <index-many-to-any id-type="long"> <column name="ind_clazz_"/> <column name="ind_id_"/> </index-many-to-any> <many-to-any id-type="long"> <column name="el_clazz_"/> <column name="el_id_"/> </many-to-any> </map> <bag name="bazez" lazy="true" order-by="name_b desc" cascade="all"> <key column="`baz id`"/> <one-to-many class="net.sf.hibernate.test.Baz"/> </bag> <set name="sortablez" sort="natural" cascade="all"> <key column="baz"/> <one-to-many class="net.sf.hibernate.test.Sortable"/> </set> <component name="collectionComponent"> <component name="nested"> <property name="str"/> <bag name="foos" cascade="all"> <key column="baz_compon_id"/> <one-to-many class="net.sf.hibernate.test.Foo"/> </bag> <bag name="floats" table="baz_floats_bag"> <key column="baz_compon_id"/> <element type="float" column="float_value"/> </bag> </component> </component> </class> <class name="net.sf.hibernate.test.Sortable"> <id name="id" unsaved-value="0"> <generator class="native"/> </id> <property name="name"/> </class> </hibernate-mapping> --- NEW FILE: Qux.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <class name="net.sf.hibernate.test.Qux" table="quux" proxy="net.sf.hibernate.test.Qux"> <!----> <id name="key" column="qux_key" unsaved-value="0"> <generator class="hilo"/> </id> <many-to-one name="foo" class="net.sf.hibernate.test.Foo"> <column name="foo" length="36"/> </many-to-one> <property name="deleted"/> <property name="loaded"/> <property name="stored"/> <property name="created"/> <property name="childKey" type="long"/> <property name="stuff"/> <set name="fums" lazy="true"> <key column="qux_id"/> <many-to-many class="net.sf.hibernate.test.Fum"> <column name="fum_string" length="10" not-null="true"/> <column name="fum_short" not-null="true"/> <column name="fum_date" not-null="true"/> </many-to-many> </set> <list name="moreFums" lazy="true"> <key column="qux_id"/> <index column="posn"/> <one-to-many class="net.sf.hibernate.test.Fum"/> </list> </class> </hibernate-mapping> --- NEW FILE: Fo.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <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="date"/> </composite-id> <version name="version" type="long"/> <property name="serial" column="serial_"/> <property name="buf"/> <property name="x"/> </class> </hibernate-mapping> --- NEW FILE: Holder.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <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> </hibernate-mapping> --- NEW FILE: Fee.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <class name="net.sf.hibernate.test.Fee" table="`the fees`"> <id type="string" name="key" column="id_" length="64" unsaved-value="null"> <generator class="uuid.hex"/> </id> <property name="fi"/> <many-to-one name="fee"/> <many-to-one name="anotherFee"/> <many-to-one name="qux" cascade="all"/> <property name="count" column="count_"/> <set name="fees"> <key column="fee_id"/> <element column="str_" type="string"/> </set> <component name="compon" update="false"> <property name="name"/> <property name="null" column="null_prop"/> </component> </class> </hibernate-mapping> --- NEW FILE: Glarch.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <class name="net.sf.hibernate.test.Glarch" table="`glarchez`" proxy="net.sf.hibernate.test.GlarchProxy" dynamic-update="true"> <!--<jcs-cache usage="read-write"/>--> <id type="string" column="tha_key" length="32"> <generator class="uuid.hex"/> </id> <version name="version"/> <property name="name" column="namecvbnmasdf"/> <!-- <property name="currency"/> --> <many-to-one name="next" column="next_" class="net.sf.hibernate.test.Glarch"/> <property name="order" column="order_"/> <dynabean name="dynaBean" dynaclass="foo"> <property name="foo" type="string"/> <property name="bar" type="integer"/> </dynabean> <property name="x"/> <list name="strings"> <key column="glarch_key"/> <index column="`!@# i`"/> <element type="string" column="`tha_stryng`"/> </list> <list name="fooComponents" lazy="true" cascade="all"> <key column="glarch_key"/> <index column="tha_indecks"/> <composite-element class="net.sf.hibernate.test.FooComponent"> <property name="name" column="name_"/> <property name="count" column="count_"/> <nested-composite-element name="subcomponent" class="net.sf.hibernate.test.FooComponent"> <property name="name" column="x_"/> <property name="count" column="y_"/> </nested-composite-element> <many-to-one name="fee" cascade="all" outer-join="true"/> </composite-element> </list> <array name="proxyArray" element-class="net.sf.hibernate.test.GlarchProxy"> <key column="array_key"/> <index column="array_indecks"/> <one-to-many class="net.sf.hibernate.test.Glarch"/> </array> <set name="proxySet"> <key column="set_key"/> <one-to-many class="net.sf.hibernate.test.Glarch"/> </set> <property name="immutable" update="false"/> <property name="derivedVersion" insert="false" update="false" column="version"/> <property name="any" type="object"> <column name="`any_id of object`"/> <column name="`any_class of object`"/> </property> <property name="multiple" type="net.sf.hibernate.test.MultiplicityType"> <column name="count_"/> <column name="glarch_"/> </property> </class> </hibernate-mapping> |
From: Peter S. <sz...@us...> - 2004-04-06 13:09:27
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10408/NHibernate.Test Modified Files: NHibernate.Test-1.1.csproj TestCase.cs Added Files: ABCTest.cs FooBarTest.cs Log Message: Another fix on incrementgenerator, a new TC in ABCTest, and the original hbms for some new tests. Testcase is going to be extended with executestatement for some nasty tricks in tests (deleting table/row, etc) --- NEW FILE: FooBarTest.cs --- using System; using NUnit.Framework; using NHibernate; using NHibernate.DomainModel; using System.Collections; namespace NHibernate.Test { [TestFixture] public class FooBarTest : TestCase { [SetUp] public void SetUp() { 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", "XY.hbm.xml"}); } [Test] [Ignore("Maps haven't been converted yet")] public void FetchInitializedCollection() { ISession s = sessions.OpenSession(); /* Baz baz = new Baz(); ICollection fooBag = new ArrayList(); fooBag.add( new Foo() ); fooBag.add( new Foo() ); baz.setFooBag(fooBag); s.save(baz); fooBag = baz.getFooBag(); s.Find("from Baz baz left join fetch baz.fooBag"); Assert.IsTrue( NHibernate.IsInitialized(fooBag) ); Assert.IsTrue( fooBag==baz.getFooBag() ); Assert.IsTrue( baz.getFooBag().size()==2 ); s.Close(); s = sessions.OpenSession(); baz = (Baz) s.load( typeof(Baz), baz.getCode() ); Object bag = baz.getFooBag(); Assert.IsFalse( NHibernate.IsInitialized(bag) ); s.Find("from Baz baz left join fetch baz.fooBag"); Assert.IsFalse( NHibernate.IsInitialized(bag) ); Assert.IsTrue( bag==baz.getFooBag() ); Assert.IsTrue( baz.getFooBag().size()==2 ); s.Delete(baz); s.Flush();*/ s.Close(); } } } Index: TestCase.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TestCase.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestCase.cs 22 Mar 2004 04:42:22 -0000 1.2 --- TestCase.cs 6 Apr 2004 12:56:39 -0000 1.3 *************** *** 1,4 **** --- 1,6 ---- using System; using System.Reflection; + using System.Data; + using System.Data.SqlClient; using NHibernate.DomainModel; *************** *** 36,41 **** } ! ! } } --- 38,45 ---- } ! public void ExecuteStatement(string sql) ! { ! SqlConnection conn = new SqlConnection(""); ! } } } --- NEW FILE: ABCTest.cs --- using System; using NUnit.Framework; using NHibernate; using NHibernate.DomainModel; using System.Collections; namespace NHibernate.Test { /// <summary> /// Summary description for ABCTest. /// </summary> [TestFixture] public class ABCTest : TestCase { [SetUp] public void SetUp() { ExportSchema(new string[] { "ABC.hbm.xml"}); } [Test] public void Subclassing() { ISession s = sessions.OpenSession(); ITransaction t = s.BeginTransaction(); C1 c1 = new C1(); 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); Assert.IsTrue( s.Find("from c in class C2 where 1=1 or 1=1").Count ==0 ); t.Commit(); s.Close(); 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(); s.Close(); 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(); s.Close(); 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(); s.Close(); s = sessions.OpenSession(); t = s.BeginTransaction(); s.Find("from b in class B"); t.Commit(); s.Close(); } } } Index: NHibernate.Test-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHibernate.Test-1.1.csproj,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** NHibernate.Test-1.1.csproj 6 Apr 2004 10:51:42 -0000 1.10 --- NHibernate.Test-1.1.csproj 6 Apr 2004 12:56:39 -0000 1.11 *************** *** 121,124 **** --- 121,129 ---- /> <File + RelPath = "ABCTest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "App.config" BuildAction = "None" *************** *** 145,148 **** --- 150,158 ---- /> <File + RelPath = "FooBarTest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "JoinedSubclassTest.cs" SubType = "Code" |
From: Peter S. <sz...@us...> - 2004-04-06 13:09:26
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Id In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10408/NHibernate/Id Modified Files: IncrementGenerator.cs Log Message: Another fix on incrementgenerator, a new TC in ABCTest, and the original hbms for some new tests. Testcase is going to be extended with executestatement for some nasty tricks in tests (deleting table/row, etc) Index: IncrementGenerator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Id/IncrementGenerator.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IncrementGenerator.cs 6 Apr 2004 10:51:40 -0000 1.4 --- IncrementGenerator.cs 6 Apr 2004 12:56:38 -0000 1.5 *************** *** 91,101 **** { rs = cmd.ExecuteReader(); ! if(rs.Read()) ! { ! if (rs.IsDBNull(0)) ! next = 1; ! else ! next = rs.GetInt64(0) + 1; ! } sql = null; log.Debug("first free id: " + next); --- 91,98 ---- { rs = cmd.ExecuteReader(); ! if(rs.Read() && !rs.IsDBNull(0)) ! next = rs.GetInt64(0) + 1; ! else ! next = 1; sql = null; log.Debug("first free id: " + next); |
From: Peter S. <sz...@us...> - 2004-04-06 12:29:29
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Sql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1341/NHibernate/Sql Modified Files: InFragment.cs Log Message: Paren was in wrong direction in tofragmentstring. Index: InFragment.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Sql/InFragment.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InFragment.cs 18 Apr 2003 13:59:19 -0000 1.2 --- InFragment.cs 6 Apr 2004 12:16:41 -0000 1.3 *************** *** 46,50 **** .Insert(0, columnName) .Insert(0, StringHelper.OpenParen) ! .Append(StringHelper.OpenParen); } else { string value = values[0] as string; --- 46,50 ---- .Insert(0, columnName) .Insert(0, StringHelper.OpenParen) ! .Append(StringHelper.ClosedParen); } else { string value = values[0] as string; |
From: Peter S. <sz...@us...> - 2004-04-06 11:05:49
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19190/NHibernate/Util Modified Files: ReflectHelper.cs Log Message: This hack is no more needed. Index: ReflectHelper.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/ReflectHelper.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ReflectHelper.cs 6 Apr 2004 10:51:41 -0000 1.7 --- ReflectHelper.cs 6 Apr 2004 10:53:01 -0000 1.8 *************** *** 89,93 **** //PropertyInfo property = type.GetProperty(propertyName); ! PropertyInfo property = type.GetProperty(propertyName, BindingFlags.IgnoreCase|BindingFlags.Instance|BindingFlags.Public|BindingFlags.NonPublic); if (property != null) { --- 89,93 ---- //PropertyInfo property = type.GetProperty(propertyName); ! PropertyInfo property = type.GetProperty(propertyName, BindingFlags.Instance|BindingFlags.Public|BindingFlags.NonPublic); if (property != null) { *************** *** 115,119 **** //PropertyInfo property = type.GetProperty(propertyName); ! PropertyInfo property = type.GetProperty(propertyName, BindingFlags.IgnoreCase|BindingFlags.Instance|BindingFlags.Public|BindingFlags.NonPublic); if (property != null) { --- 115,119 ---- //PropertyInfo property = type.GetProperty(propertyName); ! PropertyInfo property = type.GetProperty(propertyName, BindingFlags.Instance|BindingFlags.Public|BindingFlags.NonPublic); if (property != null) { |