Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow creating many to one rules #37

Open
dwiel opened this issue Feb 6, 2016 · 0 comments
Open

allow creating many to one rules #37

dwiel opened this issue Feb 6, 2016 · 0 comments

Comments

@dwiel
Copy link
Owner

dwiel commented Feb 6, 2016

For example:

gc.rule(['person.children.id', 'person.children.age'], 'person.oldest_child.id', cardinality='many-to-one')
def person_oldest_child(ids, ages):
    return argmax(ages, ids)

In this case, would a query which also fetches children and constrains them affect the oldest_child?

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

No branches or pull requests

1 participant