... dels . CASCADE ) これは、現在 ForeignKey が複合主キーを持つモデルを参照できないためです。 この制限を回避するには、代わりに ForeignObject が使えます: class Foo ( models . Model ): item_order_id = models . CharField ( max_length = 20 ) item_product_id = models ... . IntegerField () item = models . ForeignObject ( OrderLineItem , on_delete = models . CASCADE , from_fields = ( "item_order_id" , "item_product_id" ), to_fields = ( "ord ... er_id" , "product_id" ), ) ForeignObject は ForeignKey によく似ていますが、データベース上にカラム (例: item_id )、外部キー制約、インデックスなどを作成しない点、 on ... ... 用することで悪用される可能性がありました。 バグ修正 QuerySet.values() または values_list() を、複数のフィールドで構成される ForeignObject と共に使用した際に、参照されるフィールドのタプルではなく誤った結果を返していたバグを修正しました( #36431 )。 ... ... n't support it (MySQL and MariaDB), the fields are marked as deferred to trigger a refresh on subsequent accesses. Using a ForeignObject with multiple from_fields in Model indexes, constraints, or unique_together now emits a system check error. ページネーショ ... ango.db.models.sql.datastructures.Join no longer falls back to get_joining_columns() . The get_joining_columns() method of ForeignObject and ForeignObjectRel is removed. The ForeignObject.get_reverse_joining_columns() method is removed. Support for cx_Oracle ... ... . Restored the functionality of the admin's list_editable add and change buttons ( #25903 ). Fixed isnull query lookup for ForeignObject ( #25972 ). Fixed a regression in the admin which ignored line breaks in read-only fields instead of converting them to <b ... ... 。 隠された関係のクエリ名のクラッシュに対するシステムチェックを追加しました ( #26162 )。 Fixed a regression for cases where ForeignObject.get_extra_descriptor_filter() returned a Q object ( #26153 ). Fixed regression with an __in=qs lookup for a ForeignKey wit ... ... いてすべての位置指定のフォーマット引数をエスケープするようになりました。 バグ修正 CompositePrimaryKey を持つモデルに由来する ForeignObject に対して select_related を使用した際に発生していたクラッシュを修正しました( #36373 )。 Django 5.2 において、 "pk" を使用 ... ... s now properly decoded from its default iso-8859-1 encoding ( #21996 ). Fixed AttributeError when using bulk_create() with ForeignObject ( #21566 ). Fixed crash of QuerySet s that use F() + timedelta() when their query was compiled more once ( #21643 ). Preve ... ... dmin.lookup_allowed() のシグネチャに追加されました。この引数を受け入れない ModelAdmin のサブクラスのサポートは非推奨です。 ForeignObject と ForeignObjectRel の get_joining_columns() メソッドは非推奨です。Django 6.0 から、 django.db.models.sql.datastructures.J ... t_joining_columns() へのフォールバックを行わなくなります。サブクラスでは代わりに get_joining_fields() を実装するべきです。 ForeignObject.get_reverse_joining_columns() メソッドは非推奨になりました。 The default scheme for forms.URLField will change from "http" ... ... 須となります。 django.db.models.sql.datastructures.Join は、これ以降 get_joining_columns() にフォールバックしなくなります。 ForeignObject と ForeignObjectRel のメソッド get_joining_columns() は削除されます。 ForeignObject.get_reverse_joining_columns() メソッド ... ... property of django.db.models.sql.query.Query and the where_class argument to the private get_extra_restriction() method of ForeignObject and ForeignObjectRel are removed. If needed, initialize django.db.models.sql.where.WhereNode instead. The filter_clause ar ... 2026年10月08日