Skip to content

Commit

Permalink
fix: Handle primaryKey shown: false pitfall error
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Feb 26, 2020
1 parent b90dd89 commit 5bbf5f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cubejs-api-gateway/index.js
Expand Up @@ -70,7 +70,7 @@ const transformData = (aliasToMemberNameMap, annotation, data, query) => (data.m
const memberName = aliasToMemberNameMap[p[0]];
const annotationForMember = annotation[memberName];
if (!annotationForMember) {
throw new UserError(`You requested hidden member: '${p[0]}'. Please make it visible using \`shown: true\``);
throw new UserError(`You requested hidden member: '${p[0]}'. Please make it visible using \`shown: true\`. Please note primaryKey fields are \`shown: false\` by default: https://cube.dev/docs/joins#setting-a-primary-key.`);
}
const transformResult = [
memberName,
Expand Down

0 comments on commit 5bbf5f0

Please sign in to comment.