Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30227 Modified Files: Bar.cs Baz.cs Fee.cs Fee.hbm.xml Foo.cs FooBar.hbm.xml FooProxy.cs Qux.cs Qux.hbm.xml Stuff.cs Log Message: Modified Properties to use .net naming conventions. Index: FooBar.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FooBar.hbm.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FooBar.hbm.xml 24 Jun 2004 15:22:07 -0000 1.7 --- FooBar.hbm.xml 29 Jun 2004 14:26:27 -0000 1.8 *************** *** 16,20 **** <jcs-cache usage="nonstrict-read-write"/> ! <id name="key" type="String"> <column name="`foo_id`" length="36"/> <generator class="uuid.hex"> --- 16,20 ---- <jcs-cache usage="nonstrict-read-write"/> ! <id name="Key" type="String"> <column name="`foo_id`" length="36"/> <generator class="uuid.hex"> *************** *** 23,45 **** </id> <discriminator column="`$foo_subclass^`" type="Char"/> ! <version name="version"/> <!--<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> ! <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"/> --- 23,45 ---- </id> <discriminator column="`$foo_subclass^`" type="Char"/> ! <version name="Version"/> <!--<version name="versionCalendar" type="calendar"/>--> <!--<timestamp name="versionTimestamp"/>--> ! <many-to-one name="TheFoo" class="NHibernate.DomainModel.Foo, NHibernate.DomainModel"> <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"/> *************** *** 47,79 **** </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_"/> <property name="NullInt32" 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" /> ! <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!@#$`"/> ! <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" --- 47,79 ---- </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_"/> <property name="NullInt32" 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" /> ! <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!@#$`"/> ! <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" *************** *** 141,145 **** </component> ! <component name="nullComponent"> <property name="Name" column="null_cmpnt_"/> </component> --- 141,145 ---- </component> ! <component name="NullComponent"> <property name="Name" column="null_cmpnt_"/> </component> Index: Bar.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Bar.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Bar.cs 3 Jun 2004 18:01:24 -0000 1.3 --- Bar.cs 29 Jun 2004 14:26:27 -0000 1.4 *************** *** 17,21 **** /// Gets or sets the X /// </summary> ! public int X { get { return _x; } --- 17,21 ---- /// Gets or sets the X /// </summary> ! public override int X { get { return _x; } Index: Baz.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Baz.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Baz.cs 8 Jun 2004 11:46:06 -0000 1.8 --- Baz.cs 29 Jun 2004 14:26:27 -0000 1.9 *************** *** 162,173 **** public System.Collections.IList Fees { ! get ! { ! return this._fees; ! } ! set ! { ! this._fees = value; ! } } --- 162,167 ---- public System.Collections.IList Fees { ! get { return _fees; } ! set { _fees = value; } } Index: Fee.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Fee.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Fee.cs 9 Apr 2004 13:14:53 -0000 1.2 --- Fee.cs 29 Jun 2004 14:26:27 -0000 1.3 *************** *** 20,116 **** } ! 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; ! } } } --- 20,68 ---- } ! public Fee TheFee { ! get { return _fee; } ! set { _fee = value; } ! } ! public string Fi { ! get { return _fi; } ! set { _fi = value; } } ! ! public string Key { ! get { return _key; } ! set { this._key = value; } } ! public System.Collections.IDictionary Fees { ! get { return _fees; } ! set { _fees = value; } } ! public Fee AnotherFee { ! get { return _anotherFee; } ! set { _anotherFee = value; } } ! public Qux Qux { ! get { return _qux; } ! set { _qux = value; } } ! public FooComponent Compon { ! get { return _compon; } ! set { _compon = value; } } ! public int Count { ! get { return _count; } ! set { _count = value; } } } Index: Foo.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Foo.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Foo.cs 24 Jun 2004 15:22:07 -0000 1.8 --- Foo.cs 29 Jun 2004 14:26:27 -0000 1.9 *************** *** 24,28 **** { [Serializable] ! public class Struct { public string name; --- 24,28 ---- { [Serializable] ! public class Struct { [...1044 lines suppressed...] //&& ( ( this._timestamp==other._timestamp) || ( this._timestamp.getDate() == other._timestamp.getDate() && this._timestamp.getYear() == other._timestamp.getYear() && this._timestamp.getMonth() == other._timestamp.getMonth() ) ) ! && ( _zero == other._zero ) ! && ( ( _foo == other._foo ) || ( _foo.Key.Equals( other._foo.Key ) ) ) ! && ( ( _blob == other.Blob ) || ( _blob.Equals(other.Blob) ) ) ! && ( _yesno == other.YesNo ) ! && ( _status == other.Status ) ! && ( ( _binary == other.Binary ) || _binary.Equals(other.Binary)) ! && ( _key.Equals(other.Key) ) ! && ( _locale.Equals(other.Locale) ) ! && ( ( _custom == other.Custom ) || ( _custom[0].Equals(other.Custom[0]) && _custom[1].Equals(other.Custom[1]) ) ); } + // public override int GetHashCode() // { // return key.GetHashCode() - _string.GetHashCode(); // } ! ! private static int count=0; Index: Fee.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Fee.hbm.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Fee.hbm.xml 24 Jun 2004 15:22:07 -0000 1.4 --- Fee.hbm.xml 29 Jun 2004 14:26:27 -0000 1.5 *************** *** 2,18 **** <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="NHibernate.DomainModel.Fee, NHibernate.DomainModel" 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="NullString" column="null_prop" /> --- 2,18 ---- <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="NHibernate.DomainModel.Fee, NHibernate.DomainModel" 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="TheFee" /> ! <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="NullString" column="null_prop" /> Index: Qux.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Qux.hbm.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Qux.hbm.xml 9 Apr 2004 13:14:53 -0000 1.3 --- Qux.hbm.xml 29 Jun 2004 14:26:27 -0000 1.4 *************** *** 2,9 **** <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="NHibernate.DomainModel.Qux, NHibernate.DomainModel" table="quux" proxy="NHibernate.DomainModel.Qux, NHibernate.DomainModel"> ! <id name="key" column="qux_key" unsaved-value="0"> <generator class="hilo" /> </id> ! <many-to-one name="foo" class="NHibernate.DomainModel.Foo, NHibernate.DomainModel"> <column name="foo" length="36" /> </many-to-one> --- 2,9 ---- <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="NHibernate.DomainModel.Qux, NHibernate.DomainModel" table="quux" proxy="NHibernate.DomainModel.Qux, NHibernate.DomainModel"> ! <id name="Key" column="qux_key" unsaved-value="0"> <generator class="hilo" /> </id> ! <many-to-one name="Foo" class="NHibernate.DomainModel.Foo, NHibernate.DomainModel"> <column name="foo" length="36" /> </many-to-one> Index: FooProxy.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FooProxy.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FooProxy.cs 24 Jun 2004 15:22:07 -0000 1.3 --- FooProxy.cs 29 Jun 2004 14:26:27 -0000 1.4 *************** *** 7,21 **** public interface FooProxy { ! FooComponent nullComponent { get; set; } ! FooComponent component { get; set; } ! string[] custom { get; --- 7,21 ---- public interface FooProxy { ! FooComponent NullComponent { get; set; } ! FooComponent Component { get; set; } ! string[] Custom { get; *************** *** 23,27 **** } ! byte[] binary { get; --- 23,27 ---- } ! byte[] Binary { get; *************** *** 29,33 **** } ! FooStatus status { get; --- 29,33 ---- } ! FooStatus Status { get; *************** *** 35,39 **** } ! object nullBlob { get; --- 35,39 ---- } ! object NullBlob { get; *************** *** 41,45 **** } ! Foo.Struct blob { get; --- 41,45 ---- } ! Foo.Struct Blob { get; *************** *** 47,51 **** } ! bool yesno { get; --- 47,51 ---- } ! bool YesNo { get; *************** *** 53,59 **** } ! void disconnect(); ! Byte @byte { get; --- 53,59 ---- } ! void Disconnect(); ! byte Byte { get; *************** *** 67,71 **** } ! int @int { get; --- 67,71 ---- } ! int Int { get; *************** *** 73,77 **** } ! bool @bool { get; --- 73,77 ---- } ! bool Bool { get; *************** *** 79,83 **** } ! float zero { get; --- 79,83 ---- } ! float Zero { get; *************** *** 85,89 **** } ! byte[] bytes { get; --- 85,89 ---- } ! byte[] Bytes { get; *************** *** 91,95 **** } ! bool boolean { get; --- 91,95 ---- } ! bool Boolean { get; *************** *** 97,101 **** } ! double @double { get; --- 97,101 ---- } ! double Double { get; *************** *** 103,107 **** } ! float @float { get; --- 103,107 ---- } ! float Float { get; *************** *** 109,113 **** } ! short @short { get; --- 109,113 ---- } ! short Short { get; *************** *** 115,119 **** } ! char @char { get; --- 115,119 ---- } ! char Char { get; *************** *** 121,125 **** } ! long @long { get; --- 121,125 ---- } ! long Long { get; *************** *** 127,131 **** } ! int @integer { get; --- 127,131 ---- } ! int Integer { get; *************** *** 133,137 **** } ! DateTime timestamp { get; --- 133,137 ---- } ! DateTime Timestamp { get; *************** *** 139,143 **** } ! DateTime date { get; --- 139,143 ---- } ! DateTime Date { get; *************** *** 145,149 **** } ! String @string { get; --- 145,149 ---- } ! string String { get; *************** *** 151,155 **** } ! FooProxy foo { get; --- 151,155 ---- } ! FooProxy TheFoo { get; *************** *** 157,161 **** } ! String key { get; --- 157,161 ---- } ! String Key { get; Index: Qux.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Qux.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Qux.cs 3 Jun 2004 13:31:52 -0000 1.2 --- Qux.cs 29 Jun 2004 14:26:27 -0000 1.3 *************** *** 24,29 **** try { ! foo = new Foo(); ! session.Save(foo); } catch (Exception e) --- 24,29 ---- try { ! Foo = new Foo(); ! session.Save(Foo); } catch (Exception e) *************** *** 31,35 **** throw new CallbackException(e); } ! foo.@string = "child of a qux"; return LifecycleVeto.NoVeto; } --- 31,35 ---- throw new CallbackException(e); } ! Foo.String = "child of a qux"; return LifecycleVeto.NoVeto; } *************** *** 40,44 **** try { ! session.Delete(foo); } catch (Exception e) --- 40,44 ---- try { ! session.Delete(Foo); } catch (Exception e) *************** *** 75,88 **** /// Gets or sets the _foo /// </summary> ! public FooProxy foo { ! get ! { ! return _foo; ! } ! set ! { ! _foo = value; ! } } --- 75,82 ---- /// Gets or sets the _foo /// </summary> ! public FooProxy Foo { ! get { return _foo; } ! set { _foo = value; } } *************** *** 173,186 **** /// Gets or sets the _key /// </summary> ! public long key { ! get ! { ! return _key; ! } ! set ! { ! _key = value; ! } } --- 167,174 ---- /// Gets or sets the _key /// </summary> ! public long Key { ! get { return _key; } ! set { _key = value; } } *************** *** 190,194 **** set { ! this.key = value; } } --- 178,182 ---- set { ! _key = value; } } *************** *** 260,264 **** { stored=true; ! this.childKey = child==null ? 0 : child.key; if (childKey!=0 && child==null) child = (Qux) session.Load(typeof(Qux), childKey); return _child; --- 248,252 ---- { stored=true; ! this.childKey = child==null ? 0 : child.Key; if (childKey!=0 && child==null) child = (Qux) session.Load(typeof(Qux), childKey); return _child; Index: Stuff.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Stuff.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Stuff.cs 3 Jun 2004 13:31:52 -0000 1.1 --- Stuff.cs 29 Jun 2004 14:26:27 -0000 1.2 *************** *** 41,45 **** if(rhs==null) return false; ! return rhs.Id.Equals(this.Id) && rhs.Foo.key.Equals(_foo.key) && rhs.MoreStuff.Equals(_moreStuff) ; } --- 41,45 ---- if(rhs==null) return false; ! return rhs.Id.Equals(this.Id) && rhs.Foo.Key.Equals(_foo.Key) && rhs.MoreStuff.Equals(_moreStuff) ; } |