well, i tried it manualy and it works (sqlite).
here the eagerloading query:
model-description (joined_inheritance):
class A:
name = Text()
class B(A):
address = reference( Adress)
nom = reference( Nomerator)
class C(A): pass
select * from A
left outer join B on A.db_id = B.db_id
Michael Bayer wrote:
that doesnt sound right. taking out select_table, and doing:
print
Media
.query
.select_from
(media_table
.join
(catalog_table
).join
(catalog_channel_table
)).filter(CatalogChannel.c.id_channel==playlist.id_channel).all()
leads to the SQL:
On Jan 11, 2008 8:41 PM, Michael Bayer [EMAIL PROTECTED] wrote:
what that looks like to me is that you're attempting to query the
database for object ID #1 using merge().
when you merge(), its going to treat the object similarly to how it
does using session.save_or_update(). that is, it
Rick,
On Jan 10, 7:02 pm, Rick Morrison [EMAIL PROTECTED] wrote:
For a stepwise migration from raw, SQL, it will probably be easier to get
your mind around the SQL-expression side of the library, and then adopt ORM
features as you feel comfortable with them.
On the SQL-expression side of
Hello all,
Can I get the parent table from an inherited table?
something like:
table_a = Table()
table_b = Table()
mapper(TableA, table_a)
mapper(TableB, table_b, inherits=TableA)
table_b.get_parent()
the reason I need it, is that I need to get information about the master
table, because
Hi,
I've an error when I try to execute a clear() method from session
object.
Traceback (most recent call last):
File V:\nacer\bin\gui\planilla.py, line 280, in
on_btn_apply_clicked
self._savePlanilla()
File V:\nacer\bin\gui\planilla.py, line 200, in _savePlanilla
On Jan 15, 2008, at 4:33 AM, svilen wrote:
also, i dont see a reason for it not to work if the (A jon B join C)
is a polymunion - all the same, all columns will be present there,
having None where missing.
0.4.3?
unlikely, I dont see how it could work from a generic standpoint.
the
Hey Mike
You don't need to go through that. Just populate the dictionary used for the
execute() with the appropriate column name as the key, and you're good to
go.
On Jan 15, 2008 10:05 AM, Mike [EMAIL PROTECTED] wrote:
Rick,
On Jan 10, 7:02 pm, Rick Morrison [EMAIL PROTECTED] wrote:
For
On Jan 15, 2008, at 8:20 AM, Denis S. Otkidach wrote:
On Jan 11, 2008 8:41 PM, Michael Bayer [EMAIL PROTECTED]
wrote:
what that looks like to me is that you're attempting to query the
database for object ID #1 using merge().
when you merge(), its going to treat the object similarly to
On Jan 15, 2008, at 9:59 AM, maxi wrote:
Hi,
I've an error when I try to execute a clear() method from session
object.
Traceback (most recent call last):
File V:\nacer\bin\gui\planilla.py, line 280, in
on_btn_apply_clicked
self._savePlanilla()
File V:\nacer\bin\gui\planilla.py,
On Tuesday 15 January 2008 17:19:49 Michael Bayer wrote:
On Jan 15, 2008, at 4:33 AM, svilen wrote:
also, i dont see a reason for it not to work if the (A jon B join
C) is a polymunion - all the same, all columns will be present
there, having None where missing.
0.4.3?
unlikely, I
Hi all for some reason i cannot work over the code before the result.
The result was a SelectResults qry.
Now i must do something like:
MySelectResults.group_by( table.c.colname ).having( func.count(
table.c.colname ) x )
Does anyone have any suggestion?
Thank you
Glauco
--
On Jan 15, 2008, at 10:49 AM, svilen wrote:
hmmm, specify explicitly?
e.g. query(A).eagerload( B.address)
joined-inh via left-outer-join is enough, no need for polymunion.
uh well i supposeeagerload options dont really affect the
traversal that way and it would take some non-trivial
On Jan 15, 2008, at 7:37 AM, Max Ischenko wrote:
Hello,
I need to access two databases from my app. I'm trying to use
scoped_session helper:
SessionA = scoped_session(sessionmaker(autoflush=True,
transactional=False))
SessionB = scoped_session(sessionmaker(autoflush=True,
On Jan 15, 9:20 am, Rick Morrison [EMAIL PROTECTED] wrote:
Hey Mike
You don't need to go through that. Just populate the dictionary used for the
execute() with the appropriate column name as the key, and you're good to
go.
On Jan 15, 2008 10:05 AM, Mike [EMAIL PROTECTED] wrote:
Two issues:
a) You need to give SA a table definition for the table you're trying to
update.
b) You need to specify the name of the column to update in the dict(), not
the string 'key'
I've updated the script to work by passing in both the column name to update
and the update value to use. I've
hmmm, specify explicitly?
e.g. query(A).eagerload( B.address)
joined-inh via left-outer-join is enough, no need for polymunion.
i dont know how the current machinery for eagerload works, but imo
knowing your level of lookahead-design, it should not be hard to
apply that machinery over a
On Jan 15, 2008, at 5:17 PM, [EMAIL PROTECTED] wrote:
hmmm, specify explicitly?
e.g. query(A).eagerload( B.address)
joined-inh via left-outer-join is enough, no need for polymunion.
i dont know how the current machinery for eagerload works, but imo
knowing your level of lookahead-design,
Michael Bayer wrote:
On Jan 15, 2008, at 5:17 PM, [EMAIL PROTECTED] wrote:
hmmm, specify explicitly?
e.g. query(A).eagerload( B.address)
joined-inh via left-outer-join is enough, no need for polymunion.
i dont know how the current machinery for eagerload works, but imo
knowing your
19 matches
Mail list logo