fixes postgres "unknown OID" warnings

rails ActiveModel fix: https://github.com/rails/rails/pull/10498

@alexreisner could you give feedback about this issue please