We can compare objects are they are both DB mapping object

Reverts 2ec4241