snusnu / ramom

relational algebra meets object mapping
MIT License
6 stars 0 forks source link

Support schema wide renaming strategies #13

Closed snusnu closed 10 years ago

snusnu commented 10 years ago

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.