Added test for KeyFieldIsUniqueInCollectionConstraint when used with newly saved (not reloaded) object.

Associated commit DatabaseObjects:
cc867ae58e64bb068a9b2d185edfd98edacac737