> I dont need history tracking, just revert documents to older ones.
that is history, just not timed history. 
u'll have documents, and then for each document a bunch of versions.
> Once get it working on simple form, then perhaps trying optimicing
> and feeding only field, that has changed. Version field automatic
> update was on my mind lately. Could it be something like this:
>
> Column("version", Integer, default=1, nullable=False,
> onupdate=document_versions.select(document_versions.document_id=c.d
>ocument_id, order_by=version, order=DESC, limit=1)
no idea, what this onupdate is expected to do here?
afaik these things are done with a mapper extension, but i'm not sure 
its the only way.
what would be version field? something that counts the inserts for 
that particular document_id?
> I just dont know, how to get current document id, is it just
> c.document_id?
yes, yourobj.document_id or whatever u named it as column.

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to