Re: [sqlalchemy] declarative and session

2009-12-27 Thread Serge Koval
You can always do self.session.add(self) in save() without checks. If your model was already associated with the session before, it won't add it again. Here's sample code I use: def save(self, flush=False): self.session.add(self) if flush: self.session.flush() def

Re: [sqlalchemy] Sqlalchemy with different application scenarios

2009-12-27 Thread Michael Bayer
On Dec 23, 2009, at 10:11 PM, karikris...@gmail.com wrote: I have this scenario. I have two libraries developed independently using SQLAlchemy. each library has its own model, own session connection. Now I have application using those two libraries. Application has its own models.

[sqlalchemy] Mapping temporal data for easy querying using time dimension

2009-12-27 Thread Adam Dziendziel
Hi, I am trying to implement versioning of a structure of interconnected objects so that I can see how the content looked at some point of time. Probably I would need to use a temporal database with effective_from/ effective_to timestamps telling the time period when the information held in the

Re: [sqlalchemy] Mapping temporal data for easy querying using time dimension

2009-12-27 Thread Michael Bayer
On Dec 27, 2009, at 12:01 PM, Adam Dziendziel wrote: Hi, I am trying to implement versioning of a structure of interconnected objects so that I can see how the content looked at some point of time. Probably I would need to use a temporal database with effective_from/ effective_to