It should be possible, given a set of base relation (definitions) plus foreign keys, to apply an injected strategy for renaming relation attributes so that they are naturally joinable.
Currently, this functionality is implemented as a DataMapper field naming strategy, but in order to support different (legacy) storage names, it makes sense that this is handled as relation rename operations.
While the scope of this issue is limited to applying the NaturalJoin renaming strategy to base relations (plus FK constraints) inferred from DataMapper::Model.descendants, it should be implemented in a way that makes it easy to integrate with #6.
It should be possible, given a set of base relation (definitions) plus foreign keys, to apply an injected strategy for renaming relation attributes so that they are naturally joinable.
Currently, this functionality is implemented as a
DataMapper
field naming strategy, but in order to support different (legacy) storage names, it makes sense that this is handled as relation rename operations.While the scope of this issue is limited to applying the
NaturalJoin
renaming strategy to base relations (plus FK constraints) inferred fromDataMapper::Model.descendants
, it should be implemented in a way that makes it easy to integrate with #6.