Hi.
Malcolm Tredinnick wrote:
> I'll agree this one isn't too obvious (until you see the answer):
>
> Blog.objects.filter(entries__isnull = False)
>
> will do what you want (have a look at the underlying SQL query is you
> are interested in seeing that it really works as advertised).
I'm on the current trunk ( 0.95 (post-magic-removal) )
"entries__isnull=False" gives me:
psycopg.ProgrammingError: FEHLER: Spalte
m2m_models_blog__entries.entries existiert nicht
SELECT
"models_blog"."id","models_blog"."title","models_blog"."description","models_blog"."region_id","models_blog"."regionname","models_blog"."date_submitted","models_blog"."author_id","models_blog"."visible"
FROM "models_blog" LEFT OUTER JOIN "models_blog_entries" AS
"m2m_models_blog__entries" ON "models_blog"."id" =
"m2m_models_blog__entries"."blog_id" WHERE
("m2m_models_blog__entries"."entries" IS NOT NULL)
There's no "m2m...." stuff in the DB that I can find.
Daniel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---