I had a similar needs with generating diffs for tracking revision history a
while back
I ended up pushing everything into a mixin class. It worked a little like
this...
class MutatedChecknObject(object):
def generate_diff(self):
insp = sqlalchemy_inspect(self)
On Oct 23, 2013, at 4:33 PM, Jonathan Vanasco jonat...@findmeon.com wrote:
this has just confused me for a while , and constantly trips me up...
class FirstTable()
__tablename__ = 'first_table'
id = Column(Integer, primary_key=True)
class SecondTable()
Thanks for the history lesson!
A large part of me things that both strings or objects should be accepted
, this way there would be parity across the board. Because yes, it is
confusing!
But a larger part of me worries about backwards compatibility and
collisions. ForeignKey(mytable.id)
The problem I was encountering is that history doesn't make it easy to
differentiate between collections and non-collections very well:
inspect(obj).attrs.intcolumn.history.unchanged returns return [intval],
rather than intval.
inspect(obj).attrs.children.history.unchanged returns [childobj]
On Oct 24, 2013, at 4:40 PM, Daniel Grace thisgenericn...@gmail.com wrote:
The problem I was encountering is that history doesn't make it easy to
differentiate between collections and non-collections very well:
inspect(obj).attrs.intcolumn.history.unchanged returns return [intval],