... ーションしたい場合は、次のようにします: >>> 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 におけるリグレッションが修正されました。このリグレッション ... ... 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 generati ... ... ープ、および同順位(タイ)を除外できるようになりました。 QuerySet.order_by() が、アノテーションのトランスフォーム、たとえば JSONObject のキーや ArrayAgg のインデックスなどによる並び替えをサポートするようになりました。 F() 式と OuterRef() 式が、 CharField 、 ... ... ield lookup type jsonfield.has_keys field lookup type jsonfield.key field lookup type JSONNull (django.db.models のクラス) JSONObject (django.db.models.functions のクラス) JsonResponse (django.http のクラス) K keep_lazy() (django.utils.functional モジュール ... 2026年10月08日