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

Added id accessor to foreign relations, similar to Django. #610

Merged
merged 1 commit into from
May 24, 2015
Merged

Added id accessor to foreign relations, similar to Django. #610

merged 1 commit into from
May 24, 2015

Conversation

tals
Copy link
Contributor

@tals tals commented May 23, 2015

Models with a ForeignKeyField instance now receive an additional attribute - attr_name_id. This allows you to access the foreign id without bringing in the entire model.

It's currently missing tests, but I figured I should see if you're interested in this first :)

Models with a ForeignKeyField instance now receive an additional attribute - attr_name_id. This allows you to access the foreign id without bringing in the entire model.
@coleifer
Copy link
Owner

Well, I originally didn't want to add this, but thinking about it, enough people have requested this that maybe it'd be a good idea. Thanks I'll go ahead and add some tests.

coleifer added a commit that referenced this pull request May 24, 2015
Added id accessor to foreign relations, similar to Django.
@coleifer coleifer merged commit 4d3c6d2 into coleifer:master May 24, 2015
coleifer added a commit that referenced this pull request May 24, 2015
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

Successfully merging this pull request may close these issues.

None yet

2 participants