Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
b9b84111
Kaydet (Commit)
b9b84111
authored
Mar 07, 2015
tarafından
Floris den Hengst
Kaydeden (comit)
Tim Graham
Mar 10, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #24432 -- Added docs for ManyToManyFields that reside in and refer to the same model.
üst
756cee46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
fields.txt
docs/ref/models/fields.txt
+13
-1
No files found.
docs/ref/models/fields.txt
Dosyayı görüntüle @
b9b84111
...
...
@@ -1377,7 +1377,10 @@ that control how the relationship functions.
If you don't specify an explicit ``through`` model, there is still an
implicit ``through`` model class you can use to directly access the table
created to hold the association. It has three fields:
created to hold the association. It has three fields to link the models.
If the source and target models differ, the following fields are
generated:
* ``id``: the primary key of the relation.
* ``<containing_model>_id``: the ``id`` of the model that declares the
...
...
@@ -1385,6 +1388,15 @@ that control how the relationship functions.
* ``<other_model>_id``: the ``id`` of the model that the
``ManyToManyField`` points to.
If the ``ManyToManyField`` points from and to the same model, the following
fields are generated:
* ``id``: the primary key of the relation.
* ``from_<model>_id``: the ``id`` of the instance which points at the
model (i.e. the source instance).
* ``to_<model>_id``: the ``id`` of the instance to which the relationship
points (i.e. the target model instance).
This class can be used to query associated records for a given model
instance like a normal model.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment