[sqlalchemy] Versioning of Many-to-Many relationships

2012-02-09 Thread Michael Naber
*I have a many to many relationship between musician and genre indicating that a particular musician performs in the style of a particular genre: Musician -- musician_genre -- Genre Musician and Genre are both versioned using VersionedMeta so it is easy for me to display a history of the

Re: [sqlalchemy] Versioning and Foreign Keys

2011-09-20 Thread JPLaverdure
Hi Michael, Thanks for your reply... Your input is always very resourcefull, thanks ! I put together a small example which doesn't seem to function as expected: class Sample(Base): __metaclass__ = VersionedMeta __tablename__ = 'sample' __table_args__ = {'schema':'test'} id =

Re: [sqlalchemy] Versioning and Foreign Keys

2011-09-20 Thread Michael Bayer
On Sep 20, 2011, at 11:53 AM, JPLaverdure wrote: This fails because of the nullable=False clause on the Sample foreign key as SQLA seems to try to update the sample to set box_id to null... console printout: (from the delete portion) I'm not sure this has anything to do with versioning ?

Re: [sqlalchemy] Versioning and Foreign Keys

2011-09-20 Thread JPLaverdure
Oh god... I thought the statements used when declaring the ForeignKey (ondelete, onupdate) would imply that the relationship function in the same manner. I didn't think the 2 would be decoupled so much.. Although now that you point it out, it does seem consistent. I guess when I thought the

[sqlalchemy] Versioning and Foreign Keys

2011-09-19 Thread JPLaverdure
Hello, I'm using the versioned objects suggested in the SQLAlchemy examples: http://www.sqlalchemy.org/docs/orm/examples.html#versioned-objects One of the aspects of entity management seems a bit weird though: If entities are linked using foreign keys, (let's say in one-to-many relationship),

Re: [sqlalchemy] Versioning and Foreign Keys

2011-09-19 Thread Michael Bayer
On Sep 19, 2011, at 4:09 PM, JPLaverdure wrote: Hello, I'm using the versioned objects suggested in the SQLAlchemy examples: http://www.sqlalchemy.org/docs/orm/examples.html#versioned-objects One of the aspects of entity management seems a bit weird though: If entities are linked using

[sqlalchemy] Versioning and multi-level inheritance

2011-06-16 Thread JPLaverdure
Hello, I'm trying to use the versioning recipe describe on the website along with a multi-level inheritance model (Joined-Table inheritance) Here are my declarative statements: [code] class Sample(Base): __metaclass__ = VersionedMeta __tablename__ = 'sample' __table_args__ =

Re: [sqlalchemy] Versioning and multi-level inheritance

2011-06-16 Thread Michael Bayer
apply this patch to history_meta.py diff -r 7c65c0cdd3c8 examples/versioning/history_meta.py --- a/examples/versioning/history_meta.py Tue Jun 14 19:57:21 2011 -0400 +++ b/examples/versioning/history_meta.py Thu Jun 16 12:04:43 2011 -0400 @@ -35,7 +35,7 @@ col.unique =

[sqlalchemy] versioning and complex collection

2011-02-24 Thread Tim-Erwin
Hi, I'm trying to implement a versioning mechanism similar to this recipe: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/VersionedMap The idea: as in the example I'd like to have (lets say) a Config of which the data ist stored in vertical tables. The difference to the example: I'd like to

Re: [sqlalchemy] versioning and complex collection

2011-02-24 Thread Michael Bayer
On Feb 24, 2011, at 5:13 PM, Tim-Erwin wrote: Hi, I'm trying to implement a versioning mechanism similar to this recipe: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/VersionedMap The idea: as in the example I'd like to have (lets say) a Config of which the data ist stored in

[sqlalchemy] versioning when updating a relationship

2010-12-20 Thread Andronikos Nedos
Hi all, I'm retrofitting the SA versioning example [http://www.sqlalchemy.org/ docs/orm/examples.html#versioned-objects] into a large TG2 webapp. Since I would like to make versioning transparent to the existing controller's code, I would like a new version to be emitted when I update a

Re: [sqlalchemy] versioning when updating a relationship

2010-12-20 Thread Michael Bayer
On Dec 20, 2010, at 10:00 AM, Andronikos Nedos wrote: Hi all, I'm retrofitting the SA versioning example [http://www.sqlalchemy.org/ docs/orm/examples.html#versioned-objects] into a large TG2 webapp. Since I would like to make versioning transparent to the existing controller's code, I

[sqlalchemy] Versioning

2008-09-11 Thread Sam
One of the things I really liked about sqlobject was its versioning plug-in. ( http://www.sqlobject.org/Versioning.html ) Is there anything similar for sqlalchemy? A google search turned up versioned ( http://elixir.ematia.de/apidocs/elixir.ext.versioned.html ) This is a plug-in for elixir,