Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

Better relationship definition and validation #2

Open
WanWizard opened this issue Jul 23, 2012 · 0 comments
Open

Better relationship definition and validation #2

WanWizard opened this issue Jul 23, 2012 · 0 comments

Comments

@WanWizard
Copy link
Owner

In Datamapper v1.x a relationship definition is required in both models participating in the relation, because depending on the query constructed either one can be used, and in some cases information from both is needed.

Datamapper v2.x needs a new relationship definition system where this is no longer needed, you should be able to define only one side if you never need to access it from the other side.

Also, to eliminate all the current "guessing" code, a relationship definition should contain all information needed to construct the relation, including the name, the destination model class, the relationship type, possiblt through model information, and the location of primary and foreign keys.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant