at the moment its:
objectstore.uow().dirty.contains(obj)
objectstore.uow().modified_lists.contains(obj.items)
not too deep (also i just documented these collections, well at least
'dirty', yesterday) ! convenience methods easy enough to add...will
get to this soon.
On Feb 2, 2006, at 4:27 PM, dmiller wrote:
What is the best way to find out if an object is dirty? I would
expect something like this:
objectstore.is_dirty(obj) # returns True if obj is dirty
I would like it to work on collections as well:
objectstore.is_dirty(obj.items)
which would return True if the list has had items appended,
deleted, or updated. Note: this is what I really need (i.e. the
collection version).
I'm not sure if it makes sense, but maybe the first version could
simply check all the dependent collections on the object and factor
that into its result. However, I'm not sure if it's possible to
find the dependent collections in all cases.
From what I can tell all of this is currently possible right now
(not so elegantly though). It requires reaching deep into
SQLAlchemy, which feels a bit dangerous.
Thanks,
~ Daniel
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through
log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD
SPLUNK!
http://sel.as-us.falkag.net/sel?
cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users