Bobsans
Bobsans
I want to do this thing: ```python class Phone(models.Model): number = models.CharField() use_count = ComputedField(Count('records')) class Record(models.Model): phones = models.ManyToManyField(Phone, related_name='records') ``` but it does not work. Although if you...
And here is DB queries: When using annotate: ```python Phone.objects.annotate(count=Count('records'))[:5] ``` ```sql SELECT "phones_phone"."id", COUNT("records_record_phones"."record_id") AS "count" FROM "phones_phone" LEFT OUTER JOIN "records_record_phones" ON ("phones_phone"."id" = "records_record_phones"."phone_id") GROUP BY "phones_phone"."id"...
But idea of this module very cool) Thank you.
It's work, but `query.group_by` not always tuple. And next code work correctly: ```python class Phone(models.Model): number = models.CharField() verified = models.BooleanField() use_count = ComputedField(Count('records')) class Record(models.Model): phones = models.ManyToManyField(Phone, related_name='records')...
same problem. maybe it's worth adding the ability to change the names of uniforms and attributes in the configuration, for example, using some kind of dictionary, for example ```json "uniforms_override":...
These are methods for adding conditions. For example `.HavingExists(...)` will generate `SELECT ... FROM ... HAVING EXISTS(...)`. And `.WhereExists(...)` will generate `SELECT ... WHERE EXISTS(...)`. The `Query` class has a...