rom-rb / rom

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

Schema#[] should raise if more than one attribute was found #529

Closed solnic closed 4 years ago

solnic commented 5 years ago

If a schema contains more than one attribute with the same name, which can happen when you join schemas in sql, using Schema#[] will return the first matching attribute. This should be changed to raise an error when more than one attribute was found.

This is a bug fix but in a way it's also a breaking change, so this goes to 6.0.0.

Refs #524