Problem
I already set allowUngroupedWithoutPrimaryKey in cube.js, but query with ungrouped: true still get error: "One or more Primary key is required for '${cubeName}' cube"
In BaseQuery.js, i found:
/**
*
* @param {string} cubeName
* @returns {Array<string>}
*/
primaryKeyNames(cubeName) {
const primaryKeys = this.cubeEvaluator.primaryKeys[cubeName];
if (!primaryKeys || !primaryKeys.length) {
throw new UserError_1.UserError(`One or more Primary key is required for '${cubeName}' cube`);
}
return primaryKeys.map((pk) => this.primaryKeyName(cubeName, pk));
}
primaryKeyNames always throws an error when a cube has no primary key. But shouldn’t it check allowUngroupedWithoutPrimaryKey !== true first?