@zenstackhq/orm 3.9.3 → 3.9.4-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -6399,7 +6399,8 @@ var QueryNameMapper = class extends OperationNodeTransformer {
6399
6399
  }
6400
6400
  processEnumSelection(selection, fieldName) {
6401
6401
  const { alias, node } = stripAlias(selection);
6402
- const fieldScope = this.resolveFieldFromScopes(fieldName);
6402
+ const qualifier = ReferenceNode.is(node) && node.table && TableNode.is(node.table) ? node.table.table.identifier.name : void 0;
6403
+ const fieldScope = this.resolveFieldFromScopes(fieldName, qualifier);
6403
6404
  if (!fieldScope || !fieldScope.model) return selection;
6404
6405
  const aliasName = alias && IdentifierNode.is(alias) ? alias.name : fieldName;
6405
6406
  const fieldDef = getField(this.schema, fieldScope.model, fieldName);