﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17585	Not possible to filter authors that have books other than hardcover	mbertheau@…	nobody	"It seems that the Django ORM cannot express in one query

SELECT a.* FROM author AS a JOIN book AS b ON b.author_id = a.id WHERE b.bound <> 'hardcover' GROUP BY a.id

that is all authors that have at least one book that is not hardcover.

Both exclude(book__bound='hardcover') and filter(~Q(book__bound='hardcover')) leave only authors that had no hardcover books at all.

A field lookup 'not equal' could be provided with that meaning. Alternatively, the meaning of filter(~Q(book__bound='hardcover')) could be changed."	New feature	closed	Database layer (models, ORM)	1.3	Normal	worksforme		mbertheau@… anssi.kaariainen@…	Unreviewed	0	0	0	0	0	0
