On Jan 8, 2012, at 3:16 PM, Yuen Ho Wong wrote:
> Except that LIMIT and OFFSET are present in my query, gnarly isn't
> it ? :P
>
>d = label("distance",
> some_complicated_geoalchemy_function_call(columns...))
>
>q = session.query(Product, Merchant.location, d)\
>.join(Mercha
Here are the models:
class Merchant(Base):
__tablename__ = "merchant"
id = Column(Integer, autoincrement=True, primary_key=True)
location = GeometryColumn(Point, nullable=False)
class SearchOption(Base):
__tablename__ = "searchoption"
id = Column(Integer, autoincrement=True, p
Except that LIMIT and OFFSET are present in my query, gnarly isn't
it ? :P
d = label("distance",
some_complicated_geoalchemy_function_call(columns...))
q = session.query(Product, Merchant.location, d)\
.join(Merchant, Product.merchant_id == Merchant.id)\
.filter(Pr
On Jan 8, 2012, at 2:47 PM, Yuen Ho Wong wrote:
> Hi,
>
> I have a rather complicated problem and I was wondering if you guys
> could help.
>
> So I have a query, session.query(Product, Merchant, d), where Product
> is 1-to-many with Merchant, and d is the distance from some lat long.
> d is ac
BTW, aliased() and alias() don't work on a label() either. I tried
passing the label object straight into the order_by() as well to no
avail. I'm all out of ideas.
On Jan 9, 3:47 am, Yuen Ho Wong wrote:
> Hi,
>
> I have a rather complicated problem and I was wondering if you guys
> could help.
>
Hi,
I have a rather complicated problem and I was wondering if you guys
could help.
So I have a query, session.query(Product, Merchant, d), where Product
is 1-to-many with Merchant, and d is the distance from some lat long.
d is actually a sqlalchemy.sql.label() of some complicated GeoAlchemy
fun