Re: [sqlalchemy] Select the hybrid method result on the query

2017-03-06 Thread Leonardo L. P. da Mata
Thanks mike, that was a helpful explanation. 2017-03-06 18:59 GMT-03:00 mike bayer : > > > On 03/06/2017 04:47 PM, Leonardo L. P. da Mata wrote: > >> Hello, thanks for the help. >> >> This makes sense but it looks like that the value is calculated twice, >> one in the

Re: [sqlalchemy] Select the hybrid method result on the query

2017-03-06 Thread mike bayer
On 03/06/2017 04:47 PM, Leonardo L. P. da Mata wrote: Hello, thanks for the help. This makes sense but it looks like that the value is calculated twice, one in the query and the other accessing the property. My idea is to have the result on the query return itself. "lat" and "lng" here

Re: [sqlalchemy] Select the hybrid method result on the query

2017-03-06 Thread Leonardo L. P. da Mata
Hello, thanks for the help. This makes sense but it looks like that the value is calculated twice, one in the query and the other accessing the property. My idea is to have the result on the query return itself. 2017-03-06 18:31 GMT-03:00 mike bayer : > > > On

Re: [sqlalchemy] Select the hybrid method result on the query

2017-03-06 Thread mike bayer
On 03/06/2017 04:16 PM, Leonardo Mata wrote: Hello, My applications does some ordering using the distance from latitude and longitude haversine distance, i was able to calculate this using @hybrid.method and @.*expression, but i can't output the calculated distance: /class

[sqlalchemy] Select the hybrid method result on the query

2017-03-06 Thread Leonardo Mata
Hello, My applications does some ordering using the distance from latitude and longitude haversine distance, i was able to calculate this using @hybrid.method and @.*expression, but i can't output the calculated distance: *class PartnerAddress(db.Model, WithTimestampsModel, SerializeMixin):*