On Tue, Jun 19, 2007 at 02:21:51AM +0300, [EMAIL PROTECTED] wrote:
Perfectly. Although all the hassle makes me think even harder if
there is really no other way of connecting these two database
tables. A casted join with string comparison gets dirtier every
time I look at it. :(
excuse
Perfectly. Although all the hassle makes me think even harder
if there is really no other way of connecting these two
database tables. A casted join with string comparison gets
dirtier every time I look at it. :(
excuse me if it sounds dumb... what about a middleman table of
This looks like a good solution. I'll need some time to provide a test
case, however.
If the change breaks existing code, how are cross-schema references
supposed to be handled?
Best regards
Klaus
On 18 Jun., 21:54, Michael Bayer [EMAIL PROTECTED] wrote:
On Jun 18, 2007, at 4:25 AM, [EMAIL
The way to hook most parts of the ORM is by creating a MapperExtension
http://www.sqlalchemy.org/docs/adv_datamapping.html#advdatamapping_exte
nding. Basically, define a subclass of MapperExtension, overriding
whichever method you are interested in (possibly append_result or
create_instance in
hmm it gives with use_scope_identity=False and r2746:
File /home/stefanb/src/hor/sqlalchemy/engine/strategies.py, line
106, in create
raise TypeError(Invalid argument(s) %s sent to create_engine(),
using configuration %s/%s/%s. Please check that the keyword arguments
are appropriate for
I have a mapper defined as
mapper(HierNode, HierTable, properties={
'tools' : relation(ToolNode),
})
Usually I am interested in iterating over all 'tools' and lazy loading
works fine. However sometimes I need to determine if one HierNode
has tools or not. Loading all tools would be too
shame on me I omit your ...addng the keyword parameter..., i.e.
db_mssql = create_engine( 'mssql://sa:[EMAIL PROTECTED]
use_scope_identity=1', module= pyodbc)
unfortunately with scope identity it crashes earlier - mssql.py
returns None for id and rollbacks.
best regards
stefan
g'day
i have Links, pointing to Nodes.
Adding just Links to session + flush() works as expected - both Links
and Nodes got saved.
Doing session.close() although does not always detach all related
objects, i.e. sometimes some Nodes stay with _session_id on them
after session is long gone.
On 6/11/07, Michael Bayer [EMAIL PROTECTED] wrote:
secondly: a non-primary mapper is just an awkward way of defining an
ORM query. Since we support generative queries now, you can just
make a Query object with the criterion youre looking for and just
hold onto it...youre just adding a single
On Jun 19, 2007, at 1:43 PM, Jonathan Ellis wrote:
On 6/11/07, Michael Bayer [EMAIL PROTECTED] wrote:
secondly: a non-primary mapper is just an awkward way of defining an
ORM query. Since we support generative queries now, you can just
make a Query object with the criterion youre looking
On 6/15/07, Michael Bayer [EMAIL PROTECTED] wrote:
create_session().query(Whatever).filter(...).all()
You added .all() when I wasn't looking? :)
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
On Jun 19, 3:50 pm, Mike Orr [EMAIL PROTECTED] wrote:
On 6/15/07, Michael Bayer [EMAIL PROTECTED] wrote:
create_session().query(Whatever).filter(...).all()
You added .all() when I wasn't looking? :)
--
Mike Orr [EMAIL PROTECTED]
if its not there i need to add it since id like to get
12 matches
Mail list logo