1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #35586 -- Added support for set-returning database functions.

Aggregation optimization didn't account for not referenced set-returning annotations on Postgres.

Co-authored-by: Simon Charette <charette.s@gmail.com>
This commit is contained in:
Devin Cox
2024-08-09 13:56:56 -07:00
committed by Sarah Boyce
parent 228128618b
commit e03083917d
6 changed files with 54 additions and 0 deletions

View File

@@ -58,3 +58,11 @@ class Company(models.Model):
class Ticket(models.Model):
active_at = models.DateTimeField()
duration = models.DurationField()
class JsonModel(models.Model):
data = models.JSONField(default=dict, blank=True)
id = models.IntegerField(primary_key=True)
class Meta:
required_db_features = {"supports_json_field"}