rom-rb / rom

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

Decouple Command from Relation #605

Open solnic opened 4 years ago

solnic commented 4 years ago

At the moment commands rely on relation objects, which is problematic and makes configuration/setup and other features more complex. The reason why this is done like that is because in the early days relations didn't create commands, commands were completely standalone and they offered features that were partly provided by the relations, like restricting a command through a relation view.

Currently relations produce their own commands but they still inject themselves into the command constructor. This should be simplified by: