I use ENUM types for postgres. Reflection does not preserve the ENUM name
within its sequence. Name is required on postgres. I don't want to edit my
50+ tables and add names to them just for a migration, this is why
reflection does not work in my case.
--
Thadeus
On Mon, Dec 6, 2010 at 4:29
What if your query already has a join yet you need to add another WHERE
clause to the join? This fails with This query already has a join for Table
xxx. Any way to modify your join to a query after you join it?
--
Thadeus
On Wed, Dec 1, 2010 at 8:08 AM, Michael Bayer
I'm about to use sqlalchemy-migrate, however all of my tables are already in
a declarative format.
Is there a script out there that will convert a declarative model syntax to
table model? I'm looking to just paste my model in declarative and it spit
out a tablename = Table(...) format for me to
)
print
print #, - * 79
print
--
Thadeus
On Fri, Dec 3, 2010 at 1:02 PM, Thadeus Burgess thade...@thadeusb.comwrote:
I'm about to use sqlalchemy-migrate, however all of my tables are already
in a declarative format.
Is there a script out there that will convert
I actually have this same issue as well..
I have a field that means the record has been tested. Any updates to the
field make tested = False, all except for one other field. However when I
updated that field and this field it still gets reset to false..
record.approved=True
record.tested=True
The only way around this is to do two separate commits
record.approved = True
db.session.commit()
record.tested = True
db.session.commit()
record.approved is True
record.tested is True
--
Thadeus
On Thu, Oct 28, 2010 at 2:22 PM, Thadeus Burgess thade...@thadeusb.comwrote:
I actually have
of the (correct) first one, but it
works ! Or is it two errors cancelling each other ?
Y.Chaouche
--- On *Thu, 10/14/10, Thadeus Burgess thade...@thadeusb.com* wrote:
From: Thadeus Burgess thade...@thadeusb.com
Subject: Re: [sqlalchemy] Checking the availablity of a booked Item
To: sqlalchemy@googlegroups.com
Date: Wednesday, October 13, 2010, 5:25 AM
Thank you Thadeus, I believe
Face.query.filter(filter_cond).outerjoin(join_clause).all() does a full
outerjoin, or is there another way to do it ?
Y.Chaouche
--- On *Wed, 10/13/10, Thadeus Burgess thade...@thadeusb.com
For outer joins you need a where clause on the joined tables.
http://www.codinghorror.com/blog/2007/10/a-visual-explanation-of-sql-joins.html
Using a full outer join should return the expected results.
--
Thadeus
On Tue, Oct 12, 2010 at 1:41 PM, chaouche yacine
yacinechaou...@yahoo.comwrote:
Is there a way to specify the way a column represents itself when
converted to string?
For example, I would like to automatically get all columns from
table.c, and iterate over a record printing its fields. However when I
come across a FK field, I would like to instead of printing out the
integer
If I have a record object.
me = Person.query.get(id)
and I access me.__dict__ everything looks good.
However when I execute a db.session.commit()
the me.__dict__ disappears and only contains _sa_state_instance
The second I access an attribute of the me instance, __dict__ comes back.
What is
11 matches
Mail list logo