Add findOrCreate method to models. Refactor identity-map to use it.