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-08-09 03:34:36
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11177 Modified Files: NHibernate-1.1.csproj Log Message: Added 2 classes to csproj. Index: NHibernate-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/NHibernate-1.1.csproj,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** NHibernate-1.1.csproj 2 Aug 2004 04:30:35 -0000 1.33 --- NHibernate-1.1.csproj 9 Aug 2004 03:34:27 -0000 1.34 *************** *** 1024,1027 **** --- 1024,1032 ---- /> <File + RelPath = "Impl\SessionFactoryObjectFactory.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Impl\SessionImpl.cs" SubType = "Code" *************** *** 1309,1312 **** --- 1314,1322 ---- /> <File + RelPath = "Persister\PersisterFactory.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Proxy\HibernateProxy.cs" SubType = "Code" |
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11076/SqlTypes Modified Files: AnsiStringFixedLengthSqlType.cs AnsiStringSqlType.cs BinarySqlType.cs BooleanSqlType.cs ByteSqlType.cs CurrencySqlType.cs DateSqlType.cs DateTimeSqlType.cs DecimalSqlType.cs DoubleSqlType.cs GuidSqlType.cs Int16SqlType.cs Int32SqlType.cs Int64SqlType.cs SingleSqlType.cs SqlType.cs SqlTypeFactory.cs StringFixedLengthSqlType.cs StringSqlType.cs TimeSqlType.cs Log Message: Added [Serializable] to classes. Index: DecimalSqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/DecimalSqlType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DecimalSqlType.cs 19 Jul 2004 03:07:04 -0000 1.2 --- DecimalSqlType.cs 9 Aug 2004 03:33:54 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- /// Summary description for DecimalSqlType. /// </summary> + [Serializable] public class DecimalSqlType : SqlType { Index: AnsiStringFixedLengthSqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/AnsiStringFixedLengthSqlType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AnsiStringFixedLengthSqlType.cs 19 Jul 2004 03:07:04 -0000 1.2 --- AnsiStringFixedLengthSqlType.cs 9 Aug 2004 03:33:54 -0000 1.3 *************** *** 7,18 **** /// Summary description for AnsiStringFixedLengthSqlType. /// </summary> public class AnsiStringFixedLengthSqlType : SqlType { ! public AnsiStringFixedLengthSqlType() ! : base(DbType.AnsiStringFixedLength) { } ! public AnsiStringFixedLengthSqlType(int length) : base(DbType.AnsiStringFixedLength, length) { } --- 7,19 ---- /// Summary description for AnsiStringFixedLengthSqlType. /// </summary> + [Serializable] public class AnsiStringFixedLengthSqlType : SqlType { ! public AnsiStringFixedLengthSqlType() : base(DbType.AnsiStringFixedLength) { } ! public AnsiStringFixedLengthSqlType(int length) : base(DbType.AnsiStringFixedLength, length) ! { } Index: AnsiStringSqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/AnsiStringSqlType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AnsiStringSqlType.cs 19 Jul 2004 03:07:04 -0000 1.2 --- AnsiStringSqlType.cs 9 Aug 2004 03:33:54 -0000 1.3 *************** *** 8,11 **** --- 8,12 ---- /// Summary description for AnsiStringSqlType. /// </summary> + [Serializable] public class AnsiStringSqlType : SqlType { *************** *** 16,21 **** { } - - } } --- 17,20 ---- Index: StringSqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/StringSqlType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StringSqlType.cs 19 Jul 2004 03:07:04 -0000 1.2 --- StringSqlType.cs 9 Aug 2004 03:33:54 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- /// Summary description for StringSqlType. /// </summary> + [Serializable] public class StringSqlType : SqlType { Index: TimeSqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/TimeSqlType.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TimeSqlType.cs 18 Mar 2004 14:58:56 -0000 1.1 --- TimeSqlType.cs 9 Aug 2004 03:33:54 -0000 1.2 *************** *** 7,10 **** --- 7,11 ---- /// Summary description for TimeSqlType. /// </summary> + [Serializable] public class TimeSqlType : SqlType { Index: Int64SqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/Int64SqlType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Int64SqlType.cs 19 Jul 2004 03:07:04 -0000 1.2 --- Int64SqlType.cs 9 Aug 2004 03:33:54 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- /// Summary description for Int64SqlType. /// </summary> + [Serializable] public class Int64SqlType : SqlType { Index: SqlTypeFactory.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/SqlTypeFactory.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SqlTypeFactory.cs 19 Jul 2004 03:07:04 -0000 1.6 --- SqlTypeFactory.cs 9 Aug 2004 03:33:54 -0000 1.7 *************** *** 7,10 **** --- 7,11 ---- /// SqlTypeFactory provides Singleton access to the SqlTypes. /// </summary> + [Serializable] public class SqlTypeFactory { Index: ByteSqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/ByteSqlType.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ByteSqlType.cs 10 Feb 2004 18:40:14 -0000 1.1 --- ByteSqlType.cs 9 Aug 2004 03:33:54 -0000 1.2 *************** *** 7,10 **** --- 7,11 ---- /// Summary description for ByteSqlType. /// </summary> + [Serializable] public class ByteSqlType : SqlType { Index: BooleanSqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/BooleanSqlType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BooleanSqlType.cs 19 Jul 2004 03:07:04 -0000 1.2 --- BooleanSqlType.cs 9 Aug 2004 03:33:54 -0000 1.3 *************** *** 7,13 **** /// Summary description for BooleanSqlType. /// </summary> public class BooleanSqlType : SqlType { - public BooleanSqlType() : base(DbType.Boolean) { --- 7,13 ---- /// Summary description for BooleanSqlType. /// </summary> + [Serializable] public class BooleanSqlType : SqlType { public BooleanSqlType() : base(DbType.Boolean) { Index: DateSqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/DateSqlType.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DateSqlType.cs 15 Mar 2004 16:06:49 -0000 1.1 --- DateSqlType.cs 9 Aug 2004 03:33:54 -0000 1.2 *************** *** 7,10 **** --- 7,11 ---- /// Summary description for DateSqlType. /// </summary> + [Serializable] public class DateSqlType : SqlType { Index: CurrencySqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/CurrencySqlType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CurrencySqlType.cs 19 Jul 2004 03:07:04 -0000 1.2 --- CurrencySqlType.cs 9 Aug 2004 03:33:54 -0000 1.3 *************** *** 11,14 **** --- 11,15 ---- /// is no advantage to using it. /// </summary> + [Serializable] public class CurrencySqlType : SqlType { Index: StringFixedLengthSqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/StringFixedLengthSqlType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StringFixedLengthSqlType.cs 19 Jul 2004 03:07:04 -0000 1.2 --- StringFixedLengthSqlType.cs 9 Aug 2004 03:33:54 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- /// Summary description for StringFixedLengthSqlType. /// </summary> + [Serializable] public class StringFixedLengthSqlType : SqlType { Index: DoubleSqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/DoubleSqlType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DoubleSqlType.cs 19 Jul 2004 03:07:04 -0000 1.2 --- DoubleSqlType.cs 9 Aug 2004 03:33:54 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- /// Summary description for DoubleSqlType. /// </summary> + [Serializable] public class DoubleSqlType : SqlType { Index: Int16SqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/Int16SqlType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Int16SqlType.cs 19 Jul 2004 03:07:04 -0000 1.2 --- Int16SqlType.cs 9 Aug 2004 03:33:54 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- /// Summary description for Int16SqlType. /// </summary> + [Serializable] public class Int16SqlType : SqlType { Index: Int32SqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/Int32SqlType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Int32SqlType.cs 19 Jul 2004 03:07:04 -0000 1.2 --- Int32SqlType.cs 9 Aug 2004 03:33:54 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- /// Summary description for Int32SqlType. /// </summary> + [Serializable] public class Int32SqlType : SqlType { Index: SingleSqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/SingleSqlType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SingleSqlType.cs 19 Jul 2004 03:07:04 -0000 1.2 --- SingleSqlType.cs 9 Aug 2004 03:33:54 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- /// Summary description for SingleSqlType. /// </summary> + [Serializable] public class SingleSqlType : SqlType { Index: DateTimeSqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/DateTimeSqlType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DateTimeSqlType.cs 19 Jul 2004 03:07:04 -0000 1.3 --- DateTimeSqlType.cs 9 Aug 2004 03:33:54 -0000 1.4 *************** *** 7,10 **** --- 7,11 ---- /// Summary description for DateTimeSqlType. /// </summary> + [Serializable] public class DateTimeSqlType : SqlType { Index: BinarySqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/BinarySqlType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BinarySqlType.cs 19 Jul 2004 03:07:04 -0000 1.2 --- BinarySqlType.cs 9 Aug 2004 03:33:54 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- /// Summary description for BinarySqlType. /// </summary> + [Serializable] public class BinarySqlType : SqlType { Index: GuidSqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/GuidSqlType.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GuidSqlType.cs 18 Mar 2004 14:58:56 -0000 1.1 --- GuidSqlType.cs 9 Aug 2004 03:33:54 -0000 1.2 *************** *** 8,11 **** --- 8,12 ---- /// Summary description for GuidSqlType. /// </summary> + [Serializable] public class GuidSqlType : SqlType { Index: SqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/SqlType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SqlType.cs 19 Jul 2004 03:07:04 -0000 1.2 --- SqlType.cs 9 Aug 2004 03:33:54 -0000 1.3 *************** *** 12,18 **** /// objects to the sql string when using SchemaExport. /// </summary> public abstract class SqlType { - protected DbType dbType; protected int length; --- 12,18 ---- /// objects to the sql string when using SchemaExport. /// </summary> + [Serializable] public abstract class SqlType { protected DbType dbType; protected int length; |
From: Michael D. <mik...@us...> - 2004-08-09 03:26:16
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10133/Impl Modified Files: SessionFactoryImpl.cs SessionImpl.cs Added Files: SessionFactoryObjectFactory.cs Log Message: Added [Serializable] and code required to make them serializable to classes. Also synched up some more with h2.0.3. Index: SessionImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/SessionImpl.cs,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** SessionImpl.cs 6 Aug 2004 15:34:57 -0000 1.36 --- SessionImpl.cs 9 Aug 2004 03:25:55 -0000 1.37 *************** *** 194,198 **** /// </remarks> [Serializable] ! internal class SessionImpl : ISessionImplementor { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(SessionImpl)); --- 194,198 ---- /// </remarks> [Serializable] ! internal class SessionImpl : ISessionImplementor, ISerializable, IDeserializationCallback { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(SessionImpl)); *************** *** 211,217 **** private IDictionary proxiesByKey; //key=Key, value=HibernateProxy ! [NonSerialized] private IdentityMap entries;//key=Object, value=Entry ! [NonSerialized] private IdentityMap arrayHolders; //key=array, value=ArrayHolder ! [NonSerialized] private IdentityMap collections; //key=PersistentCollection, value=CollectionEntry private IDictionary nullifiables = new Hashtable(); //set of Keys of deleted objects --- 211,218 ---- private IDictionary proxiesByKey; //key=Key, value=HibernateProxy ! //IdentityMaps are serializable in NH ! private IdentityMap entries;//key=Object, value=Entry ! private IdentityMap arrayHolders; //key=array, value=ArrayHolder ! private IdentityMap collections; //key=PersistentCollection, value=CollectionEntry private IDictionary nullifiables = new Hashtable(); //set of Keys of deleted objects *************** *** 240,244 **** // (discarding them at the end of a "shortcircuited" auto-flush) and then // we would keep them in a list - //[NonSerialized] private IDictionary updates; [NonSerialized] private ArrayList updates; // Actually the semantics of the next three are really "Bag" --- 241,244 ---- *************** *** 257,264 **** [NonSerialized] private IBatcher batcher; ! // For serialization ! [NonSerialized] private SerializationInfo siInfo; ! ! private IPreparer preparer; --- 257,261 ---- [NonSerialized] private IBatcher batcher; ! [NonSerialized] private IPreparer preparer; *************** *** 531,542 **** } } ! SessionImpl(SerializationInfo info, StreamingContext context) { ! //The graph is not valid until OnDeserialization() has been called. ! siInfo = info; } ! public void GetObjectData(SerializationInfo info, StreamingContext context) { if ( IsConnected ) throw new InvalidOperationException("Cannot serialize a Session while connected"); --- 528,575 ---- } } + + + #region System.Runtime.Serialization.ISerializable Members ! /// <summary> ! /// Constructor used to recreate the Session during the deserialization. ! /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> ! /// <remarks> ! /// This is needed because we have to do some checking before the serialization process ! /// begins. I don't know how to add logic in ISerializable.GetObjectData and have .net ! /// write all of the serializable fields out. ! /// </remarks> ! protected SessionImpl(SerializationInfo info, StreamingContext context) { ! this.factory = (SessionFactoryImpl)info.GetValue( "factory", typeof(SessionFactoryImpl) ); ! this.autoClose = info.GetBoolean("autoClose"); ! this.timestamp = info.GetInt64("timestamp"); ! this.closed = info.GetBoolean("closed"); ! this.flushMode = (FlushMode)info.GetValue( "flushMode", typeof(FlushMode) ); ! this.callAfterTransactionCompletionFromDisconnect = info.GetBoolean("callAfterTransactionCompletionFromDisconnect"); ! this.entitiesByKey = (IDictionary)info.GetValue( "entitiesByKey", typeof(IDictionary) ); ! this.proxiesByKey = (IDictionary)info.GetValue( "proxiesByKey", typeof(IDictionary) ); ! this.nullifiables = (IDictionary)info.GetValue( "nullifiables", typeof(IDictionary) ); ! this.interceptor = (IInterceptor)info.GetValue( "interceptor", typeof(IInterceptor) ); ! ! this.entries = (IdentityMap)info.GetValue( "entries", typeof(IdentityMap) ); ! this.collections = (IdentityMap)info.GetValue( "collections", typeof(IdentityMap) ); ! this.arrayHolders = (IdentityMap)info.GetValue( "arrayHolders", typeof(IdentityMap) ); ! } ! /// <summary> ! /// Verify the ISession can be serialized and write the fields to the Serializer. ! /// </summary> ! /// <param name="info"></param> ! /// <param name="context"></param> ! /// <remarks> ! /// The fields are marked with [NonSerializable] as just a point of reference. This method ! /// has complete control and what is serialized and those attributes are ignored. However, ! /// this method should be in synch with the attributes for easy readability. ! /// </remarks> ! void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { if ( IsConnected ) throw new InvalidOperationException("Cannot serialize a Session while connected"); *************** *** 546,560 **** log.Info("serializing session"); ! info.AddValue("entries", entries); ! info.AddValue("collections", collections); ! info.AddValue("arrayHolders", arrayHolders); } ! public void OnDeserialization(Object sender) { log.Info("deserializing session"); ! entries = (IdentityMap)siInfo.GetValue("entries", typeof(IdentityMap)); ! collections = (IdentityMap)siInfo.GetValue("collections", typeof(IdentityMap)); ! arrayHolders = (IdentityMap)siInfo.GetValue("arrayHolders", typeof(IdentityMap)); InitTransientCollections(); foreach(DictionaryEntry e in collections) --- 579,613 ---- log.Info("serializing session"); ! info.AddValue( "factory", factory, typeof(SessionFactoryImpl) ); ! info.AddValue( "autoClose", autoClose ); ! info.AddValue( "timestamp", timestamp ); ! info.AddValue( "closed", closed ); ! info.AddValue( "flushMode", flushMode ); ! info.AddValue( "callAfterTransactionCompletionFromDisconnect", callAfterTransactionCompletionFromDisconnect ); ! info.AddValue( "entitiesByKey", entitiesByKey, typeof(IDictionary) ); ! info.AddValue( "proxiesByKey", proxiesByKey, typeof(IDictionary) ); ! info.AddValue( "nullifiables", nullifiables, typeof(IDictionary) ); ! info.AddValue( "interceptor", interceptor, typeof(IInterceptor) ); ! ! info.AddValue( "entries", entries, typeof(IdentityMap) ); ! info.AddValue( "collections", collections, typeof(IdentityMap) ); ! info.AddValue( "arrayHolders", arrayHolders, typeof(IdentityMap) ); } + #endregion ! #region System.Runtime.Serialization.IDeserializationCallback Members ! ! /// <summary> ! /// Once the entire object graph has been deserialized then we can hook the ! /// collections, proxies, and entities back up to the ISession. ! /// </summary> ! /// <param name="sender"></param> ! void IDeserializationCallback.OnDeserialization(Object sender) { log.Info("deserializing session"); ! ! // don't need any section for IdentityMaps because .net does not have a problem ! // serializing them like java does. ! InitTransientCollections(); foreach(DictionaryEntry e in collections) *************** *** 573,588 **** } ! IDictionary newProxiesByKey = new Hashtable(proxiesByKey); ! foreach(object proxy in proxiesByKey) ! { ! if (proxy is HibernateProxy) ! HibernateProxyHelper.GetLazyInitializer(proxy as HibernateProxy).SetSession(this); ! else ! newProxiesByKey.Remove(proxy); ! } ! proxiesByKey = newProxiesByKey; ! newProxiesByKey = null; ! foreach(EntityEntry e in entries) { try --- 626,646 ---- } ! // TODO: figure out why proxies are having problems. The enumerator appears to be throwing ! // a null reference exception when the proxiesByKey.Count==0 ! // foreach(object proxy in proxiesByKey.Values) ! // { ! // object proxy = proxyEnumer.Current; ! // if (proxy is HibernateProxy) ! // { ! // HibernateProxyHelper.GetLazyInitializer(proxy as HibernateProxy).SetSession(this); ! // } ! // else ! // { ! // // the proxy was pruned during the serialization process ! // proxiesByKey.Remove(proxy); ! // } ! // } ! foreach(EntityEntry e in entries.Values) { try *************** *** 597,600 **** --- 655,659 ---- } } + #endregion internal SessionImpl(IDbConnection connection, SessionFactoryImpl factory, bool autoClose, long timestamp, IInterceptor interceptor) Index: SessionFactoryImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/SessionFactoryImpl.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** SessionFactoryImpl.cs 14 Jul 2004 21:24:51 -0000 1.22 --- SessionFactoryImpl.cs 9 Aug 2004 03:25:55 -0000 1.23 *************** *** 1,9 **** using System; - using System.IO; - using System.Xml; - using System.Data; using System.Collections; using System.Runtime.CompilerServices; using System.Text; using NHibernate.Cache; --- 1,10 ---- using System; using System.Collections; + using System.Data; + using System.IO; using System.Runtime.CompilerServices; + using System.Runtime.Serialization; using System.Text; + using System.Xml; using NHibernate.Cache; *************** *** 25,32 **** using HibernateDialect = NHibernate.Dialect.Dialect; ! ! ! namespace NHibernate.Impl { ! /// <summary> /// Concrete implementation of a SessionFactory. --- 26,31 ---- using HibernateDialect = NHibernate.Dialect.Dialect; ! namespace NHibernate.Impl ! { /// <summary> /// Concrete implementation of a SessionFactory. *************** *** 60,64 **** /// </para> /// </remarks> ! internal class SessionFactoryImpl : ISessionFactory, ISessionFactoryImplementor { --- 59,64 ---- /// </para> /// </remarks> ! [Serializable] ! internal class SessionFactoryImpl : ISessionFactory, ISessionFactoryImplementor, IObjectReference { *************** *** 68,91 **** private string uuid; ! private IDictionary classPersisters; ! private IDictionary classPersistersByName; ! private IDictionary collectionPersisters; ! private IDictionary namedQueries; ! private IDictionary imports; ! private IConnectionProvider connectionProvider; ! private IDictionary properties; ! private bool showSql; ! private bool useOuterJoin; ! //private Templates templates; ! private IDictionary querySubstitutions; ! private Dialect.Dialect dialect; ! private PreparedStatementCache statementCache; ! private ITransactionFactory transactionFactory; ! private int adoBatchSize; ! private bool useScrollableResultSets; ! private string defaultSchema; ! private object statementFetchSize; ! private IInterceptor interceptor; private static IIdentifierGenerator uuidgen = new UUIDHexGenerator(); --- 68,92 ---- private string uuid; ! [NonSerialized] private IDictionary classPersisters; ! [NonSerialized] private IDictionary classPersistersByName; ! [NonSerialized] private IDictionary collectionPersisters; ! [NonSerialized] private IDictionary namedQueries; ! [NonSerialized] private IDictionary imports; ! [NonSerialized] private IConnectionProvider connectionProvider; ! [NonSerialized] private IDictionary properties; ! [NonSerialized] private bool showSql; ! [NonSerialized] private bool useOuterJoin; ! // TODO: figure out why this is commented out in nh and not h2.0.3 ! //[NonSerialized] private Templates templates; ! [NonSerialized] private IDictionary querySubstitutions; ! [NonSerialized] private Dialect.Dialect dialect; ! [NonSerialized] private PreparedStatementCache statementCache; ! [NonSerialized] private ITransactionFactory transactionFactory; ! [NonSerialized] private int adoBatchSize; ! [NonSerialized] private bool useScrollableResultSets; ! [NonSerialized] private string defaultSchema; ! [NonSerialized] private object statementFetchSize; ! [NonSerialized] private IInterceptor interceptor; private static IIdentifierGenerator uuidgen = new UUIDHexGenerator(); *************** *** 188,198 **** IClassPersister cp; //TODO: H2.0.3 created a PersisterFactory ! if (persisterClass==null || persisterClass==typeof(EntityPersister)) { ! cp = new EntityPersister(model, this); ! } else if (persisterClass==typeof(NormalizedEntityPersister)) { ! cp = new NormalizedEntityPersister(model, this); ! } else { ! cp = InstantiatePersister(persisterClass, model); ! } classPersisters[model.PersistentClazz] = cp; classPersistersByName[model.Name] = cp ; --- 189,200 ---- IClassPersister cp; //TODO: H2.0.3 created a PersisterFactory ! cp = PersisterFactory.Create(model, this); ! // if (persisterClass==null || persisterClass==typeof(EntityPersister)) { ! // cp = new EntityPersister(model, this); ! // } else if (persisterClass==typeof(NormalizedEntityPersister)) { ! // cp = new NormalizedEntityPersister(model, this); ! // } else { ! // cp = InstantiatePersister(persisterClass, model); ! // } classPersisters[model.PersistentClazz] = cp; classPersistersByName[model.Name] = cp ; *************** *** 221,224 **** --- 223,227 ---- } + SessionFactoryObjectFactory.AddInstance(uuid, name, this, properties); // queries: *************** *** 242,248 **** // It is better to hold strong references on some (LRU/MRU) queries private const int MaxStrongRefCount = 128; ! private readonly object[] strongRefs = new object[MaxStrongRefCount]; ! private int strongRefIndex = 0; ! private readonly IDictionary softQueryCache = new Hashtable(); //TODO: make soft reference map //TODO: All --- 245,251 ---- // It is better to hold strong references on some (LRU/MRU) queries private const int MaxStrongRefCount = 128; ! [NonSerialized] private readonly object[] strongRefs = new object[MaxStrongRefCount]; ! [NonSerialized] private int strongRefIndex = 0; ! [NonSerialized] private readonly IDictionary softQueryCache = new Hashtable(); //TODO: make soft reference map //TODO: All *************** *** 534,539 **** --- 537,579 ---- //TODO: Serialization stuff + // will have to do a diff serialization object and then deserialization // private void readObject() // private void writeObject() + #region System.Runtime.Serialization.IObjectReference Members + + public object GetRealObject(StreamingContext context) + { + // the SessionFactory that was serialized only has values in the properties + // "name" and "uuid". In here convert the serialized SessionFactory into + // an instance of the SessionFactory in the current AppDomain. + log.Debug("Resolving serialized SessionFactory"); + + // look for the instance by uuid - this will work when a SessionFactory + // is serialized and deserialized in the same AppDomain. + ISessionFactory result = SessionFactoryObjectFactory.GetInstance(uuid); + if(result==null) + { + // if we were deserialized into a different AppDomain, look for an instance with the + // same name. + result = SessionFactoryObjectFactory.GetNamedInstance(name); + if(result==null) + { + throw new NullReferenceException("Could not find a SessionFactory named " + name + " or identified by uuid " + uuid ); + } + else + { + log.Debug("resolved SessionFactory by name"); + } + } + else + { + log.Debug("resolved SessionFactory by uuid"); + } + + return result; + } + + #endregion + public IType[] GetReturnTypes(string queryString) *************** *** 564,581 **** } - //TODO: h2.0.3 - replace with PersisterFactory - private IClassPersister InstantiatePersister(System.Type persisterClass, PersistentClass model) { - - try { - return (IClassPersister) Activator.CreateInstance( persisterClass, new object[] { model, this } ); - } catch (Exception e) { - if ( e is HibernateException ) { - throw (HibernateException) e; - } else { - throw new MappingException( "Could not instantiate persiser " + persisterClass.Name, e); - } - } - } - public IClassMetadata GetClassMetadata(System.Type persistentClass) { --- 604,607 ---- *************** *** 660,665 **** finally { ! //TODO: H2.0.3 ! //SessionFactoryObjectFactory.removeInstance(uuid, name, properties); } } --- 686,690 ---- finally { ! SessionFactoryObjectFactory.RemoveInstance(uuid, name, properties); } } *************** *** 688,691 **** --- 713,717 ---- if(p.HasCache) p.CacheConcurrencyStrategy.Clear(); } + } } --- NEW FILE: SessionFactoryObjectFactory.cs --- using System; using System.Collections; namespace NHibernate.Impl { /// <summary> /// Resolves <see cref="ISessionFactory"/> lookups and deserialization. /// </summary> /// <remarks> /// <para> /// This is used heavily be Deserialization. Currently a SessionFactory is not really serialized. /// All that is serialized is it's name and uid. During Deserializaiton the serialized SessionFactory /// is converted to the one contained in this object. So if you are serializing across AppDomains /// you should make sure that "name" is specified for the SessionFactory in the hbm.xml file and that the /// other AppDomain has a configured SessionFactory with the same name. If /// you are serializing in the same AppDomain then there will be no problem because the uid will /// be in this object. /// </para> /// <para> /// TODO: verify that the AppDomain statements are correct. /// </para> /// </remarks> public class SessionFactoryObjectFactory { // to stop this class from being unloaded - this is a comment // from h2.0.3 - is this applicable to .net also??? private static readonly SessionFactoryObjectFactory Instance; private static readonly log4net.ILog log; static SessionFactoryObjectFactory() { log = log4net.LogManager.GetLogger( typeof(SessionFactoryObjectFactory) ); Instance = new SessionFactoryObjectFactory(); log.Debug("initializing class SessionFactoryObjectFactory"); } // in h2.0.3 these use a class called "FastHashMap" private static readonly Hashtable Instances = new Hashtable(); private static readonly Hashtable NamedInstances = new Hashtable(); /// <summary> /// Adds an Instance of the SessionFactory to the local "cache". /// </summary> /// <param name="uid">The identifier of the ISessionFactory.</param> /// <param name="name">The name of the ISessionFactory.</param> /// <param name="instance">The ISessionFactory.</param> /// <param name="properties">The configured properties for the ISessionFactory.</param> public static void AddInstance(string uid, string name, ISessionFactory instance, IDictionary properties) { if(log.IsDebugEnabled) { string nameMsg = "unnamed"; if(name!=null && name!=String.Empty) { nameMsg = name; } log.Debug( "registered: " + uid + "(" + name + ")" ); } Instances[uid] = instance; if(name!=null && name!=String.Empty) { log.Info("Factory name:" + name); NamedInstances[name] = instance; } else { log.Info("no name configured"); } } /// <summary> /// Removes the Instance of the SessionFactory from the local "cache". /// </summary> /// <param name="uid">The identifier of the ISessionFactory.</param> /// <param name="name">The name of the ISessionFactory.</param> /// <param name="properties">The configured properties for the ISessionFactory.</param> public static void RemoveInstance(string uid, string name, IDictionary properties) { if(name!=null && name!=String.Empty) { log.Info("unbinding factory: " + name); NamedInstances.Remove(name); } Instances.Remove(uid); } /// <summary> /// Returns a Named Instance of the SessionFactory from the local "cache" identified by name. /// </summary> /// <param name="name">The name of the ISessionFactory.</param> /// <returns>An instantiated ISessionFactory.</returns> public static ISessionFactory GetNamedInstance(string name) { log.Debug( "lookup: name=" + name); ISessionFactory factory = NamedInstances[name] as ISessionFactory; if(factory==null) { log.Warn( "Not found: " + name ); } return factory; } /// <summary> /// Returns an Instance of the SessionFactory from the local "cache" identified by UUID. /// </summary> /// <param name="uid">The identifier of the ISessionFactory.</param> /// <returns>An instantiated ISessionFactory.</returns> public static ISessionFactory GetInstance(string uid) { log.Debug( "lookup: uid=" + uid ); ISessionFactory factory = Instances[uid] as ISessionFactory; if(factory==null) { log.Warn( "Not found: " + uid ); } return factory; } } } |
From: Michael D. <mik...@us...> - 2004-08-09 03:26:14
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10133/Persister Added Files: PersisterFactory.cs Log Message: Added [Serializable] and code required to make them serializable to classes. Also synched up some more with h2.0.3. --- NEW FILE: PersisterFactory.cs --- using System; using System.Reflection; using NHibernate.Engine; using NHibernate.Mapping; namespace NHibernate.Persister { /// <summary> /// Factory for <c>ClassPersister</c> instances. /// </summary> public sealed class PersisterFactory { //TODO: make ClassPersisters *not* depend on ISessionFactoryImplementor // interface, if possible private PersisterFactory() { } private static readonly System.Type[] PersisterConstructorArgs = new System.Type[] { typeof(PersistentClass), typeof(ISessionFactoryImplementor) }; /// <summary> /// Creates a built in Entity Persister or a custom Persister. /// </summary> /// <param name="model"></param> /// <param name="factory"></param> /// <returns></returns> public static IClassPersister Create(PersistentClass model, ISessionFactoryImplementor factory) { System.Type persisterClass = model.Persister; if( persisterClass==null || persisterClass==typeof(EntityPersister) ) { return new EntityPersister(model, factory); } else if ( persisterClass==typeof(NormalizedEntityPersister) ) { return new NormalizedEntityPersister(model, factory); } else { return Create(persisterClass, model, factory); } } /// <summary> /// Creates a specific Persister - could be a built in or custom persister. /// </summary> /// <param name="persisterClass"></param> /// <param name="model"></param> /// <param name="factory"></param> /// <returns></returns> public static IClassPersister Create(System.Type persisterClass, PersistentClass model, ISessionFactoryImplementor factory ) { ConstructorInfo pc; try { pc = persisterClass.GetConstructor(PersisterFactory.PersisterConstructorArgs); } catch(Exception e) { throw new MappingException("Could not get constructor for " + persisterClass.Name, e); } try { return (IClassPersister) pc.Invoke( new object[] {model, factory} ); } //TODO: add more specialized error catches catch (Exception e) { throw new MappingException("Could not instantiate persister " + persisterClass.Name, e); } } } } |
From: Michael D. <mik...@us...> - 2004-08-09 03:18:59
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9124/NHibernate/Util Modified Files: IdentityMap.cs SequencedHashMap.cs Log Message: Added [Serializable] and code required to make them serializable to classes. Index: IdentityMap.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/IdentityMap.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** IdentityMap.cs 22 Jul 2004 13:31:37 -0000 1.10 --- IdentityMap.cs 9 Aug 2004 03:18:49 -0000 1.11 *************** *** 2,5 **** --- 2,6 ---- using System.Collections; using System.Collections.Specialized; + using System.Runtime.Serialization; namespace NHibernate.Util *************** *** 26,30 **** /// </remarks> [Serializable] ! public sealed class IdentityMap : IDictionary { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(IdentityMap)); --- 27,31 ---- /// </remarks> [Serializable] ! public sealed class IdentityMap : IDictionary { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(IdentityMap)); *************** *** 33,37 **** // value = object passed in IDictionary map; - /// <summary> --- 34,37 ---- *************** *** 268,271 **** --- 268,272 ---- /// Only for use in IdentityMap. /// </remarks> + [Serializable] private class IdentityComparer : IComparer { *************** *** 313,316 **** --- 314,318 ---- #endregion } + } } Index: SequencedHashMap.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/SequencedHashMap.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SequencedHashMap.cs 7 Aug 2004 04:57:13 -0000 1.5 --- SequencedHashMap.cs 9 Aug 2004 03:18:49 -0000 1.6 *************** *** 74,78 **** /// </remarks> [Serializable] ! public class SequencedHashMap : IDictionary, ISerializable, IDeserializationCallback { --- 74,78 ---- /// </remarks> [Serializable] ! public class SequencedHashMap : IDictionary { *************** *** 674,708 **** #endregion } - - - #region ISerializable Members - - SerializationInfo _info; - - protected SequencedHashMap(SerializationInfo info, StreamingContext context) - { - _info = info; - } - - public void GetObjectData(SerializationInfo info, StreamingContext context) - { - info.AddValue( "_sentinel", _sentinel, typeof(SequencedHashMap.Entry) ); - info.AddValue( "_modCount", _modCount ); - info.AddValue( "_entries", _entries ); - } - - #endregion - - #region IDeserializationCallback Members - - public void OnDeserialization(object sender) - { - _sentinel = (SequencedHashMap.Entry)_info.GetValue( "_sentinel", typeof(SequencedHashMap.Entry) ); - _modCount = _info.GetInt64("_modCount"); - _entries = (Hashtable)_info.GetValue( "_entries", typeof(Hashtable) ); - _info = null; - } - - #endregion } } --- 674,677 ---- |
From: Michael D. <mik...@us...> - 2004-08-09 03:16:42
|
Update of /cvsroot/nhibernate/nhibernate/external-bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8790 Modified Files: HashCodeProvider.dll Log Message: IdentityHashCodeProvider is now serializable. Index: HashCodeProvider.dll =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/external-bin/HashCodeProvider.dll,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvslXL7aJ and /tmp/cvsWxlNOR differ |
From: Michael D. <mik...@us...> - 2004-08-09 03:16:25
|
Update of /cvsroot/nhibernate/nhibernate/src/HashCodeProvider In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8719/HashCodeProvider Modified Files: HashCodeProvider.il Log Message: Marked IdentityHashCodeProvider as serializable. Index: HashCodeProvider.il =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/HashCodeProvider/HashCodeProvider.il,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HashCodeProvider.il 22 Jul 2004 13:30:01 -0000 1.1 --- HashCodeProvider.il 9 Aug 2004 03:16:09 -0000 1.2 *************** *** 40,44 **** .namespace HashCodeProvider { ! .class public IdentityHashCodeProvider implements [mscorlib]System.Collections.IHashCodeProvider { --- 40,44 ---- .namespace HashCodeProvider { ! .class public serializable IdentityHashCodeProvider implements [mscorlib]System.Collections.IHashCodeProvider { |
From: Michael D. <mik...@us...> - 2004-08-09 03:15:22
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8557/NHibernate/Persister Modified Files: AbstractEntityPersister.cs Log Message: Added [NonSerialized] to match with h2.0.3 - however, I don't see why they are needed because the class is not marked as being Serializable in nh or h2.0.3 Index: AbstractEntityPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/AbstractEntityPersister.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** AbstractEntityPersister.cs 23 Jun 2004 21:08:19 -0000 1.18 --- AbstractEntityPersister.cs 9 Aug 2004 03:15:14 -0000 1.19 *************** *** 33,101 **** private System.Type mappedClass; ! protected Dialect.Dialect dialect; ! private ConstructorInfo constructor; ! private IIdentifierGenerator idgen; ! private bool polymorphic; ! private bool explicitPolymorphism; ! private bool inherited; ! private bool hasSubclasses; ! private bool versioned; ! private bool abstractClass; ! private bool implementsLifecycle; ! private bool implementsValidatable; ! private bool hasCollections; ! private bool hasCascades; ! private bool mutable; ! private bool useIdentityColumn; ! private System.Type superclass; ! private bool dynamicUpdate; ! private bool dynamicInsert; ! private string sqlWhereString; ! private string sqlWhereStringTemplate; ! private string identitySelectString; ! private readonly System.Type[] proxyInterfaces; ! private System.Type concreteProxyClass; ! private bool hasProxy; ! protected bool hasEmbeddedIdentifier; ! private string[] identifierColumnNames; ! private Cascades.IdentifierValue unsavedIdentifierValue; ! protected Hashtable columnNamesByPropertyPath = new Hashtable(); ! protected Hashtable typesByPropertyPath = new Hashtable(); ! private string identifierPropertyName; ! private IType identifierType; ! private ReflectHelper.Setter identifierSetter; ! private ReflectHelper.Getter identifierGetter; ! private PropertyInfo proxyIdentifierProperty; ! private string[] propertyNames; ! private IType[] propertyTypes; ! private bool[] propertyUpdateability; ! private bool[] propertyInsertability; ! private string versionPropertyName; ! private string versionColumnName; ! private IVersionType versionType; ! private ReflectHelper.Getter versionGetter; ! private int versionProperty; ! private ReflectHelper.Getter[] getters; ! private ReflectHelper.Setter[] setters; ! private readonly Hashtable gettersByPropertyName = new Hashtable(); ! private readonly Hashtable settersByPropertyName = new Hashtable(); ! protected int hydrateSpan; ! private string className; ! private Cascades.CascadeStyle[] cascadeStyles; ! private ICacheConcurrencyStrategy cache; // a cglib thing ! //private MetaClass optimizer; public System.Type MappedClass --- 33,101 ---- private System.Type mappedClass; ! [NonSerialized] protected Dialect.Dialect dialect; ! [NonSerialized] private ConstructorInfo constructor; ! [NonSerialized] private IIdentifierGenerator idgen; ! [NonSerialized] private bool polymorphic; ! [NonSerialized] private bool explicitPolymorphism; ! [NonSerialized] private bool inherited; ! [NonSerialized] private bool hasSubclasses; ! [NonSerialized] private bool versioned; ! [NonSerialized] private bool abstractClass; ! [NonSerialized] private bool implementsLifecycle; ! [NonSerialized] private bool implementsValidatable; ! [NonSerialized] private bool hasCollections; ! [NonSerialized] private bool hasCascades; ! [NonSerialized] private bool mutable; ! [NonSerialized] private bool useIdentityColumn; ! [NonSerialized] private System.Type superclass; ! [NonSerialized] private bool dynamicUpdate; ! [NonSerialized] private bool dynamicInsert; ! [NonSerialized] private string sqlWhereString; ! [NonSerialized] private string sqlWhereStringTemplate; ! [NonSerialized] private string identitySelectString; ! [NonSerialized] private readonly System.Type[] proxyInterfaces; ! [NonSerialized] private System.Type concreteProxyClass; ! [NonSerialized] private bool hasProxy; ! [NonSerialized] protected bool hasEmbeddedIdentifier; ! [NonSerialized] private string[] identifierColumnNames; ! [NonSerialized] private Cascades.IdentifierValue unsavedIdentifierValue; ! [NonSerialized] protected Hashtable columnNamesByPropertyPath = new Hashtable(); ! [NonSerialized] protected Hashtable typesByPropertyPath = new Hashtable(); ! [NonSerialized] private string identifierPropertyName; ! [NonSerialized] private IType identifierType; ! [NonSerialized] private ReflectHelper.Setter identifierSetter; ! [NonSerialized] private ReflectHelper.Getter identifierGetter; ! [NonSerialized] private PropertyInfo proxyIdentifierProperty; ! [NonSerialized] private string[] propertyNames; ! [NonSerialized] private IType[] propertyTypes; ! [NonSerialized] private bool[] propertyUpdateability; ! [NonSerialized] private bool[] propertyInsertability; ! [NonSerialized] private string versionPropertyName; ! [NonSerialized] private string versionColumnName; ! [NonSerialized] private IVersionType versionType; ! [NonSerialized] private ReflectHelper.Getter versionGetter; ! [NonSerialized] private int versionProperty; ! [NonSerialized] private ReflectHelper.Getter[] getters; ! [NonSerialized] private ReflectHelper.Setter[] setters; ! [NonSerialized] private readonly Hashtable gettersByPropertyName = new Hashtable(); ! [NonSerialized] private readonly Hashtable settersByPropertyName = new Hashtable(); ! [NonSerialized] protected int hydrateSpan; ! [NonSerialized] private string className; ! [NonSerialized] private Cascades.CascadeStyle[] cascadeStyles; ! [NonSerialized] private ICacheConcurrencyStrategy cache; // a cglib thing ! //[NonSerialized] private MetaClass optimizer; public System.Type MappedClass |
From: Michael D. <mik...@us...> - 2004-08-09 03:14:17
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8402/NHibernate/Cfg Modified Files: Configuration.cs Log Message: minor code indentation formatting change Index: Configuration.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Configuration.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Configuration.cs 26 Jul 2004 12:48:40 -0000 1.19 --- Configuration.cs 9 Aug 2004 03:14:08 -0000 1.20 *************** *** 539,543 **** [Serializable] ! private class EmptyInterceptorClass : IInterceptor { --- 539,543 ---- [Serializable] ! private class EmptyInterceptorClass : IInterceptor { |
From: Michael D. <mik...@us...> - 2004-08-09 03:13:27
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8261/NHibernate/SqlCommand Modified Files: Parameter.cs ParameterLength.cs ParameterPrecisionScale.cs SqlString.cs Log Message: Added [Serializable] to classes. Index: Parameter.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/Parameter.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Parameter.cs 19 Jul 2004 03:21:33 -0000 1.8 --- Parameter.cs 9 Aug 2004 03:13:18 -0000 1.9 *************** *** 14,17 **** --- 14,18 ---- /// for an IDbCommand. /// </summary> + [Serializable] public class Parameter: ICloneable { Index: SqlString.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/SqlString.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SqlString.cs 19 Jul 2004 03:21:33 -0000 1.8 --- SqlString.cs 9 Aug 2004 03:13:18 -0000 1.9 *************** *** 12,15 **** --- 12,16 ---- /// get a new object back from it. /// </summary> + [Serializable] public class SqlString : ICloneable { Index: ParameterLength.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/ParameterLength.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ParameterLength.cs 19 Jul 2004 03:21:33 -0000 1.6 --- ParameterLength.cs 9 Aug 2004 03:13:18 -0000 1.7 *************** *** 12,15 **** --- 12,16 ---- /// generation of <c>nvarchar(4000)</c> (MsSql specific) is not good enough. /// </remarks> + [Serializable] public class ParameterLength : Parameter { Index: ParameterPrecisionScale.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/ParameterPrecisionScale.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ParameterPrecisionScale.cs 19 Jul 2004 03:21:33 -0000 1.6 --- ParameterPrecisionScale.cs 9 Aug 2004 03:13:18 -0000 1.7 *************** *** 12,15 **** --- 12,16 ---- /// generation of <c>decimal(19,5)</c> (MsSql specific) is not good enough. /// </remarks> + [Serializable] public class ParameterPrecisionScale : Parameter { |
From: Michael D. <mik...@us...> - 2004-08-09 03:12:48
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/UtilityTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8188/NHibernate.Test/UtilityTest Modified Files: IdentityMapFixture.cs Log Message: Added [Serializable] to classes for testing. Index: IdentityMapFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/UtilityTest/IdentityMapFixture.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** IdentityMapFixture.cs 12 Jul 2004 21:18:17 -0000 1.6 --- IdentityMapFixture.cs 9 Aug 2004 03:12:37 -0000 1.7 *************** *** 290,293 **** --- 290,294 ---- /// between the construction and field population by NHibernate. /// </summary> + [Serializable] protected class MutableHashCode { *************** *** 327,330 **** --- 328,332 ---- /// will have side effects on Collections/Entities. /// </summary> + [Serializable] protected class NoHashCode { |
From: Michael D. <mik...@us...> - 2004-08-09 03:11:55
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8015/NHibernate/Collection Modified Files: ArrayHolder.cs Bag.cs IdentifierBag.cs List.cs Map.cs ODMGCollection.cs PersistentCollection.cs Set.cs SortedMap.cs SortedSet.cs Log Message: Added [Serializable] to match with h2.0.3 Index: ODMGCollection.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/ODMGCollection.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ODMGCollection.cs 2 Apr 2003 06:01:00 -0000 1.7 --- ODMGCollection.cs 9 Aug 2004 03:11:45 -0000 1.8 *************** *** 9,12 **** --- 9,13 ---- /// Last modified by edg...@ob... /// </summary> + [Serializable] public abstract class ODMGCollection : PersistentCollection, IDCollection { Index: Map.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Map.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Map.cs 6 Jul 2004 21:08:17 -0000 1.10 --- Map.cs 9 Aug 2004 03:11:45 -0000 1.11 *************** *** 5,10 **** using NHibernate.Type; ! namespace NHibernate.Collection { ! public class Map : PersistentCollection, IDictionary { --- 5,15 ---- using NHibernate.Type; ! namespace NHibernate.Collection ! { ! /// <summary> ! /// A persistent wrapper for a <see cref="IDictionary" />. Underlying collection ! /// is a <see cref="Hashtable" />. ! /// </summary> ! [Serializable] public class Map : PersistentCollection, IDictionary { Index: PersistentCollection.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/PersistentCollection.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PersistentCollection.cs 9 Apr 2004 12:37:26 -0000 1.11 --- PersistentCollection.cs 9 Aug 2004 03:11:45 -0000 1.12 *************** *** 5,11 **** using NHibernate.Type; ! namespace NHibernate.Collection { ! ! /// <summary> /// Persistent collections are treated as value objects by Hibernate. --- 5,10 ---- using NHibernate.Type; ! namespace NHibernate.Collection ! { /// <summary> /// Persistent collections are treated as value objects by Hibernate. *************** *** 36,40 **** /// </summary> [Serializable] ! public abstract class PersistentCollection { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(PersistentCollection)); --- 35,40 ---- /// </summary> [Serializable] ! public abstract class PersistentCollection ! { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(PersistentCollection)); Index: List.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/List.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** List.cs 9 Apr 2004 12:37:26 -0000 1.10 --- List.cs 9 Aug 2004 03:11:45 -0000 1.11 *************** *** 6,15 **** ! namespace NHibernate.Collection { ! /// <summary> /// A persistent wrapper for an IList /// </summary> ! public class List : ODMGCollection , IList { private IList list; --- 6,17 ---- ! namespace NHibernate.Collection ! { /// <summary> /// A persistent wrapper for an IList /// </summary> ! [Serializable] ! public class List : ODMGCollection , IList ! { private IList list; Index: Bag.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Bag.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Bag.cs 26 Apr 2004 03:48:02 -0000 1.4 --- Bag.cs 9 Aug 2004 03:11:45 -0000 1.5 *************** *** 9,14 **** { /// <summary> ! /// Summary description for Bag. /// </summary> public class Bag : ODMGCollection, IList { --- 9,18 ---- { /// <summary> ! /// An unordered, unkeyed collection that can contain the same element ! /// multiple times. The .net collections API, has no <tt>Bag</tt>. ! /// Most developers seem to use <tt>IList</tt>s to represent bag semantics, ! /// so NHibernate follows this practice. /// </summary> + [Serializable] public class Bag : ODMGCollection, IList { Index: ArrayHolder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/ArrayHolder.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ArrayHolder.cs 13 Jul 2004 06:48:47 -0000 1.10 --- ArrayHolder.cs 9 Aug 2004 03:11:45 -0000 1.11 *************** *** 10,13 **** --- 10,14 ---- /// A persistent wrapper for an array. lazy initialization is NOT supported /// </summary> + [Serializable] public class ArrayHolder : PersistentCollection { *************** *** 15,21 **** private object array; ! private System.Type elementClass; ! private IList tempList; ! private IList tempListIdentifier; public ArrayHolder(ISessionImplementor session, object array) : base(session) --- 16,22 ---- private object array; ! [NonSerialized] private System.Type elementClass; ! [NonSerialized] private IList tempList; ! [NonSerialized] private IList tempListIdentifier; public ArrayHolder(ISessionImplementor session, object array) : base(session) Index: SortedSet.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/SortedSet.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SortedSet.cs 14 Jul 2004 21:26:35 -0000 1.5 --- SortedSet.cs 9 Aug 2004 03:11:45 -0000 1.6 *************** *** 19,22 **** --- 19,23 ---- /// element. /// </remarks> + [Serializable] public class SortedSet : Set, IDictionary { Index: SortedMap.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/SortedMap.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SortedMap.cs 6 Jul 2004 21:08:21 -0000 1.3 --- SortedMap.cs 9 Aug 2004 03:11:45 -0000 1.4 *************** *** 17,23 **** /// element. /// </remarks> public class SortedMap : Map, IDictionary { - private IComparer comparer; --- 17,23 ---- /// element. /// </remarks> + [Serializable] public class SortedMap : Map, IDictionary { private IComparer comparer; Index: Set.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Set.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Set.cs 14 Jul 2004 21:26:34 -0000 1.9 --- Set.cs 9 Aug 2004 03:11:45 -0000 1.10 *************** *** 24,32 **** /// this[key]: will work but there is no guarantee that it contains a meaningful object. /// </summary> public class Set : PersistentCollection, IDictionary { protected IDictionary map; ! protected IList tempIdentifierList; /// <summary> --- 24,33 ---- /// this[key]: will work but there is no guarantee that it contains a meaningful object. /// </summary> + [Serializable] public class Set : PersistentCollection, IDictionary { protected IDictionary map; ! [NonSerialized] protected IList tempIdentifierList; /// <summary> Index: IdentifierBag.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/IdentifierBag.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IdentifierBag.cs 4 Jun 2004 19:58:18 -0000 1.2 --- IdentifierBag.cs 9 Aug 2004 03:11:45 -0000 1.3 *************** *** 24,27 **** --- 24,28 ---- /// </para> /// </remarks> + [Serializable] public class IdentifierBag : ODMGCollection, IList { |
From: Michael D. <mik...@us...> - 2004-08-09 03:10:37
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7808/NHibernate Modified Files: FetchMode.cs FlushMode.cs ISession.cs LockMode.cs Log Message: Added [Serializable] to match with h2.0.3 Index: FlushMode.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/FlushMode.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FlushMode.cs 29 Apr 2004 14:00:51 -0000 1.2 --- FlushMode.cs 9 Aug 2004 03:10:26 -0000 1.3 *************** *** 1,6 **** using System; ! namespace NHibernate { ! /// <summary> /// Represents a flushing strategy. --- 1,6 ---- using System; ! namespace NHibernate ! { /// <summary> /// Represents a flushing strategy. *************** *** 10,14 **** /// changes and executing SQL statements /// </remarks> ! public enum FlushMode { /// <summary> /// The <c>ISession</c> is never flushed unless <c>Flush()</c> is explicitly --- 10,16 ---- /// changes and executing SQL statements /// </remarks> ! [Serializable] ! public enum FlushMode ! { /// <summary> /// The <c>ISession</c> is never flushed unless <c>Flush()</c> is explicitly Index: FetchMode.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/FetchMode.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FetchMode.cs 28 Mar 2004 06:10:26 -0000 1.1 --- FetchMode.cs 9 Aug 2004 03:10:26 -0000 1.2 *************** *** 3,7 **** namespace NHibernate { - /// <summary> /// Represents a fetching strategy. --- 3,6 ---- *************** *** 14,20 **** /// </para> /// </remarks> public enum FetchMode { - /// <summary> /// Default to the setting configured in the mapping file. --- 13,19 ---- /// </para> /// </remarks> + [Serializable] public enum FetchMode { /// <summary> /// Default to the setting configured in the mapping file. Index: LockMode.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/LockMode.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LockMode.cs 25 Jun 2004 20:44:39 -0000 1.3 --- LockMode.cs 9 Aug 2004 03:10:26 -0000 1.4 *************** *** 2,6 **** using System.Collections; ! namespace NHibernate { /// <summary> /// Instances represent a lock mode for a row of a relational database table. --- 2,7 ---- using System.Collections; ! namespace NHibernate ! { /// <summary> /// Instances represent a lock mode for a row of a relational database table. *************** *** 12,24 **** /// </remarks> [Serializable] ! public sealed class LockMode { private int level; private string name; ! private LockMode(int level, string name) { this.level = level; this.name = name; } ! public override string ToString() { return name; } --- 13,29 ---- /// </remarks> [Serializable] ! public sealed class LockMode ! { private int level; private string name; ! private LockMode(int level, string name) ! { this.level = level; this.name = name; } ! ! public override string ToString() ! { return name; } *************** *** 27,31 **** /// Is this lock mode more restrictive than the given lock mode? /// </summary> ! public bool GreaterThan(LockMode mode) { return level > mode.level; } --- 32,37 ---- /// Is this lock mode more restrictive than the given lock mode? /// </summary> ! public bool GreaterThan(LockMode mode) ! { return level > mode.level; } *************** *** 33,37 **** /// Is this lock mode less restrictive than the given lock mode? /// </summary> ! public bool LessThan(LockMode mode) { return level < mode.level; } --- 39,44 ---- /// Is this lock mode less restrictive than the given lock mode? /// </summary> ! public bool LessThan(LockMode mode) ! { return level < mode.level; } Index: ISession.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ISession.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ISession.cs 6 Aug 2004 15:42:29 -0000 1.9 --- ISession.cs 9 Aug 2004 03:10:26 -0000 1.10 *************** *** 5,10 **** using NHibernate.Type; ! namespace NHibernate { ! /// <summary> /// The main runtime interface between a Java application and Hibernate. This is the central --- 5,10 ---- using NHibernate.Type; ! namespace NHibernate ! { /// <summary> /// The main runtime interface between a Java application and Hibernate. This is the central *************** *** 66,71 **** /// </para> /// </remarks> ! public interface ISession : IDisposable, ISerializable, IDeserializationCallback { ! /// <summary> /// Force the <c>ISession</c> to flush. --- 66,71 ---- /// </para> /// </remarks> ! public interface ISession : IDisposable ! { /// <summary> /// Force the <c>ISession</c> to flush. |
From: Michael D. <mik...@us...> - 2004-08-09 03:09:35
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Type In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7602/NHibernate/Type Modified Files: AbstractType.cs ObjectType.cs Log Message: Added [Serializable] to match with h2.0.3 Index: AbstractType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/AbstractType.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AbstractType.cs 10 Feb 2004 18:41:42 -0000 1.7 --- AbstractType.cs 9 Aug 2004 03:09:25 -0000 1.8 *************** *** 7,18 **** ! namespace NHibernate.Type { ! /// <summary> /// The base implementation of the <see cref="IType"/> interface. /// Mapping of the built in Type hierarchy. /// </summary> ! public abstract class AbstractType : IType { ! /// <summary> /// Gets a value indicating if the <see cref="AbstractType"/> is an <see cref="IAssociationType"/>. --- 7,19 ---- ! namespace NHibernate.Type ! { /// <summary> /// The base implementation of the <see cref="IType"/> interface. /// Mapping of the built in Type hierarchy. /// </summary> ! [Serializable] ! public abstract class AbstractType : IType ! { /// <summary> /// Gets a value indicating if the <see cref="AbstractType"/> is an <see cref="IAssociationType"/>. Index: ObjectType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/ObjectType.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ObjectType.cs 29 Apr 2004 14:00:54 -0000 1.5 --- ObjectType.cs 9 Aug 2004 03:09:25 -0000 1.6 *************** *** 131,138 **** [Serializable] ! public sealed class ObjectTypeCacheEntry { public System.Type clazz; public object id; ! public ObjectTypeCacheEntry(System.Type clazz, object id) { this.clazz = clazz; this.id = id; --- 131,140 ---- [Serializable] ! public sealed class ObjectTypeCacheEntry ! { public System.Type clazz; public object id; ! public ObjectTypeCacheEntry(System.Type clazz, object id) ! { this.clazz = clazz; this.id = id; |
From: Michael D. <mik...@us...> - 2004-08-09 03:06:27
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7100/NHibernate.DomainModel Modified Files: FooStatus.cs Glarch.cs StringComparator.cs Log Message: Added [Serializable] to match with h2.0.3 Index: Glarch.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Glarch.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Glarch.cs 24 Jun 2004 15:22:07 -0000 1.5 --- Glarch.cs 9 Aug 2004 03:06:18 -0000 1.6 *************** *** 5,8 **** --- 5,9 ---- { //TODO: figure out what to do with this DynaBean + [Serializable] public class Glarch : Super, GlarchProxy, ILifecycle { *************** *** 16,20 **** private GlarchProxy[] _proxyArray; private IDictionary _proxySet; ! private object _dynaBean; private string _immutable; private int _derivedVersion; --- 17,21 ---- private GlarchProxy[] _proxyArray; private IDictionary _proxySet; ! [NonSerialized] private object _dynaBean; private string _immutable; private int _derivedVersion; Index: FooStatus.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FooStatus.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FooStatus.cs 8 Apr 2004 14:59:32 -0000 1.1 --- FooStatus.cs 9 Aug 2004 03:06:18 -0000 1.2 *************** *** 3,6 **** --- 3,7 ---- namespace NHibernate.DomainModel { + [Serializable] public enum FooStatus { Index: StringComparator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/StringComparator.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StringComparator.cs 14 Jul 2004 21:24:10 -0000 1.2 --- StringComparator.cs 9 Aug 2004 03:06:18 -0000 1.3 *************** *** 4,7 **** --- 4,8 ---- namespace NHibernate.DomainModel { + [Serializable] public class StringComparator : IComparer { |
From: Michael D. <mik...@us...> - 2004-08-07 04:57:53
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/UtilityTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16318/NHibernate.Test/UtilityTest Modified Files: SequencedHashMapFixture.cs Log Message: Added test for Serialization. Index: SequencedHashMapFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/UtilityTest/SequencedHashMapFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SequencedHashMapFixture.cs 28 Jun 2004 03:40:34 -0000 1.1 --- SequencedHashMapFixture.cs 7 Aug 2004 04:57:45 -0000 1.2 *************** *** 392,395 **** --- 392,418 ---- } } + + [Test] + public void Serialize() + { + System.IO.MemoryStream stream = new System.IO.MemoryStream(); + System.Runtime.Serialization.Formatters.Binary.BinaryFormatter f = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); + f.Serialize(stream, _shm); + stream.Position = 0; + + SequencedHashMap shm = (SequencedHashMap)f.Deserialize(stream); + stream.Close(); + + Assert.AreEqual( 3, shm.Count ); + int index = 0; + foreach(DictionaryEntry de in shm) + { + Assert.AreEqual( _expectedKeys[index], de.Key ); + Assert.AreEqual( _expectedValues[index], de.Value ); + index++; + } + + Assert.AreEqual( 3, index ); + } } } |
From: Michael D. <mik...@us...> - 2004-08-07 04:57:23
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16270/NHibernate/Util Modified Files: SequencedHashMap.cs Log Message: removed Equals and GetHashCode made fully serializable fixed up ctors a little bit to be more like a Hashtable. Index: SequencedHashMap.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/SequencedHashMap.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SequencedHashMap.cs 12 Jul 2004 21:21:30 -0000 1.4 --- SequencedHashMap.cs 7 Aug 2004 04:57:13 -0000 1.5 *************** *** 1,2 **** --- 1,3 ---- + #region The Apache Software License, Version 1.1 /* This is a port from the Jakarta commons project */ *************** *** 57,63 **** --- 58,66 ---- * */ + #endregion using System; using System.Collections; + using System.Runtime.Serialization; namespace NHibernate.Util *************** *** 70,77 **** /// This class is not thread safe. /// </remarks> ! public class SequencedHashMap : IDictionary { ! private class Entry { private object _key; --- 73,82 ---- /// This class is not thread safe. /// </remarks> ! [Serializable] ! public class SequencedHashMap : IDictionary, ISerializable, IDeserializationCallback { ! [Serializable] ! private class Entry { private object _key; *************** *** 169,176 **** /// Construct a new sequenced hash map with default initial size and load factor /// </summary> ! public SequencedHashMap() { - _sentinel = CreateSentinel(); - _entries = new Hashtable(); } --- 174,179 ---- /// Construct a new sequenced hash map with default initial size and load factor /// </summary> ! public SequencedHashMap() : this(0, 1.0F, null, null) { } *************** *** 178,186 **** /// Construct a new sequenced hash map with the specified initial size and default load factor /// </summary> ! /// <param name="initialSize">the initial size for the hash table</param> ! public SequencedHashMap(int initialSize) { - _sentinel = CreateSentinel(); - _entries = new Hashtable(initialSize); } --- 181,187 ---- /// Construct a new sequenced hash map with the specified initial size and default load factor /// </summary> ! /// <param name="capacity">the initial size for the hash table</param> ! public SequencedHashMap(int capacity) : this(capacity, 1.0F, null, null) { } *************** *** 188,197 **** /// Construct a new sequenced hash map with the specified initial size and load factor /// </summary> ! /// <param name="initialSize">the initial size for the hashtable</param> /// <param name="loadFactor">the load factor for the hash table</param> ! public SequencedHashMap(int initialSize, float loadFactor) { - _sentinel = CreateSentinel(); - _entries = new Hashtable(initialSize, loadFactor); } --- 189,196 ---- /// Construct a new sequenced hash map with the specified initial size and load factor /// </summary> ! /// <param name="capacity">the initial size for the hashtable</param> /// <param name="loadFactor">the load factor for the hash table</param> ! public SequencedHashMap(int capacity, float loadFactor) : this(capacity, loadFactor, null, null) { } *************** *** 202,209 **** /// <param name="hcp"></param> /// <param name="comparer"></param> ! public SequencedHashMap(IHashCodeProvider hcp, IComparer comparer) { _sentinel = CreateSentinel(); ! _entries = new Hashtable(hcp, comparer); } --- 201,220 ---- /// <param name="hcp"></param> /// <param name="comparer"></param> ! public SequencedHashMap(IHashCodeProvider hcp, IComparer comparer) : this(0, 1.0F, hcp, comparer) ! { ! } ! ! /// <summary> ! /// Creates an empty Hashtable with the default initial capacity and using the default load factor, ! /// the specified hash code provider and the specified comparer ! /// </summary> ! /// <param name="capacity">the initial size for the hashtable</param> ! /// <param name="loadFactor">the load factor for the hash table</param> ! /// <param name="hcp"></param> ! /// <param name="comparer"></param> ! public SequencedHashMap(int capacity, float loadFactor, IHashCodeProvider hcp, IComparer comparer) { _sentinel = CreateSentinel(); ! _entries = new Hashtable(capacity, loadFactor, hcp, comparer); } *************** *** 434,452 **** #region System.Object Members - public override bool Equals(object obj) - { - if (obj == null) return false; - if (obj == this) return true; - - if (!(obj is IDictionary)) return false; - - return Keys.Equals(((IDictionary)obj).Keys); - } - - public override int GetHashCode() - { - return Keys.GetHashCode(); - } - public override string ToString() { --- 445,448 ---- *************** *** 524,527 **** --- 520,524 ---- } + private class ValuesCollection : ICollection { *************** *** 677,680 **** --- 674,708 ---- #endregion } + + + #region ISerializable Members + + SerializationInfo _info; + + protected SequencedHashMap(SerializationInfo info, StreamingContext context) + { + _info = info; + } + + public void GetObjectData(SerializationInfo info, StreamingContext context) + { + info.AddValue( "_sentinel", _sentinel, typeof(SequencedHashMap.Entry) ); + info.AddValue( "_modCount", _modCount ); + info.AddValue( "_entries", _entries ); + } + + #endregion + + #region IDeserializationCallback Members + + public void OnDeserialization(object sender) + { + _sentinel = (SequencedHashMap.Entry)_info.GetValue( "_sentinel", typeof(SequencedHashMap.Entry) ); + _modCount = _info.GetInt64("_modCount"); + _entries = (Hashtable)_info.GetValue( "_entries", typeof(Hashtable) ); + _info = null; + } + + #endregion } } |
From: Peter S. <sz...@us...> - 2004-08-06 15:42:39
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20521/src/NHibernate Modified Files: ISession.cs Log Message: Forgot this file Index: ISession.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/ISession.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ISession.cs 13 Jul 2004 20:53:26 -0000 1.8 --- ISession.cs 6 Aug 2004 15:42:29 -0000 1.9 *************** *** 2,5 **** --- 2,6 ---- using System.Data; using System.Collections; + using System.Runtime.Serialization; using NHibernate.Type; *************** *** 65,69 **** /// </para> /// </remarks> ! public interface ISession : IDisposable { /// <summary> --- 66,70 ---- /// </para> /// </remarks> ! public interface ISession : IDisposable, ISerializable, IDeserializationCallback { /// <summary> |
From: Peter S. <sz...@us...> - 2004-08-06 15:37:21
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19069 Modified Files: MasterDetailTest.cs Log Message: Implemented more tests Index: MasterDetailTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/MasterDetailTest.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MasterDetailTest.cs 6 Aug 2004 14:50:34 -0000 1.7 --- MasterDetailTest.cs 6 Aug 2004 15:37:13 -0000 1.8 *************** *** 281,288 **** [Test] ! [Ignore("ISession not fully serializable - http://jira.nhibernate.org:8080/browse/NH-60")] public void Serialization() { ! } --- 281,361 ---- [Test] ! //[Ignore("ISession not fully serializable - http://jira.nhibernate.org:8080/browse/NH-60")] public void Serialization() { ! ISession s = sessions.OpenSession(); ! Master m = new Master(); ! Detail d1 = new Detail(); ! Detail d2 = new Detail(); ! object mid = s.Save(m); ! d1.Master=(m); ! d2.Master=(m); ! m.AddDetail(d1); ! m.AddDetail(d2); ! if ((dialect is Dialect.SybaseDialect) || (dialect is Dialect.MsSql2000Dialect)) ! { ! s.Save(d1); ! } ! else ! { ! s.Save( d1, 666L ); ! } ! s.Flush(); ! s.Disconnect(); ! System.IO.MemoryStream stream = new System.IO.MemoryStream(); ! System.Runtime.Serialization.Formatters.Binary.BinaryFormatter f = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); ! // f.Serialize(stream, s); ! // stream.Position = 0; ! // Console.WriteLine(stream.Length); ! //TODO ! // s = (Session) new ObjectInputStream( new ByteArrayInputStream(bytes) ).readObject(); ! s.Reconnect(); ! Master m2 = (Master) s.Load(typeof(Master), mid); ! Assert.IsTrue( m2.Details.Count==2, "serialized state" ); ! foreach(Detail d in m2.Details.Keys) ! { ! Assert.IsTrue( d.Master==m2, "deserialization" ); ! try ! { ! s.GetIdentifier(d); ! s.Delete(d); ! } ! catch (Exception e) {} ! } ! s.Delete(m2); ! s.Flush(); ! s.Close(); ! ! s = sessions.OpenSession(); ! mid = s.Save( new Master() ); ! object mid2 = s.Save( new Master() ); ! s.Flush(); ! s.Disconnect(); ! // stream = new System.IO.MemoryStream(); ! // f.Serialize(stream, s); ! // stream.Position = 0; ! // Console.WriteLine(stream.Length); ! //TODO ! // s = (Session) new ObjectInputStream( new ByteArrayInputStream(bytes) ).readObject(); ! s.Reconnect(); ! s.Delete( s.Load(typeof(Master), mid) ); ! s.Delete( s.Load(typeof(Master), mid2) ); ! s.Flush(); ! s.Close(); ! ! s = sessions.OpenSession(); ! string db = s.Connection.Database; //force session to grab a connection ! try ! { ! stream = new System.IO.MemoryStream(); ! f.Serialize(stream, s); ! } ! catch (Exception e) ! { ! Assert.IsTrue(e is InvalidOperationException, "illegal state" ); ! s.Close(); ! return; ! } ! Assert.IsTrue(false, "serialization should have failed"); } |
From: Peter S. <sz...@us...> - 2004-08-06 15:35:06
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18582 Modified Files: SessionImpl.cs Log Message: Started implementing session serialization Index: SessionImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/SessionImpl.cs,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** SessionImpl.cs 13 Jul 2004 20:55:15 -0000 1.35 --- SessionImpl.cs 6 Aug 2004 15:34:57 -0000 1.36 *************** *** 3,6 **** --- 3,7 ---- using System.Text; using System.Collections; + using System.Runtime.Serialization; using System.Text.RegularExpressions; using NHibernate.Type; *************** *** 255,258 **** --- 256,263 ---- [NonSerialized] private IBatcher batcher; + + // For serialization + [NonSerialized] private SerializationInfo siInfo; + private IPreparer preparer; *************** *** 527,534 **** } ! //TODO: add serialization / deserialization stuff here ! // private void readObject ! // private void writeObject ! internal SessionImpl(IDbConnection connection, SessionFactoryImpl factory, bool autoClose, long timestamp, IInterceptor interceptor) { --- 532,601 ---- } ! SessionImpl(SerializationInfo info, StreamingContext context) ! { ! //The graph is not valid until OnDeserialization() has been called. ! siInfo = info; ! } ! ! public void GetObjectData(SerializationInfo info, StreamingContext context) ! { ! if ( IsConnected ) throw new InvalidOperationException("Cannot serialize a Session while connected"); ! if ( insertions.Count!=0 || deletions.Count!=0 ) ! throw new InvalidOperationException("Cannot serialize a Session which has work waiting to be flushed"); ! ! log.Info("serializing session"); ! ! info.AddValue("entries", entries); ! info.AddValue("collections", collections); ! info.AddValue("arrayHolders", arrayHolders); ! } ! ! public void OnDeserialization(Object sender) ! { ! log.Info("deserializing session"); ! entries = (IdentityMap)siInfo.GetValue("entries", typeof(IdentityMap)); ! collections = (IdentityMap)siInfo.GetValue("collections", typeof(IdentityMap)); ! arrayHolders = (IdentityMap)siInfo.GetValue("arrayHolders", typeof(IdentityMap)); ! InitTransientCollections(); ! foreach(DictionaryEntry e in collections) ! { ! try ! { ! ((PersistentCollection)e.Key).SetSession(this); ! CollectionEntry ce = (CollectionEntry)e.Value; ! ce.loadedPersister = factory.GetCollectionPersister(ce.Role); ! } ! catch (HibernateException he) ! { ! // Different from h2.0.3 ! throw new InvalidOperationException(he.Message); ! } ! } ! ! IDictionary newProxiesByKey = new Hashtable(proxiesByKey); ! foreach(object proxy in proxiesByKey) ! { ! if (proxy is HibernateProxy) ! HibernateProxyHelper.GetLazyInitializer(proxy as HibernateProxy).SetSession(this); ! else ! newProxiesByKey.Remove(proxy); ! } ! proxiesByKey = newProxiesByKey; ! newProxiesByKey = null; ! ! foreach(EntityEntry e in entries) ! { ! try ! { ! e.Persister = factory.GetPersister(e.ClassName); ! } ! catch (MappingException me) ! { ! // Different from h2.0.3 ! throw new InvalidOperationException(me.Message); ! } ! } ! } ! internal SessionImpl(IDbConnection connection, SessionFactoryImpl factory, bool autoClose, long timestamp, IInterceptor interceptor) { |
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10322/NHibernate.Test Modified Files: ABCProxyTest.cs FooBarTest.cs MasterDetailTest.cs NewPerformanceTest.cs ParentChildTest.cs PerformanceTest.cs SQLFunctionsTest.cs Log Message: Added jira issues to some of the [Ignore] and all "Test not written yet." have the same description now. Index: FooBarTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FooBarTest.cs,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** FooBarTest.cs 4 Aug 2004 17:27:53 -0000 1.52 --- FooBarTest.cs 6 Aug 2004 14:50:34 -0000 1.53 *************** *** 462,466 **** [Test] ! [Ignore("Fails because Proxies not written yet.")] public void NamedParams() { --- 462,466 ---- [Test] ! [Ignore("Proxies Required - http://jira.nhibernate.org:8080/browse/NH-41")] public void NamedParams() { *************** *** 493,497 **** [Test] ! //[Ignore("Test not written yet.")] public void FindByCriteria() { --- 493,497 ---- [Test] ! [Ignore("SetMaxResults - http://jira.nhibernate.org:8080/browse/NH-87")] public void FindByCriteria() { *************** *** 543,549 **** Assert.IsTrue(list.Count==1 && list[0]==f); ! //TODO: the SetMaxResults doesn't seem to have any impact ! // list = s.CreateCriteria(typeof(Foo)).SetMaxResults(0).List(); ! // Assert.AreEqual(0, list.Count); list = s.CreateCriteria(typeof(Foo)) --- 543,548 ---- Assert.IsTrue(list.Count==1 && list[0]==f); ! list = s.CreateCriteria(typeof(Foo)).SetMaxResults(0).List(); ! Assert.AreEqual(0, list.Count); list = s.CreateCriteria(typeof(Foo)) *************** *** 698,702 **** [Test] ! //[Ignore("Test not written yet.")] public void AssociationId() { --- 697,701 ---- [Test] ! //[Ignore("TimeZone Portions commented out - http://jira.nhibernate.org:8080/browse/NH-88")] public void AssociationId() { *************** *** 716,719 **** --- 715,719 ---- stuf.Id = 1234; + //TODO: http://jira.nhibernate.org:8080/browse/NH-88 //stuf.setProperty(TimeZone.getDefault() ); s.Save(more); *************** *** 777,780 **** --- 777,781 ---- // TODO: figure out what to do with TimeZone + // http://jira.nhibernate.org:8080/browse/NH-88 //Assert.IsTrue( stuff.getProperty().equals( TimeZone.getDefault() ) ); Assert.AreEqual("More Stuff", stuff.MoreStuff.Name); *************** *** 845,849 **** [Test] - //[Ignore("Test is failing because sub selects are not working. http://jira.nhibernate.org:8080/browse/NH-69")] public void CollectionsInSelect() { --- 846,849 ---- *************** *** 1025,1029 **** [Test] ! //[Ignore("Test not written yet.")] public void PersistCollections() { --- 1025,1029 ---- [Test] ! //[Ignore("Time Portions commented out - http://jira.nhibernate.org:8080/browse/NH-89")] public void PersistCollections() { *************** *** 1060,1063 **** --- 1060,1064 ---- baz.StringList[0] = "new value"; baz.StringSet = new Hashtable(); + //http://jira.nhibernate.org:8080/browse/NH-89 // TODO: baz.TimeArray[2] = new DateTime( *************** *** 1358,1362 **** [Test] ! [Ignore("Test fails because Proxy not implemented yet.")] public void Load() { --- 1359,1363 ---- [Test] ! [Ignore("Proxies Required - http://jira.nhibernate.org:8080/browse/NH-41")] public void Load() { *************** *** 1699,1705 **** [Test] ! //[Ignore("Test not written yet.")] ! public void Iterators() { ISession s = sessions.OpenSession(); for( int i=0; i<10; i++ ) --- 1700,1707 ---- [Test] ! public void Enumerable() { + // this test used to be called Iterators() + ISession s = sessions.OpenSession(); for( int i=0; i<10; i++ ) *************** *** 1721,1725 **** q.Stuff = "foo"; // can't remove item from IEnumerator in .net ! //if (count==0 || count==5) enumer.Remove(); count++; } --- 1723,1727 ---- q.Stuff = "foo"; // can't remove item from IEnumerator in .net ! if (count==0 || count==5) s.Delete(q); count++; } *************** *** 1731,1735 **** s = sessions.OpenSession(); ! Assert.AreEqual(10, s.Delete("from q in class NHibernate.DomainModel.Qux where q.Stuff=?", "foo", NHibernate.String), "delete by query"); --- 1733,1737 ---- s = sessions.OpenSession(); ! Assert.AreEqual(8, s.Delete("from q in class NHibernate.DomainModel.Qux where q.Stuff=?", "foo", NHibernate.String), "delete by query"); *************** *** 2458,2462 **** [Test] ! [Ignore("Test not written yet.")] public void ProxyArray() { --- 2460,2464 ---- [Test] ! [Ignore("Proxies Required - http://jira.nhibernate.org:8080/browse/NH-41")] public void ProxyArray() { *************** *** 2730,2734 **** [Test] ! [Ignore("Test depends on Proxies being implemented.")] public void LoadAfterDelete() { --- 2732,2736 ---- [Test] ! [Ignore("Proxies Required - http://jira.nhibernate.org:8080/browse/NH-41")] public void LoadAfterDelete() { *************** *** 3014,3018 **** [Test] ! [Ignore("Test not written yet.")] public void ProxiesInCollections() { --- 3016,3020 ---- [Test] ! [Ignore("Proxies Required - http://jira.nhibernate.org:8080/browse/NH-41")] public void ProxiesInCollections() { Index: ParentChildTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ParentChildTest.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ParentChildTest.cs 6 Aug 2004 14:07:30 -0000 1.5 --- ParentChildTest.cs 6 Aug 2004 14:50:34 -0000 1.6 *************** *** 223,227 **** [Test] ! [Ignore("Test not yet written")] public void Container() { --- 223,227 ---- [Test] ! [Ignore("Test not written yet.")] public void Container() { *************** *** 229,233 **** [Test] - //[Ignore("Test not yet written")] public void CascadeCompositeElements() { --- 229,232 ---- *************** *** 293,297 **** [Test] ! [Ignore("Test not yet written")] public void Bag() { --- 292,296 ---- [Test] ! [Ignore("Test not written yet.")] public void Bag() { *************** *** 299,303 **** [Test] ! [Ignore("Test not yet written")] public void CircularCascade() { --- 298,302 ---- [Test] ! [Ignore("Test not written yet.")] public void CircularCascade() { *************** *** 305,309 **** [Test] ! [Ignore("Test not yet written")] public void DeleteEmpty() { --- 304,308 ---- [Test] ! [Ignore("Test not written yet.")] public void DeleteEmpty() { *************** *** 311,315 **** [Test] ! [Ignore("Test not yet written")] public void Locking() { --- 310,314 ---- [Test] ! [Ignore("Test not written yet.")] public void Locking() { *************** *** 317,321 **** [Test] ! [Ignore("Test not yet written")] public void ObjectType() { --- 316,320 ---- [Test] ! [Ignore("Test not written yet.")] public void ObjectType() { Index: SQLFunctionsTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/SQLFunctionsTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SQLFunctionsTest.cs 9 Jun 2004 01:22:37 -0000 1.2 --- SQLFunctionsTest.cs 6 Aug 2004 14:50:34 -0000 1.3 *************** *** 20,24 **** [Test] ! [Ignore("Test not yet written")] public void SetProperties() { --- 20,24 ---- [Test] ! [Ignore("Test not written yet.")] public void SetProperties() { *************** *** 26,30 **** [Test] ! [Ignore("Test not yet written")] public void NothingToUpdate() { --- 26,30 ---- [Test] ! [Ignore("Test not written yet.")] public void NothingToUpdate() { *************** *** 32,36 **** [Test] ! [Ignore("Test not yet written")] public void SQLFunctions() { --- 32,36 ---- [Test] ! [Ignore("Test not written yet.")] public void SQLFunctions() { *************** *** 38,42 **** [Test] ! [Ignore("Test not yet written")] public void BlobClob() { --- 38,42 ---- [Test] ! [Ignore("Test not written yet.")] public void BlobClob() { Index: PerformanceTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/PerformanceTest.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PerformanceTest.cs 29 Jul 2004 13:16:39 -0000 1.6 --- PerformanceTest.cs 6 Aug 2004 14:50:34 -0000 1.7 *************** *** 62,66 **** [Test] - //[Ignore("User should comment this out if they want it to run. Does not test any functions.")] public void Many() { --- 62,65 ---- *************** *** 137,141 **** [Test] ! [Ignore("Have not written yet.")] public void Simultaneous() { --- 136,140 ---- [Test] ! [Ignore("Test not written yet.")] public void Simultaneous() { *************** *** 143,147 **** [Test] ! [Ignore("Have not written yet.")] public void HibernateOnly() { --- 142,146 ---- [Test] ! [Ignore("Test not written yet.")] public void HibernateOnly() { *************** *** 149,153 **** [Test] ! [Ignore("Have not written yet.")] public void AdoNetOnly() { --- 148,152 ---- [Test] ! [Ignore("Test not written yet.")] public void AdoNetOnly() { Index: NewPerformanceTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NewPerformanceTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NewPerformanceTest.cs 9 Jun 2004 01:22:37 -0000 1.2 --- NewPerformanceTest.cs 6 Aug 2004 14:50:34 -0000 1.3 *************** *** 18,22 **** [Test] ! [Ignore("Test not yet written")] public void Performance() { --- 18,22 ---- [Test] ! [Ignore("Test not written yet.")] public void Performance() { Index: ABCProxyTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ABCProxyTest.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ABCProxyTest.cs 17 Jun 2004 21:17:54 -0000 1.8 --- ABCProxyTest.cs 6 Aug 2004 14:50:34 -0000 1.9 *************** *** 19,23 **** [Test] ! [Ignore("Test will fail because of proxy initalization problems")] public void Subclassing() { --- 19,23 ---- [Test] ! [Ignore("Proxies Required - http://jira.nhibernate.org:8080/browse/NH-41")] public void Subclassing() { Index: MasterDetailTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/MasterDetailTest.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MasterDetailTest.cs 31 Jul 2004 14:51:01 -0000 1.6 --- MasterDetailTest.cs 6 Aug 2004 14:50:34 -0000 1.7 *************** *** 281,285 **** [Test] ! [Ignore("Test not yet written")] public void Serialization() { --- 281,285 ---- [Test] ! [Ignore("ISession not fully serializable - http://jira.nhibernate.org:8080/browse/NH-60")] public void Serialization() { *************** *** 538,542 **** [Test] ! [Ignore("Test not yet written")] public void CustomPersister() { --- 538,542 ---- [Test] ! [Ignore("Test not written yet.")] public void CustomPersister() { |
From: Michael D. <mik...@us...> - 2004-08-06 14:50:42
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10322/NHibernate.DomainModel Modified Files: Stuff.hbm.xml Log Message: Added jira issues to some of the [Ignore] and all "Test not written yet." have the same description now. Index: Stuff.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Stuff.hbm.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Stuff.hbm.xml 3 Jun 2004 18:55:57 -0000 1.3 --- Stuff.hbm.xml 6 Aug 2004 14:50:34 -0000 1.4 *************** *** 61,64 **** --- 61,65 ---- </composite-id> <!-- + http://jira.nhibernate.org:8080/browse/NH-88 TODO: in h2.0.3 this is mapped to a TimeZone - what to use in .net??? <property name="Property" /> |
From: Michael D. <mik...@us...> - 2004-08-06 14:07:39
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2391/NHibernate.Test Modified Files: ParentChildTest.cs Log Message: Implemented more tests. Index: ParentChildTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/ParentChildTest.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ParentChildTest.cs 3 Aug 2004 04:21:15 -0000 1.4 --- ParentChildTest.cs 6 Aug 2004 14:07:30 -0000 1.5 *************** *** 94,112 **** [Test] - [Ignore("Test not yet written")] public void ParentChild() { } [Test] - [Ignore("Test not yet written")] public void ParentNullChild() { } [Test] - [Ignore("Test not yet written")] public void ManyToMany() { } --- 94,223 ---- [Test] public void ParentChild() { + ISession s = sessions.OpenSession(); + ITransaction t = s.BeginTransaction(); + Parent p = new Parent(); + Child c = new Child(); + c.Parent = p; + p.Child = c; + s.Save(p); + s.Save(c); + t.Commit(); + s.Flush(); + + s = sessions.OpenSession(); + t = s.BeginTransaction(); + c = (Child)s.Load( typeof(Child), c.Id ); + p = c.Parent; + Assert.IsNotNull( p, "1-1 parent" ); + c.Count = 32; + p.Count = 66; + t.Commit(); + s.Close(); + + s = sessions.OpenSession(); + t = s.BeginTransaction(); + c = (Child)s.Load( typeof(Child), c.Id ); + p = c.Parent; + Assert.AreEqual( 66, p.Count, "1-1 update" ); + Assert.AreEqual( 32, c.Count, "1-1 update" ); + Assert.AreEqual( 1, s.Find("from c in class NHibernate.DomainModel.Child where c.Parent.Count=66").Count, "1-1 query" ); + Assert.AreEqual( 2, ((object[])s.Find("from Parent p join p.Child c where p.Count=66")[0]).Length, "1-1 query" ); + + s.Find("select c, c.Parent from c in class NHibernate.DomainModel.Child order by c.Parent.Count"); + s.Find("select c, c.Parent from c in class NHibernate.DomainModel.Child where c.Parent.Count=66 order by c.Parent.Count"); + s.Enumerable("select c, c.Parent, c.Parent.Count from c in class NHibernate.DomainModel.Child order by c.Parent.Count"); + Assert.AreEqual( 1, s.Find("FROM p in CLASS NHibernate.DomainModel.Parent WHERE p.Count=?", (int)66, NHibernate.Int32).Count, "1-1 query" ); + s.Delete(c); + s.Delete(p); + t.Commit(); + s.Close(); } [Test] public void ParentNullChild() { + ISession s = sessions.OpenSession(); + ITransaction t = s.BeginTransaction(); + Parent p = new Parent(); + s.Save(p); + t.Commit(); + s.Close(); + + s = sessions.OpenSession(); + t = s.BeginTransaction(); + p = (Parent)s.Load( typeof(Parent), p.Id ); + Assert.IsNull( p.Child ); + p.Count = 66; + t.Commit(); + s.Close(); + + s = sessions.OpenSession(); + t = s.BeginTransaction(); + p = (Parent)s.Load( typeof(Parent), p.Id ); + Assert.AreEqual( 66, p.Count, "null 1-1 update" ); + Assert.IsNull( p.Child ); + s.Delete(p); + t.Commit(); + s.Close(); + } [Test] public void ManyToMany() { + // if( dialect is Dialect.HSQLDialect) return; + + ISession s = sessions.OpenSession(); + ITransaction t = s.BeginTransaction(); + Container c = new Container(); + c.ManyToMany = new ArrayList(); + c.Bag = new ArrayList(); + Simple s1 = new Simple(); + Simple s2 = new Simple(); + s1.Count = 123; + s2.Count = 654; + Contained c1 = new Contained(); + c1.Bag = new ArrayList(); + c1.Bag.Add(c); + c.Bag.Add(c1); + c.ManyToMany.Add(s1); + c.ManyToMany.Add(s2); + object cid = s.Save(c); + s.Save( s1, (long)12 ); + s.Save( s2, (long)-1 ); + t.Commit(); + s.Close(); + + s = sessions.OpenSession(); + t = s.BeginTransaction(); + c = (Container) s.Load( typeof(Container), cid ); + Assert.AreEqual( 1, c.Bag.Count ); + Assert.AreEqual( 2, c.ManyToMany.Count ); + foreach(object obj in c.Bag) + { + c1 = (Contained)obj; + break; + } + c.Bag.Remove(c1); + c1.Bag.Remove(c); + Assert.IsNotNull( c.ManyToMany[0] ); + c.ManyToMany.RemoveAt(0); + t.Commit(); + s.Close(); + + s = sessions.OpenSession(); + t = s.BeginTransaction(); + c = (Container) s.Load( typeof(Container), cid ); + Assert.AreEqual( 0, c.Bag.Count ); + Assert.AreEqual( 1, c.ManyToMany.Count ); + c1 = (Contained) s.Load( typeof(Contained), c1.Id ); + Assert.AreEqual( 0, c1.Bag.Count ); + Assert.AreEqual( 1, s.Delete("from c in class ContainerX") ); + Assert.AreEqual( 1, s.Delete("from c in class Contained") ); + Assert.AreEqual( 2, s.Delete("from s in class Simple") ); + t.Commit(); + s.Close(); } *************** *** 118,124 **** [Test] ! [Ignore("Test not yet written")] public void CascadeCompositeElements() { } --- 229,293 ---- [Test] ! //[Ignore("Test not yet written")] public void CascadeCompositeElements() { + Container c = new Container(); + IList list = new ArrayList(); + c.Cascades = list; + Container.ContainerInnerClass cic = new Container.ContainerInnerClass(); + cic.Many = new Many(); + cic.One = new One(); + list.Add(cic); + ISession s = sessions.OpenSession(); + s.Save(c); + s.Flush(); + s.Close(); + + s = sessions.OpenSession(); + foreach(Container obj in s.Enumerable("from c in class ContainerX")) + { + c = obj; + break; + } + foreach(Container.ContainerInnerClass obj in c.Cascades) + { + cic = obj; + break; + } + Assert.IsNotNull(cic.Many); + Assert.IsNotNull(cic.One); + Assert.AreEqual( 1, c.Cascades.Count ); + s.Delete(c); + s.Flush(); + s.Close(); + + c = new Container(); + s = sessions.OpenSession(); + s.Save(c); + list = new ArrayList(); + c.Cascades = list; + cic = new Container.ContainerInnerClass(); + cic.Many = new Many(); + cic.One = new One(); + list.Add(cic); + s.Flush(); + s.Close(); + + s = sessions.OpenSession(); + foreach( Container obj in s.Enumerable("from c in class ContainerX") ) + { + c = obj; + } + foreach( Container.ContainerInnerClass obj in c.Cascades ) + { + cic = obj; + } + Assert.IsNotNull( cic.Many ); + Assert.IsNotNull( cic.One ); + Assert.AreEqual( 1, c.Cascades.Count ); + s.Delete(c); + s.Flush(); + s.Close(); + } |
From: Michael D. <mik...@us...> - 2004-08-06 03:25:31
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Examples/ForumQuestions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12166/ForumQuestions Modified Files: TestCase.cs Log Message: minor, minor mods to Examples. Index: TestCase.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Examples/ForumQuestions/TestCase.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestCase.cs 24 Jul 2004 20:51:51 -0000 1.1 --- TestCase.cs 6 Aug 2004 03:25:18 -0000 1.2 *************** *** 30,34 **** { cfg = new Configuration(); ! for (int i=0; i<files.Length; i++) { --- 30,34 ---- { cfg = new Configuration(); ! for (int i=0; i<files.Length; i++) { *************** *** 39,43 **** sessions = cfg.BuildSessionFactory( ); ! dialect = Dialect.Dialect.GetDialect(); } --- 39,43 ---- sessions = cfg.BuildSessionFactory( ); ! dialect = Dialect.Dialect.GetDialect( cfg.Properties ); } |
From: Michael D. <mik...@us...> - 2004-08-06 03:25:31
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12166 Modified Files: NHibernate.Examples-1.1.csproj Added Files: hibernate.cfg.xml Log Message: minor, minor mods to Examples. --- NEW FILE: hibernate.cfg.xml --- (This appears to be a binary file; contents omitted.) Index: NHibernate.Examples-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Examples/NHibernate.Examples-1.1.csproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NHibernate.Examples-1.1.csproj 24 Jul 2004 20:51:51 -0000 1.1 --- NHibernate.Examples-1.1.csproj 6 Aug 2004 03:25:17 -0000 1.2 *************** *** 17,21 **** DelaySign = "false" OutputType = "Library" ! PreBuildEvent = 'copy /y "$(ProjectDir)App.config" "$(TargetPath).config"' PostBuildEvent = "" RootNamespace = "NHibernate.Examples" --- 17,21 ---- DelaySign = "false" OutputType = "Library" ! PreBuildEvent = 'copy /y "$(ProjectDir)App.config" "$(TargetPath).config"
copy /y "$(ProjectDir)hibernate.cfg.xml" "hibernate.cfg.xml"' PostBuildEvent = "" RootNamespace = "NHibernate.Examples" *************** *** 104,107 **** --- 104,111 ---- /> <File + RelPath = "hibernate.cfg.xml" + BuildAction = "Content" + /> + <File RelPath = "NHibernate.Examples.build" BuildAction = "None" |