snusnu / ramom

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

Infer keys from DataMapper::Model.descendants #8

Closed snusnu closed 10 years ago

snusnu commented 10 years ago

When constructing base relations from DataMapper::Model.descendants using Ramom::Relation::Builder::DM, it should respect :key, :unique and :unique_index options.

The convention shall be that the first of all candidate keys will be the primary key.

snusnu commented 10 years ago

Since Axiom::Relation::Keys are implemented in terms of a set, there's no way to establish the convention that the first key is to be treated as the primary key. At least not in axiom itself.