在使用Django 你可能換看到 _set.all() 的 描述。
"Django also creates API accessors for the “other” side of the relationship – the link from the related model to the model that defines the relationship. For example, a Blog object b has access to a list of all related Entryobjects via the entry_set attribute: b.entry_set.all().
All examples in this section use the sample Blog, Author and Entrymodels defined at the top of this page."
Making queries | Django documentation | Django
https://docs.djangoproject.com/en/1.5/topics/db/queries/
沒有留言:
張貼留言