Hi *,
is there a way to use the with_polymorphic mapper option for classes yet
to be defined?
My problem is that I have a base class for a number of different
database objects. There are few specific leafs classes of which many
instances are loaded at once.
Currently, I pass
Hello all,
Subject line says it all.
Basically what I want to do is to get last record from a result set.
I am dealing with a situation where given a date I need to know the last
record pertaining to transaction on a given account.
yes, it is an accounting/ book keeping software.
So I
perhaps we'd want to establish mapper.with_polymorphic as a setter that will
perform the requisite validations on it whenever it is set.I think you can
set it right now on the mapper at any point, it doesn't seem to be consulted in
any configurational way. The only validations that occur
On Jul 20, 2011, at 1:50 AM, Arthur Kopatsy wrote:
Hi,
My web application has a controller that spawns multiple threads using
a thread pool. Each of them has its own session (I store it in thread
local). Occasionally (1 out of 100 or more) I get really strange
errors that really look
I think, reversing the sort and getting the first record will do.
20-07-2011 16:32, Krishnakant Mane yazmış:
Hello all,
Subject line says it all.
Basically what I want to do is to get last record from a result set.
I am dealing with a situation where given a date I need to know the last
Well, there won't be a consistent result using sort because there might
be 10 rows with same voucher code and same account code.
That's exactly the challenge so I don't know how sort will help.
If we can invert the entire resultset having the last record become
first, then its worth while.
If you don't have something consistent to sort by, then I'm not sure that the
last record is meaningful, is it? If you have 10 rows with the same voucher
code and account code (and there is nothing else to uniquely identify them,
such as a more precise timestamp, or an auto-incrementing ID),
Hi Michael,
I indeed had a object hanging around and being shared across
threads... Thanks for the hint, you saved my week!
Arthur
On Jul 20, 6:46 am, Michael Bayer mike...@zzzcomputing.com wrote:
On Jul 20, 2011, at 1:50 AM, Arthur Kopatsy wrote:
Hi,
My web application has a controller
Hi!
I have two tables: A and B defined something like that:
A:
Column('id', Integer, primary_key=True),
Column('name', Unicode(256)),
Column('b_id', Integer, ForeignKey('b.id'))
B:
Column('id', Integer, primary_key=True),
Column('name', Unicode(256)),
declarative_base
tmp = session.query(Opt).all()
session.add(Opt(key='a', value='b'))
session.commit()
File /usr/local/lib/python3.2/dist-packages/SQLAlchemy-0.7.1-
py3.2.egg/sqlalchemy/orm/session.py, line 617, in commit
self.transaction.commit()
File
Can I ask that you put a little more effort into providing context / mappings /
specifics for this stack trace (see guidelines at
http://www.sqlalchemy.org/support.html#mailinglist ) ? Clearly If I make a
sample Opt() class with two fields and commit it, no such error occurs. There
is some
That is very strange. I am from a few hours struggling with this ...
stripped application on the first ...
There is nothing else.
Ordinary simple table. On it a select and an insert (with ORM, of
course).
Rest a while and try to prepare a complete test case. Unless I find a
solution on the way :]
12 matches
Mail list logo