lift/framework — pull request #1351 by eltimn (2012-11-03 19:22:49+00:00)
Title: Issue 1343 - Ensure equals method works properly with all Fields

Since Field.setBox now compares values before setting the dirty flag I wanted to make sure all of the fields' values have proper equals methods.

There were 2 that had problems; PatternField and BsonRecordField. I didn't figure out a solution for Pattern, but for BsonRecord I **added an equals method to Record** that compares each field.

There is also a problem with BsonRecord relating to it's mutablity. See this thread [1] for more info.

To help alleviate the problem I did 2 things:

* Added a copy method to Record that creates a new Record instance with all fields set to the values in the original instance
* Added forceDirty_? to Field. Setting this to true will force the dirty flag to always be set when calling setBox, the same as the previous behavior.

Note that this commit includes @davewhittaker 's fix for issue 1335

1 - https://groups.google.com/d/topic/liftweb/g8SwfKsLW_0/discussion