On Dec 27, 2011, at 10:37 AM, VDK wrote:
Michael,
I simplified my code just for test purposes. I'm now working with only
two columns, without order_by clause, commented a few other lines with
order by. I'm sure there is no order_by left in my code. I run the
script with echo set to debug.
Michael,
I simplified my code just for test purposes. I'm now working with only
two columns, without order_by clause, commented a few other lines with
order by. I'm sure there is no order_by left in my code. I run the
script with echo set to debug. The result:
Thanks for the code, your example runs without a problem.
I've managed to locate the error. In reality it doesn't have to do with
InstrumentedList. The problem occurs when beaker pickle.load()s from its
cache file (a pickled object in a file).
I get the following exception (which makes beaker
On Dec 27, 2011, at 4:54 AM, Arturo Sevilla wrote:
Thanks for the code, your example runs without a problem.
I've managed to locate the error. In reality it doesn't have to do with
InstrumentedList. The problem occurs when beaker pickle.load()s from its
cache file (a pickled object in a
On Dec 26, 5:12 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Dec 26, 2011, at 1:50 PM, Kent wrote:
Yes, a nice simplification.
I'm using it to lazyload attributes for objects that aren't in a
session. I'm not sure if you pointed me there, I think I found it
myself, but you
On Dec 27, 2011, at 8:10 AM, Kent wrote:
Sounds good, I'll look into that. But I'm curious why this approach
is preferable over the one I've currently got (callable_ seems more
public than _state_session).
callable_ does not accept the session as an argument, and while I looked into
Cool -- works nicely, thanks again!
On Fri, Dec 23, 2011 at 2:56 AM, Michael Bayer mike...@zzzcomputing.comwrote:
On Dec 22, 2011, at 7:28 PM, Michael Bayer wrote:
this could work really nicely with extend_existing, which has been
enhanced in 0.7.4, but there seem to be some glitches
In http://www.sqlalchemy.org/trac/changeset/7025%3A0a6576abea5b#file1
you added a warning that I'm hitting now.
'when save-update cascade is disabled, or the target object is
otherwise not
present in the session, and collection/scalar changes have taken
place. A warning
is emitted describing the
On Dec 27, 2011, at 1:51 PM, Kent wrote:
In http://www.sqlalchemy.org/trac/changeset/7025%3A0a6576abea5b#file1
you added a warning that I'm hitting now.
'when save-update cascade is disabled, or the target object is
otherwise not
present in the session, and collection/scalar changes have
Quick hack, figured I would share since there seemed to be other
people asking about it.
I couldn't get it to work with autoload=True for table reflection.
---
from sqlalchemy import types
from decimal import Decimal
class Money(types.UserDefinedType):
def get_col_spec(self):
On 12/27/2011 2:34 PM, Michael Bayer wrote:
On Dec 27, 2011, at 1:51 PM, Kent wrote:
In http://www.sqlalchemy.org/trac/changeset/7025%3A0a6576abea5b#file1
you added a warning that I'm hitting now.
'when save-update cascade is disabled, or the target object is
otherwise not
present in the
don't use the MONEY type in PostgreSQL, use NUMERIC instead.
On 12/27/2011 20:39, dgardner wrote:
Quick hack, figured I would share since there seemed to be other
people asking about it.
I couldn't get it to work with autoload=True for table reflection.
---
from sqlalchemy import types
from
On Dec 27, 2011, at 3:33 PM, Kent wrote:
Haha! I sense you're getting irritated, Mike!
oops...that should never show...
There are certain objects that aren't placed in the session because they
aren't in the merge cascade (purposefully). These are transient objects
I think that's
So see what happens if you, for the moment, just monkeypatch over
orm.session._state_session to do a lookup in a global context if
state.session_id isn't set. If that solves the problem of I want detached
objects to load stuff, for you and everyone else who wants this feature,
then
On Dec 27, 2011, at 5:21 PM, Kent wrote:
So see what happens if you, for the moment, just monkeypatch over
orm.session._state_session to do a lookup in a global context if
state.session_id isn't set. If that solves the problem of I want detached
objects to load stuff, for you and
Hi all.
I need to select some rows where pkey is in a sequence. How do I order
by that very sequence?
images_all =
session.query(AdImage).filter(AdImage.image_id.in_(images)).order_by(
? ).all()
Postgresql backend.
Thanks!
--
.oO V Oo.
--
You received this message because you
While there may be legitimate reasons to choose the numeric type
instead of the money type. This might not always be an option for
people, especially when working with existing database. If a type is
supported by a database back end there is no reason why it couldn't
and shouldn't be supported by
17 matches
Mail list logo