Cool, thanx
On 16 окт, 19:15, Ants Aasma [EMAIL PROTECTED] wrote:
With
session.query(User).options(undefer(User.column_a),
defer(User.column_b), noload(User.column_c))
column_a will be loaded with the query, column_b will be loaded on
access and column_c will be None regardless of the value
Thanks for the solution!
But i get the warning for this query:
SELECT address.name AS address_lang, user.name AS user_name
FROM addresses
LEFT OUTER JOIN user ON user.id = address.user_id
Throws
sqlalchemy-0.5.0rc2dev_r5150-py2.5.egg\sqlalchemy\sql\expression.py:
1616: SAWarning: Column 'name'
Hi,
I'm using SQLA 0.5.0rc2 and am running into a problem. I've got a
piece of code like this:
import sys
import logging
import sqlalchemy as sa
from sqlalchemy.orm import sessionmaker
logging.basicConfig(stream=sys.stderr)
logging.getLogger('sqlalchemy.pool').setLevel(logging.ERROR)
engine =
On Oct 17, 2008, at 9:22 AM, Ids wrote:
Hi,
I'm using SQLA 0.5.0rc2 and am running into a problem. I've got a
piece of code like this:
import sys
import logging
import sqlalchemy as sa
from sqlalchemy.orm import sessionmaker
logging.basicConfig(stream=sys.stderr)
hi,
on Mapper() i have relation() i use primaryjoin, and uselist=False,
but i also want to have LIMIT=1 on my join
it would be much faster!!
SA should add the limit itself when uselist=False
--~--~-~--~~~---~--~~
You received this message because you are
On Oct 17, 2008, at 3:32 PM, g00fy wrote:
hi,
on Mapper() i have relation() i use primaryjoin, and uselist=False,
but i also want to have LIMIT=1 on my join
it would be much faster!!
SA should add the limit itself when uselist=False
uselist=False is intended for a one-to-one relation
I can't make this work with my relation:
mapper(Warehouse, warehouse_table,properties = {
'translation': relation(
WarehouseTranslation,
lazy = False,
uselist = False,
On Oct 17, 2008, at 4:22 PM, g00fy wrote:
I can't make this work with my relation:
mapper(Warehouse, warehouse_table,properties = {
'translation': relation(
WarehouseTranslation,
lazy = False,
On Oct 16, 11:41 am, Adam [EMAIL PROTECTED] wrote:
I'm using Postgres 8.3 and sqlalchemy 0.5.0rc2 - when I'm doing a
select, it seems I can't concatenate a function with another column -
rather that use the || operator, it tries to use the || operator.
Code to reproduce example:
import
On Oct 16, 9:39 am, Heston James - Cold Beans
[EMAIL PROTECTED] wrote:
Afternoon Guys,
I have a suspicion that I'm leaving MySQL database connections open when I
shouldn't be and I'm trying to understand how they are managed by
SQLAlchemy.
I currently create an engine instance and bind
Is there a way to do executemany() semantic updates? Suppose I have a list of
employee id's and I want to do something like:
ids = [1, 2, 3, 4, 5, 6]
session.execute( tbl_employees.update(tbl_employees.c.id == ids),
tbl_employees.c.status=you're fired )
11 matches
Mail list logo