Re: [GeoAlchemy] "function st_asbinary(bytea) is not unique" issue created by use of offset/limit on object with geo columns and many-2-many sqlalchemy relationship. (example included)

125 views
Skip to first unread message

Eric Lemoine

unread,
Dec 4, 2012, 11:20:05 AM12/4/12
to geoal...@googlegroups.com
On Tue, Dec 4, 2012 at 12:09 AM, woodya <wo...@zumper.com> wrote:
> using postgres 9.2, py27-geoalchemy @0.7.1_0, py27-sqlalchemy @0.7.9_0
>
> I'm experiencing an issue with GA/SA where, if i use offset or limit, on an
> entity with a relationship, that this creates a left-outer join from SA,
> which causes ST_AsBinary to be called in both the subquery and the outer
> query. This equates to: select ST_AsBinary(ST_AsBinary(spot)), which ...
> well. that's not going to work. I haven't been able to change configurations
> such that this "duplication" of the function call is avoided. It only seems
> to happen with offset/limit because these generate left outer joins with the
> related entity table.
>
> Does anyone know of a workaround for this? is this fixed or going to be
> fixed in geoalchemy2, or anything greater than 0.7.1?


I'd say it's fixed in GeoAlchemy 2 / SQLAlchemy 0.8 . See
<https://groups.google.com/d/msg/sqlalchemy/ITslXaeswpc/lXkXvPSVzuwJ>.
It would great to get a confirmation.



--
Eric
Reply all
Reply to author
Forward
0 new messages