Hi
on sqlalchemy 0.7.4
Using ForeignKeyConstraint it happens that join() or outerjoin() does
not find foreign keys
while using ForeignKey on field declaration works (see attachment), is
this a nomal sa behaviour?
Thanks
--
You received this message because you are subscribed to the Google
Michael Bayer ha scritto:
Marco De Felice wrote:
Hi all
This unusual problem appeared today.
I have a mapper extension that gets called twice if I do a query on a
relate_table while updating properties of a mapped object.
I do something like this:
myObj = myMappedObject
session.begin
By the way, I just wanted to let you know that while I don't usually use
this mailing list, we're on the way to have a gui application used on
production that uses sqlalchemy and it all works very well (also
considering the little time I have to study SA, I just use it)
--
You received this
Hi
I have a huge Agents table with many relations and a Orders table
with agent field related via r_agent to Agents.
When I filter like orders.r_agent.has(Agents.name.ilike(test)) the
query is too slow.
I came up with creating a view Agents_small on the database Agents
table whith only a few
Michael Bayer ha scritto:
Is the solution that you created a new table which is receiving a copy of
some rows (essentially materialized view) ? otherwise I don't see what
is allowing a speed change.
Thanks, that confirms my suspects. There's some problem elsewhere in my
code.
Michael Bayer wrote:
the most straightforward way is to have Parent/Child descend from a
common base class and use concrete table inheritance in conjunction
with polymorphic_union, as described in :
given the structure below (pasted from SA 0.5 docs of association object):
left_table = Table('left', metadata,
Column('id', Integer, primary_key=True),
Column('l_data', String(50))
right_table = Table('right', metadata,
Column('id', Integer, primary_key=True),
Column('r_data',
While migrating I came across the following sequence of actions, I had
some old code that called session.close() elsewhere in the application
and also I tend to use sqlalchemy as a temporary object cache knowing
this is somewhat discouraged.
Anyway is it correct that nothing happens when calling
Hi
I'm thinking about a simple client side table audit with SA. Given the
audit log pattern: http://martinfowler.com/ap2/auditLog.html
wouldn't it be simple to adapt it to a mapped class?
I was thinking of a log() function inside the mapped class that if
called saves data into a second table
Michael Bayer ha scritto:
its most likely uncompiled mappers. the c attribute on the class
is deprecated; use Table.attribute instead.
...
Thanks, but it seems the Table.c.attribute has a .op() method that I
can't find on Table.attribute
With SA 0.4beta4 if I try to access a mapped object field
(Table.c.fieldname) before any query has been sent to the database the
call fails with a AttributeError(key). Everything works if I do this
after having issued a query.
-- Example: (skip to the __main__ section)
import sqlalchemy as sqa
Hi all for my first post
I'm using the new one() method like this:
query(Table).filter_by(and_(Table.c.field1 == val1, Table.c.field2 ==
val2)).one()
filed1 + field2 has a unique constraint in Table, so there won't never
be more than one row returned, but there may be none.
When there's none I
12 matches
Mail list logo