Thank you very much Mike!
with session.no_autoflush:
> obj = session.merge(my_thing)
> for r in session.new:
>
> for r in session.dirty:
> ...
>
session.new is showing the newly added :)
I'll need to experiment more to make sure all my cases are covered.
On Fri, Jan 11, 2019 at 1:19 PM tonthon wrote:
>
> Hi,
>
> We're using Sqlalchemy in a Pyramid web application, with the pyramid_tm
> package (a transaction that wraps every web request inside a DB transaction).
> It's very usefull and it works like a charm.
>
> In order to follow some security
I don't think you can accomplish this with pyramid_tm being used.
My initial response was going to be this:
since session_1 is readonly, don't configure it to join the
pyramid_tm/zope transaction. Then just rollback session_1 when session_2
commits.
but session_2 is going to commit
Hi,
We're using Sqlalchemy in a Pyramid web application, with the pyramid_tm
package (a transaction that wraps every web request inside a DB
transaction). It's very usefull and it works like a charm.
In order to follow some security rules and to be able to certify part of
our app, we want to
On Fri, Jan 11, 2019 at 11:39 AM HP3 wrote:
>
> Hello all,
>
> I'm using `session.merge()` within an HTTP handler, I would like to know
> which objects have been newly added and which ones have been modified after
> `merge()` completes.
as you tried, the easiest way is to look in session.new
Hello all,
I'm using `session.merge()` within an HTTP handler, I would like to know
which objects have been newly added and which ones have been modified after
`merge()` completes.
Bare with me please ...
I know there are `before_flush`, etc. events exactly for this scenario but
I **only**
one thing to note with "empty" migrations is that autogenerate does
not pick up things like changes of server default or datatypes unless
you set some flags to turn it on,
Can I ignore it when the result of the generation is empty?
I use it in docker, there is a startup command to upgrade the database
version to the latest.
The database version is updated at startup and a record update version_num
is generated.
Sorry for my bad English
from alembic import op