Michael Bayer wrote:
if your application keeps a handle on objects after the request is
complete, and then passed them somewhere else, like a background thread or
something, then the subsequent request is going to be potentially touching
those objects at the same time. This would all be pretty
Thank you for the reply, I was thinking to use something similar.
On Apr 28, 11:25 pm, Michael Bayer mike...@zzzcomputing.com wrote:
dimazest wrote:
Hi all,
I faced a problem comparing Selects. It seems that Select.compare()
works incorrectly.
Here is the code that shows the problem:
On Apr 28, 4:38 pm, Chris Withers ch...@simplistix.co.uk wrote:
Laurence Rowe wrote:
Chris,
This is what the combination of repoze.tm2/transaction and
zope.sqlalchemy does for you. You don't have to do anything special
other than that.
It doesn't do the .remove().
BFG currently has a
Before saving objects to the database, we have need to inspect the
changes. I am aware of the attributes.get_history() functionality,
which is helpful to a point.
attributes.get_history() falls short of what I need in two places:
*** after a session.flush(), it is gone. There are times we need
Laurence Rowe wrote:
On Apr 28, 4:38 pm, Chris Withers ch...@simplistix.co.uk wrote:
Laurence Rowe wrote:
Chris,
This is what the combination of repoze.tm2/transaction and
zope.sqlalchemy does for you. You don't have to do anything special
other than that.
It doesn't do the .remove().
BFG
On 4/28/2010 11:31 PM, Mark wrote:
Hi guys,
I have the following Table construction:
ADMIN_TABLE = Table('admin',
bound_meta_data,
Column('username', types.VARCHAR(100),
primary_key=True),
autoload=True,
Chris Withers wrote:
Michael Bayer wrote:
we have the in_() construct. It should be in the ORM and SQL expression
tutorials:
t1 = Table('mytable', metadata, Column('foo', String))
select([t1]).where(t1.c.foo.in_(['a', 'b', 'c']))
However, that requires table/column objects which I don't
Mark wrote:
sqlalchemy.exc.ArgumentError: Mapper Mapper|Admin|admin could not
assemble any primary key columns for mapped table 'admin'
As you can see above, I have already mapped the primary_key=True
property, why is it still complaining that it can't find the primary
key? With this error,
Kent wrote:
Before saving objects to the database, we have need to inspect the
changes. I am aware of the attributes.get_history() functionality,
which is helpful to a point.
attributes.get_history() falls short of what I need in two places:
*** after a session.flush(), it is gone. There
That sounds like it could be very useful for me, thank you for
pointing me there. That could solve one of the two issues I'm facing
that I listed... what about the other?
On Apr 29, 11:02 am, Michael Bayer mike...@zzzcomputing.com wrote:
Kent wrote:
Before saving objects to the database, we
if you have a method like 'calculate_total_volume()', that is a business
method. you should not be relying upon the internals of the ORM to figure
that out for you, and you should have two distinct fields on your object
to represent the two values you need to make that calculation.
Kent wrote:
There might be a communication problem, which an example could help
clarify.
I'm constrained by a legacy database that I have no control over
changing. When an order is changed, I need to calculate the change in
volume (or points) so I can update a table that records this
information.
Here is
Kent wrote:
There might be a communication problem, which an example could help
clarify.
I'm constrained by a legacy database that I have no control over
changing. When an order is changed, I need to calculate the change in
volume (or points) so I can update a table that records this
Michael Bayer wrote:
Kent wrote:
There might be a communication problem, which an example could help
clarify.
I'm constrained by a legacy database that I have no control over
changing. When an order is changed, I need to calculate the change in
volume (or points) so I can update a table
I'm exactly trying to avoid adding esoteric hacks - (why I posted in
the first place), so thanks for the information. I'll look into the
examples you've provided; I'm hopeful that the versioned objects have
in-tact relations (such that I could say old_object.orderdetails
and get that
It is helpful to know what SQLA was designed for.
Also, you may be interested to know of our project as we are apparently
stretching SQLA's use case/design. We are implementing a RESTful web
app (using TurboGears) on an already existent legacy database. Since
our webservice calls (and
Kent Bower wrote:
It is helpful to know what SQLA was designed for.
Also, you may be interested to know of our project as we are apparently
stretching SQLA's use case/design. We are implementing a RESTful web
app (using TurboGears) on an already existent legacy database. Since
our
17 matches
Mail list logo