1. Michael Bayer
  2. sqlalchemy

Issues

Issue #3053 resolved

PostgreSQL HSTORE type should be marked hashable = False

Gunnlaugur Þór Briem
created an issue

The HSTORE type returns dict objects, which are not hashable, so it should not have the default hashable = True. Fixing this (setting hashable = False) allows columns of this type to be loaded along with ORM entities in a Query as per #2592.

Will attach a totally trivial patch that does this, breaking no tests, and applies cleanly on rel_0_8, rel_0_9 and master.

Comments (5)

  1. Michael Bayer repo owner
    • Added the hashable=False flag to the PG :class:.HSTORE type, which is needed to allow the ORM to skip over trying to "hash" an ORM-mapped HSTORE column when requesting it in a mixed column/entity list. Patch courtesy Gunnlaugur Þór Briem. Fixes #3053

    → <<cset e384347ffb9b>>

  2. Michael Bayer repo owner
    • Added the hashable=False flag to the PG :class:.HSTORE type, which is needed to allow the ORM to skip over trying to "hash" an ORM-mapped HSTORE column when requesting it in a mixed column/entity list. Patch courtesy Gunnlaugur Þór Briem. Fixes #3053

    → <<cset 64e887b2e399>>

  3. Michael Bayer repo owner
    • Added the hashable=False flag to the PG :class:.HSTORE type, which is needed to allow the ORM to skip over trying to "hash" an ORM-mapped HSTORE column when requesting it in a mixed column/entity list. Patch courtesy Gunnlaugur Þór Briem. Fixes #3053

    → <<cset 21cb06d1c077>>

  4. Log in to comment