Support for .select()? #46

Closed
devinfoley opened this Issue Sep 8, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@devinfoley

Is there a way to query for only specific attributes in my hstore field?

When I try using Thing.where(...).select([:column1, :column2]), I get an error from PostgreSQL saying "column things.column1 does not exist". I know that the syntax for hstore is "SELECT attributes->'column1' AS column1 FROM things", but how do I construct this query using activerecord-postgres-hstore?

@diogob

This comment has been minimized.

Show comment Hide comment
@diogob

diogob Sep 28, 2012

Owner

Have you tried .select("attributes->'column1'") ?

Owner

diogob commented Sep 28, 2012

Have you tried .select("attributes->'column1'") ?

@diogob diogob closed this Feb 4, 2013

@diogob diogob closed this Feb 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment