[sqlalchemy] Re: Separate version table

2007-10-30 Thread mmstud
Thanks Arnar, that was interesting to read. I learned a lot with these codes. Here i share current point of my progress. I managed to do mapper extension and document - documentversion objects seems to work ok, but im not so sure, if my solution was very elegant. So if anyone sees this and wants

[sqlalchemy] Re: Separate version table

2007-10-29 Thread mmstud
Thats handy. Where could i get the utils module you're using for Enum datatype? On 28 loka, 23:52, Arnar Birgisson [EMAIL PROTECTED] wrote: On 10/28/07, mmstud [EMAIL PROTECTED] wrote: Thanks there were some good ideas to try. Btw. what does the first def constructor(fun)? It is a

[sqlalchemy] Re: Separate version table

2007-10-29 Thread sdobrev
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

[sqlalchemy] Re: Separate version table

2007-10-29 Thread mmstud
On 29 loka, 09:08, [EMAIL PROTECTED] wrote: I dont need history tracking, just revert documents to older ones. that is history, just not timed history. Most optimal would it be, if i can make rows with updated fields only, not to copy whole row... but im afraid setting unchanged field to

[sqlalchemy] Re: Separate version table

2007-10-29 Thread Arnar Birgisson
On 10/29/07, mmstud [EMAIL PROTECTED] wrote: Thats handy. Where could i get the utils module you're using for Enum datatype? The Enum datatype is from the ASPN cookbook, with type bindings for SA. Here's part of my utils module. cheers, Arnar # -*- encoding: UTF-8 -*- import

[sqlalchemy] Re: Separate version table

2007-10-29 Thread mmstud
Found enumeration implementations: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/Enum http://cheeseshop.python.org/pypi/enum/0.4.3 On 29 loka, 09:04, mmstud [EMAIL PROTECTED] wrote: Thats handy. Where could i get the utils module you're using for Enum datatype? On 28 loka, 23:52, Arnar

[sqlalchemy] Re: Separate version table

2007-10-29 Thread Arnar Birgisson
On 10/29/07, mmstud [EMAIL PROTECTED] wrote: On 29 loka, 09:08, [EMAIL PROTECTED] wrote: I dont need history tracking, just revert documents to older ones. that is history, just not timed history. Most optimal would it be, if i can make rows with updated fields only, not to copy whole

[sqlalchemy] Re: Separate version table

2007-10-28 Thread Arnar Birgisson
Hi there, On 10/28/07, mmstud [EMAIL PROTECTED] wrote: Next design problem for me is version table. I have Document model with DocumentVersion model, but i dont know how to: - get the latest version of document - set creator and updator, automatic behavior for this - update version number

[sqlalchemy] Re: Separate version table

2007-10-28 Thread sdobrev
Next design problem for me is version table. I have Document model with DocumentVersion model, but i dont know how to: - get the latest version of document - set creator and updator, automatic behavior for this - update version number - fetch thru Document(s) and DocumentVersion(s) just

[sqlalchemy] Re: Separate version table

2007-10-28 Thread mmstud
Thanks there were some good ideas to try. Btw. what does the first def constructor(fun)? On 28 loka, 18:00, Arnar Birgisson [EMAIL PROTECTED] wrote: Hi there, On 10/28/07, mmstud [EMAIL PROTECTED] wrote: Next design problem for me is version table. I have Document model with

[sqlalchemy] Re: Separate version table

2007-10-28 Thread Arnar Birgisson
On 10/28/07, mmstud [EMAIL PROTECTED] wrote: Thanks there were some good ideas to try. Btw. what does the first def constructor(fun)? It is a decorator I use on mapped classes constructors. It allows me to give keyword arguments to constructors with initial values for any field in class.c