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

Clarification in conditional docs #776

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

szerfas1
Copy link

@szerfas1 szerfas1 commented May 1, 2020

Ran around looking for clarification this morning and figured I'd save others the time.

@@ -100,7 +100,7 @@ This example will update a `Thread` item, if the `views` attribute is less than
.. code-block:: python

thread_item.update(condition=(Thread.views < 5) | (Thread.views > 10))

Note that here capital-T `Thread` refers to the record currently saved in the DB with the same unique ID as the Thread model instance `thread_item`, rather than the Thread model class.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capital-T Thread here, as in Thread.views < 5 is the Thread class, from whose attribute you derive a query condition. Or am I misunderstanding something?

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.

2 participants