rom-rb / rom

Data mapping and persistence toolkit for Ruby
https://rom-rb.org
MIT License
2.08k stars 161 forks source link

Setting output_schema is skipped when there are no read types #539

Open solnic opened 5 years ago

solnic commented 5 years ago

This makes sense in case of adapters where key coercion is not required, but when it is, we ALWAYS need to use an output_schema because it will handle key coercion even when there are no read types defined.

This already caused issues in rom-elasticsearch and rom-http, both currently override output_schema Relation option as a workaround.

solnic commented 5 years ago

@flash-gordon what's the best way to detect if a hash schema has key types that require coercion? (talking about dry types schemas)