Re: [sqlalchemy] Query for date between a range

2013-10-09 Thread Enrico Morelli
On Fri, 4 Oct 2013 23:58:38 +0300 Ofir Herzas herz...@gmail.com wrote: Enrico, It should be available on 0.7.10 Simon, you are right. The expression is indeed a must. class Plan(Base): @hybrid_property def calculated_date(self): return date(self.year, self.month,

[sqlalchemy] Understanding Association Proxies

2013-10-09 Thread RedBaron
Hi, I was trying to work through the many-to-many relationship tutorial and understand the concept of Association Proxies. (Using SA-0.8.2) Here's my model book_author_table = Table('book_author',Base.metadata, Column('book_id',Integer,ForeignKey('book.id')),

[sqlalchemy] Re: Understanding Association Proxies

2013-10-09 Thread RedBaron
I think I did not follow the tutorial properly. That step is done for Association Objects which I do not have in my simple example. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it,

[sqlalchemy] building a 'complex' relationship ?

2013-10-09 Thread Jonathan Vanasco
I'm not sure if this is possible. I was hoping it was, but my attempts so far didn't work. I've got a separate select going, but would love to pare things down to one. I'm wanting to map a relationship where two columns match ( not one ) and there is a boolean filter Class Author: id =

[sqlalchemy] Re: building a 'complex' relationship ?

2013-10-09 Thread Jonathan Vanasco
primaryjoin = and_(Article.author_id == AuthorOverride.author_id , Article.topic_id == AuthorOverride.topic_id , AuthorOverride.is_published == True) , foreign_keys = ( Article.author_id , Article.topic_id), Solved . I was close. 1. Wrap the join conditions in