[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

[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 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: associative table with extra field

2007-10-28 Thread mmstud
That made difference, i think i got it working. I made a little example for study purposes. From test part you see i can fetch meaningful information with Country, CountryLanguage and Language objects. Country has many CountryLanguages (having Language object and is_primary field),

[sqlalchemy] Separate version table

2007-10-28 Thread mmstud
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) Lets see the

[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

[sqlalchemy] associative table with extra field

2007-10-27 Thread mmstud
I'm trying to implement associative table with extra field on join table, but faced problems... what is it, that im doing wrong here, because i get python error: . . . 2007-10-27 14:58:26,816 INFO sqlalchemy.engine.base.Engine.0x..d0 {} 2007-10-27 14:58:26,816 INFO

[sqlalchemy] Re: associative table with extra field

2007-10-27 Thread mmstud
, 2007, at 8:02 AM, mmstud wrote: I'm trying to implement associative table with extra field on join table, but faced problems... what is it, that im doing wrong here, because i get python error: try not using IPython. shells like IDLE etc. always seem to corrupt things. at the very least