ReactiveMongo/Play-ReactiveMongo

Fix Equality Failures

Closed this issue · 2 comments

There are several issues with equality in underlying bson types and buffer classes.

ArrayReadableBuffer can be made into a case class to get the auto-generated equals method that will allow its equality to be correct. Without it, you get false negatives.

BSONObjectID, BSONBinary and BSONDBPointer all produce false negatives for equality so they need to implement canEqual and equals for themselves.

BSONArray claims to be a BSONDocument in its toString() method.

I have fixed all these issues in my fork, here:
reactific/ReactiveMongo@d6b489d

For me, this one is already fixed (see Equality specs)