I have the next mapper:

mapper(DBBook,outerjoin(books_table,fulltext_table,books_table.c.id==fulltext_table.c.id),properties={
        'id':[books_table.c.id,fulltext_table.c.id]
})

This row should return the books without fulltext

book=db_session.query(DBBook).filter(DBBook.fulltext_body==null()).all()

And it generates the next MySQL code:

SELECT books.id AS books_id, books_fulltext.id AS books_fulltext_id,
books.name AS books_name, books.author AS books_author,
books.description AS books_description, books.publisher AS
books_publisher, books.year AS books_year, books.pages AS books_pages,
books.link AS books_link, books.md5 AS books_md5, books.section AS
books_section, books_fulltext.fulltext_scanned AS
books_fulltext_fulltext_scanned, books_fulltext.fulltext_body AS
books_fulltext_fulltext_body
FROM books LEFT OUTER JOIN books_fulltext ON books.id =
books_fulltext.id
WHERE books_fulltext.fulltext_body IS NULL ORDER BY books.id

Running this query through PhpMyAdmin returns some results, but python
code returns nothing! Is it a bug or not?

>>> print sqlalchemy.__version__
0.4.1
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to