Skip to content

Commit

Permalink
fix(hstore): include explicit namespace when casting (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbretl authored and benjie committed Feb 4, 2019
1 parent f7464aa commit 1978ffa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/graphile-build-pg/src/plugins/PgTypesPlugin.js
Expand Up @@ -978,7 +978,11 @@ export default (function PgTypesPlugin(
// node-postgres parses hstore for us, no action required on map
map: identity,
// When unmapping we need to convert back to hstore
unmap: o => sql.fragment`(${sql.value(hstoreStringify(o))}::hstore)`,
unmap: o =>
sql.fragment`(${sql.value(hstoreStringify(o))}::${sql.identifier(
hstoreType.namespaceName,
hstoreType.name
)})`,
};

return build;
Expand Down

0 comments on commit 1978ffa

Please sign in to comment.