Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26970/NHibernate/Collection
Modified Files:
List.cs Map.cs Set.cs
Log Message:
Removed implementation of GetHashCode and Equals to conform to .net
standard and to resolve problems with those methods being called during
Deserialization and having no session to do a Read() from yet.
Index: Map.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Map.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Map.cs 9 Aug 2004 03:11:45 -0000 1.11
--- Map.cs 9 Aug 2004 18:33:11 -0000 1.12
***************
*** 271,282 ****
return ((DictionaryEntry)entry).Key;
}
- public override bool Equals(object other) {
- Read();
- return map.Equals(other);
- }
- public override int GetHashCode() {
- Read();
- return map.GetHashCode();
- }
public override bool EntryExists(object entry, int i) {
--- 271,274 ----
Index: Set.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Set.cs,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Set.cs 9 Aug 2004 03:11:45 -0000 1.10
--- Set.cs 9 Aug 2004 18:33:11 -0000 1.11
***************
*** 396,412 ****
}
- //TODO: find out if this is behaiving as Hibernate expects it to. If I
- // read the Java docs correctly these methods are actually implemented. In
- // .NET Collections I believe they just delegate to the Object.Equals() & .GetHashCode()
- // which would not be a consitent interface for Hibernate.
- public override bool Equals(object other) {
- Read();
- return map.Equals(other);
- }
- public override int GetHashCode() {
- Read();
- return map.GetHashCode();
- }
-
/// <summary>
/// <see cref="PersistentCollection.EntryExists"/>
--- 396,399 ----
Index: List.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/List.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** List.cs 9 Aug 2004 03:11:45 -0000 1.11
--- List.cs 9 Aug 2004 18:33:11 -0000 1.12
***************
*** 253,265 ****
}
- public override bool Equals(object other) {
- Read();
- return list.Equals(other);
- }
-
- public override int GetHashCode() {
- Read();
- return list.GetHashCode();
- }
public override bool EntryExists(object entry, int i) {
--- 253,256 ----
|