I have models:
{
class Post(db.Model):
id = db.Column(db.Integer, primary_key = True)
body = db.Column(db.String(2000))
user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
comments = db.relationship('Comment', backref='parent_post', lazy='dynamic')
class
So thanks... It worked. I made that mistake in code and had been trying to
solve that for 2 days.
On Tue, Jun 23, 2015 at 1:20 AM, Simon King si...@simonking.org.uk wrote:
On Mon, Jun 22, 2015 at 8:44 PM, sudheesh ks kssudheesh...@gmail.com
wrote:
I have models:
{
class Post(db.Model):
you can check for new/dirty/deleted in after_flush, these collections
haven't yet been reset. after_flush_postexec is where they are reset.
On 6/22/15 7:45 PM, imali...@uber.com wrote:
Why wouldn't you check for new, dirty deleted 'before_flush' instead
of 'after_flush'. Would 'after_flush'
Hi all,
I am using simple SQLALCHEMY implementation.
I have two classes Svc, Mani
class Svc(Base):
''' class to map 'service' table in database
'''
__tablename__ = 'svc'
__table_args__ = {'autoload': True}
manis = relationship('Mani')
What I found that upon
Why wouldn't you check for new, dirty deleted 'before_flush' instead of
'after_flush'. Would 'after_flush' even work?
On Thursday, October 9, 2014 at 1:34:58 PM UTC-4, Tom Dalton wrote:
Brilliant, the after_flush event sounds like the way to go. I guess my
event handlers would be:
1. check on the isolation level you're using, and as a guarantee that
you read new rows, make sure the second reader session is beginning
its transaction *after* the first transaction is completed.
2. if the second session wishes to re-read the rows within its own
transaction, and you are
Hello all,
What is the proper way to fully remove a one-to-one related object ? I I do
Session.delete(a.b)
print a.b # b is still here ...
What am I missing ?
Thanks,
Laurent
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe
On Mon, Jun 22, 2015 at 8:44 PM, sudheesh ks kssudheesh...@gmail.com wrote:
I have models:
{
class Post(db.Model):
id = db.Column(db.Integer, primary_key = True)
body = db.Column(db.String(2000))
user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
comments =