RE: [sqlalchemy] Cannot retrieve PostgreSQL array column with session.query() : TypeError: unhashable type: 'list'

2010-10-14 Thread Julien Demoor
negative side-effects from this? -Message d'origine- De : sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] De la part de Michael Bayer Envoyé : mercredi 13 octobre 2010 23:37 À : sqlalchemy@googlegroups.com Objet : Re: [sqlalchemy] Cannot retrieve PostgreSQL array column

Re: [sqlalchemy] Cannot retrieve PostgreSQL array column with session.query() : TypeError: unhashable type: 'list'

2010-10-14 Thread Michael Bayer
:37 À : sqlalchemy@googlegroups.com Objet : Re: [sqlalchemy] Cannot retrieve PostgreSQL array column with session.query() : TypeError: unhashable type: 'list' The Query runs the result through unique_list() anytime there are mapped entities in the columns list. The ARRAY result, returning

RE: [sqlalchemy] Cannot retrieve PostgreSQL array column with session.query() : TypeError: unhashable type: 'list'

2010-10-14 Thread Julien Demoor
@googlegroups.com [mailto:sqlalch...@googlegroups.com] De la part de Michael Bayer Envoyé : jeudi 14 octobre 2010 15:52 À : sqlalchemy@googlegroups.com Objet : Re: [sqlalchemy] Cannot retrieve PostgreSQL array column with session.query() : TypeError: unhashable type: 'list' On Oct 14, 2010, at 4:38 AM, Julien

Re: [sqlalchemy] Cannot retrieve PostgreSQL array column with session.query() : TypeError: unhashable type: 'list'

2010-10-14 Thread Michael Bayer
...@googlegroups.com] De la part de Michael Bayer Envoyé : mercredi 13 octobre 2010 23:37 À : sqlalchemy@googlegroups.com Objet : Re: [sqlalchemy] Cannot retrieve PostgreSQL array column with session.query() : TypeError: unhashable type: 'list' The Query runs the result through unique_list() anytime

RE: [sqlalchemy] Cannot retrieve PostgreSQL array column with session.query() : TypeError: unhashable type: 'list'

2010-10-14 Thread Julien Demoor
: [sqlalchemy] Cannot retrieve PostgreSQL array column with session.query() : TypeError: unhashable type: 'list' On Oct 14, 2010, at 4:38 AM, Julien Demoor wrote: Thanks for your reply. What you propose would work for me, but in the meantime I need a workaround. If you need that exact pattern

[sqlalchemy] Cannot retrieve PostgreSQL array column with session.query() : TypeError: unhashable type: 'list'

2010-10-13 Thread Julien Demoor
Hello, The problem I'm seeing is illustrated by the code below. I tried a workaround using TypeDecorator with process_result_value returning a tuple rather than a list, to no avail. Any help will be greatly appreciated. Regards. Traceback : Traceback (most recent call last): File

Re: [sqlalchemy] Cannot retrieve PostgreSQL array column with session.query() : TypeError: unhashable type: 'list'

2010-10-13 Thread Michael Bayer
The Query runs the result through unique_list() anytime there are mapped entities in the columns list. The ARRAY result, returning a Python list [], isn't hashable, so thats that. If you only queried for columns, it wouldn't be running through unique_list(). I suppose we'd modify ARRAY to