On Wed, Mar 05, 2008 at 08:31:12AM +0100, Christoph Haas wrote:
Basically I have three tables like 'companies', 'departments' and
'employees'. I have already set up foreign keys and gave all of them
one-to-many relationships. So a company has several departments. And
each department has
On Mar 4, 2008, at 7:27 PM, Phillip J. Eby wrote:
Okay, so I did a matching uninstrument_attribute and
pre_uninstrument_attribute, which look like really dumb names at this
point. I propose the following name changes (in addition to the ones
in my previous patch):
On Mar 5, 2008, at 3:35 AM, Denis S. Otkidach wrote:
All hash table implementations (including one in Python) work the same
way: first it looks up a list of key-value pairs by hash, and then
iterate through the list to find a needed key by comparing it with =
operator. Thus __eq__ method
pardon my sql-ignorancy, but cant u express this in just one
expression? it should be possible, it is a graph/set arithmetics
after all...
mmh, (could be very wrong!) something like
- get all rows that has some b_id from the looked list
- group(?) somehow by a_id, and then finger the a_id
On Mar 5, 2008, at 10:50 AM, Eric Ongerth wrote:
Anyway -- so what would really clean it all up would be:
session.query(A).filter(A.bs.contains(list_of_bs_being_sought)).all().
THAT would do exactly what I'm trying to accomplish. But it would
require contains() to accept a list and know
With SA version 0.3.11 I used to import InstrumentedList as follows:
from sqlalchemy.orm.attributes import InstrumentedList
Now I upgraded to SA 0.4.3 and cannot import InstrumentedList from the
same file.
I looked into the SQLAlchemy file attribute.py and noticed that this
file uses the
Moin, Michael...
thanks for your quick reply.
On Wed, Mar 05, 2008 at 11:16:33AM -0500, Michael Bayer wrote:
On Mar 5, 2008, at 4:14 AM, Christoph Haas wrote:
Meanwhile I re-read
http://www.sqlalchemy.org/docs/04/ormtutorial.html#datamapping_joins
explaining that a relation path
On Mar 5, 2008, at 1:00 PM, Christoph Haas wrote:
But now I'm curious. Why do I get the ArgumentError if I try
.filter(Company==my_company)
while
.filter(Company.id==my_company.id)
works? I was comparing ORM objects directly instead of fields/
properties
of a mapped object.
Ran into something this morning, fix and problem are simple.
Q) How do I map a column that is a Python reserved word or already used
by SA?
A)
table_a = Table ('tbl_a', metadata, autoload=True)
mapper(AObj, table_a, properties={'type_col' : table_a.c.type,
'pass_col':table_a.c['pass']})
This
Cool. I wasn't sure if it was ready for filter(A.bs == list_of_bs).
When I tried to do that before, I must have let some silly syntax
error keep me from realizing that it was a workable construction.
Thanks!
On Mar 5, 8:20 am, Michael Bayer [EMAIL PROTECTED] wrote:
On Mar 5, 2008, at 10:50
10 matches
Mail list logo