If you're trying to avoid doing a SQL round trip then yeah there's no API for a 
"revert" within the attribute itself, we tried going down that road when we 
started doing 0.5 and quickly ran into all kinds of edge cases that didn't 
really work out, so we decided to just keep it simple and let the database tell 
us the information accurately.    I don't remember what the specific scenarios 
were offhand.


On Feb 28, 2012, at 4:08 PM, Kent wrote:

> Is there a simple way to revert all columns back to their committed
> state (some columns may be synonyms), or do I need to loop through
> mapper.iterate_properties, get the ColumnProperty ones, make sure they
> aren't aliases (prop.columns[0] is Column) and use setattr() to set
> the value back to the attributes.history's deleted?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> To unsubscribe from this group, send email to 
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to