Re: Bug in old-style mutable type? (was Re: [sqlalchemy] How can I tell SA that a mutable attribute has changed?)

2012-02-24 Thread Tate Kim
groups.com Date: Fri, 24 Feb 2012 11:39:39 To: Reply-To: sqlalchemy@googlegroups.com Subject: Bug in old-style mutable type? (was Re: [sqlalchemy] How can I tell SA that a mutable attribute has changed?) On 24/02/2012 10:49, Chris Withers wrote: > (Does SA have a JSONType now? we're us

Re: [sqlalchemy] How can I tell SA that a mutable attribute has changed?

2012-02-24 Thread Tate Kim
can I tell SA that a mutable attribute has changed? Hi All, I have a JSON field that's value is usually a dictionary: class MyModel(Base): config = Column(JSONType(255)) (Does SA have a JSONType now? we're using a homebrew one, that may be where the problem lies...) So, if

Bug in old-style mutable type? (was Re: [sqlalchemy] How can I tell SA that a mutable attribute has changed?)

2012-02-24 Thread Chris Withers
On 24/02/2012 10:49, Chris Withers wrote: (Does SA have a JSONType now? we're using a homebrew one, that may be where the problem lies...) For reference, I've included the code for this type at the end of this email, it uses MutableType, so the following should work: obj = session.query(MyM

[sqlalchemy] How can I tell SA that a mutable attribute has changed?

2012-02-24 Thread Chris Withers
Hi All, I have a JSON field that's value is usually a dictionary: class MyModel(Base): config = Column(JSONType(255)) (Does SA have a JSONType now? we're using a homebrew one, that may be where the problem lies...) So, if I do: obj = session.query(MyModel).one() obj.config['foo'] += 1 se