... ーションしたい場合は、次のようにします: >>> from django.db.models import OuterRef >>> from django.db.models.functions import JSONObject >>> from django.contrib.postgres.expressions import ArraySubquery >>> books = Book . objects . filter ( author = OuterRef ... ( "pk" )) . values ( ... json = JSONObject ( title = "title" , pages = "pages" ) ... ) >>> author = Author . objects . annotate ( books = ArraySubquery ( books )) . ... Subquery books title pages クエリ import author PostgreSQL contrib postgres expressions セット 構築 values models OuterRef JSONObject objects 固有 queryset ソース コンストラクタ Subquery QuerySet ArrayAgg クイック検索 Last update: 2026年10月09日 « previous ... ... ーションしたい場合は、次のようにします: >>> from django.db.models import OuterRef >>> from django.db.models.functions import JSONObject >>> from django.contrib.postgres.expressions import ArraySubquery >>> books = Book . objects . filter ( author = OuterRef ... ( "pk" )) . values ( ... json = JSONObject ( title = "title" , pages = "pages" ) ... ) >>> author = Author . objects . annotate ( books = ArraySubquery ( books )) . ... ... おけるリグレッションが修正されました。このリグレッションでは、PostgreSQL 16 以降でサーバーサイドバインディングを使用した際に JSONObject() がクラッシュする問題が発生していました ( #35734 )。 Django 5.1 におけるリグレッションが修正されました。このリグレッション ... ラッシュ アイテム リリースノート Transifex 最新 翻訳 反映 Concat ルックアップ trigram similar サーバー サイド バインディング JSONObject 問題 管理 画面 ダーク テーマ マルチセレクトウィジェット クイック検索 Last update: 2026年10月09日 « previous | up | next » ... ... name" ), ... "alias" , ... F ( "age" ) * 2 , ... ) ... ) . get () >>> author . json_array ['margaret smith', 'msmith', 50] JSONObject ¶ class JSONObject ( ** fields ) [ソース] ¶ キーと値のペアのリストを受け取り、それらのペアを含むJSONオブジェクトを返します ... 。 使用例: >>> from django.db.models import F >>> from django.db.models.functions import JSONObject , Lower >>> Author . objects . create ( name = "Margaret Smith" , alias = "msmith" , age = 25 ) >>> author = Author . obje ... cts . annotate ( ... json_object = JSONObject ( ... name = Lower ( "name" ), ... alias = "alias" , ... age = F ( "age" ) * 2 , ... ) ... ) . get () >>> author . json_ob ... ... おけるリグレッションが修正されました。このリグレッションでは、PostgreSQL 16 以降でサーバーサイドバインディングを使用した際に JSONObject() がクラッシュする問題が発生していました ( #35734 )。 Django 5.1 におけるリグレッションが修正されました。このリグレッション ... ... name" ), ... "alias" , ... F ( "age" ) * 2 , ... ) ... ) . get () >>> author . json_array ['margaret smith', 'msmith', 50] JSONObject ¶ class JSONObject ( ** fields ) [ソース] ¶ キーと値のペアのリストを受け取り、それらのペアを含むJSONオブジェクトを返します ... 。 使用例: >>> from django.db.models import F >>> from django.db.models.functions import JSONObject , Lower >>> Author . objects . create ( name = "Margaret Smith" , alias = "msmith" , age = 25 ) >>> author = Author . obje ... cts . annotate ( ... json_object = JSONObject ( ... name = Lower ( "name" ), ... alias = "alias" , ... age = F ( "age" ) * 2 , ... ) ... ) . get () >>> author . json_ob ... ... committed if the block exits without errors. A nested atomic block marked as durable will raise a RuntimeError . Added the JSONObject database function. ページネーション ¶ The new django.core.paginator.Paginator.get_elided_page_range() method allows genera ... ... ープ、および同順位(タイ)を除外できるようになりました。 QuerySet.order_by() が、アノテーションのトランスフォーム、たとえば JSONObject のキーや ArrayAgg のインデックスなどによる並び替えをサポートするようになりました。 F() 式と OuterRef() 式が、 CharField 、 ... ... committed if the block exits without errors. A nested atomic block marked as durable will raise a RuntimeError . Added the JSONObject database function. ページネーション ¶ The new django.core.paginator.Paginator.get_elided_page_range() method allows genera ... ... ープ、および同順位(タイ)を除外できるようになりました。 QuerySet.order_by() が、アノテーションのトランスフォーム、たとえば JSONObject のキーや ArrayAgg のインデックスなどによる並び替えをサポートするようになりました。 F() 式と OuterRef() 式が、 CharField 、 ... 2026年10月08日