Tuesday 15 January 2013

python - Django, using ANY in a query -



python - Django, using ANY in a query -

this question has reply here:

django object multiple exclude() 3 answers

basically have this:

where not (`video_video`.`id` = **any** (select `userpreferences_history`.`video_id` `userpreferences_history`))

but using:

.exclude(id=history_list)

i get:

where not (`video_video`.`id` = (select `userpreferences_history`.`video_id` `userpreferences_history`))

resulting in 'subquery returns more 1 row when have more 1 result subquery.

how can this?

fixed next way: django object multiple exclude()

assuming history_list proper subquery, .exclude(id__in=history_list).

python mysql django django-queryset

No comments:

Post a Comment