Le jeudi 30 août 2012 17:16:40 UTC+2, Michael Bayer a écrit :
def after_flush(session, flush_context):
my_bs = figure_out_bs(session)
new_session = Session(bind=session.connection())
new_session.add_all(my_bs)
# this won't actually
Hi there !
I'm going mad looking for a solution for what seems a simple problem.
When object A is updated, I also want object B to be updated, using some
computation based on A new values.
From now, I can detect when A is modified using after_update.
What I try is to look at event
A friend point me out the hybrid_property and the fact I can detect an
update of A fields before doing the commit, issuing some update for B. I'll
try this idea.
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To view this discussion on the web
Only if some computation based on A new values means that there are
SQL-level functions which you need to get at, does the rationale for
after_update/after_flush events to come up.Unfortunately you can't
emit a flush() within any of these events, as they are already local to the
On 25 nov, 16:28, Michael Bayer mike...@zzzcomputing.com wrote:
I did a little googling and Sybase can handle the quotes, if you set set
quoted_identifier on on your database.
(http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-li...)
Yep ! That's kind of solution, also
Hi there !
I'm a newby du SA and try to make it work with our production
platform, using Sybase and old and scarry database schema, with table
names like Prestation , with 1 upper case.
Sybase does not allow (to my knowledge) tu use something like
select Prestation.id
So I try to figure how to