On Jul 22, 9:02 pm, Michael Bayer wrote:
> On Jul 22, 2009, at 8:48 PM, Randy Syring wrote:
> well this is really easy to analyze, turn on echo=debug and see what
> SQLite is returning. The mapping of SQLite names to SQLA column types
> in the 0.5 series is in sqlalchemy/databases/sqlite.py in
On Jul 22, 2009, at 8:48 PM, Randy Syring wrote:
>
> I work with the OP. The columns are correctly typed and the
> reflection code seems to work correctly with views that are directly
> selecting from tables. Its when a view selects from another view that
> we have problems with the type being
I work with the OP. The columns are correctly typed and the
reflection code seems to work correctly with views that are directly
selecting from tables. Its when a view selects from another view that
we have problems with the type being lost.
Can anyone else say for sure whether it is supported
good idea I added a ticket for that.
bojanb wrote:
>
> There was an error in my posted code, I meant:
>
> 'book_count': column_property(select([func.count(books.c.id)],
> book_authors.c.author_id==authors.c.id).label('books_count'))
>
> but that's irrelevant.
>
> Using and_(), the *correct* defin
There was an error in my posted code, I meant:
'book_count': column_property(select([func.count(books.c.id)],
book_authors.c.author_id==authors.c.id).label('books_count'))
but that's irrelevant.
Using and_(), the *correct* definition is:
'book_count': column_property(select([func.count(books.c
bojanb wrote:
> mapper(Book, books)
> mapper(Author, authors, properties={
> 'books': relation(Book, secondary=book_authors,
> backref='authors'),
> 'book_count': column_property(select([func.count(books.c.id)],
> book_authors.c.author_id==books.c.id).label('books_count'))
> })
>
the
Stone Puzzle wrote:
>
> I got those error messages
> ArgumentError: Could not determine join condition between parent/child
> tables on relation Friend.user. Specify a 'primaryjoin' expression. If
> this
> is a many-to-many relation, 'secondaryjoin' is needed as well.
primaryjoin and secondaryjoi
Hi, I'm using SA 0.5.5 with MySQL 5.0
I had no problems doing insertions on my InnoDB tables with SA 0.4.8 ubuntu
dist
However since yesterday, after upgrading to 0.5.5, insertions won't work my
InnoDB tables.
MyISAM tables work just fine.
Anyone have similar problems?
Thanks in advance
Sammy
I'm not sure if this is a bug or I am just setting up the attribute
wrong. Anyways, I'm having a problem defining count-type SQL mapped
attribute in a situation with many-to-many relationships.
The example here uses the classic book-author many-to-many relation.
An author can have many books, and
I am confused when I want to define the relation of User and User's Friends
(a user is another user's friend)
There is a example about association object pattern at
http://www.sqlalchemy.org/docs/05/mappers.html#association-object
Code from the document:
left_table = Table('left', metadata,
10 matches
Mail list logo