Re: [sqlalchemy] Re: how to make version_id_generator use values from postgresql sequence

2011-02-14 Thread Michael Bayer
On Feb 14, 2011, at 2:00 AM, Andrey Gladilin wrote: Thanks Michael for your answer. Shame on me, that I did not find this point in documentation. But such behaviour seems strange to me. Why should I specify these parameters in anchestors, specify anchestors in a child class and then

[sqlalchemy] Re: how to make version_id_generator use values from postgresql sequence

2011-02-13 Thread Andrey Gladilin
Thanks Michael for your answer. Shame on me, that I did not find this point in documentation. But such behaviour seems strange to me. Why should I specify these parameters in anchestors, specify anchestors in a child class and then explicitly describe my arguments once more in a child class? I

[sqlalchemy] Re: how to make version_id_generator use values from postgresql sequence

2011-02-13 Thread Andrey Gladilin
And finally I have found solution: class TimestampMixin(object): created_at = Column(DateTime, default=func.now()) record_version = Column(Integer, nullable=False, default=func.nextval(record_versions_id_seq)) @declared_attr def __mapper_args__(self): return {