IdentificationVariable identificationVariable = (IdentificationVariable) expression.getExpression();
Declaration declaration = queryContext.getDeclaration(identificationVariable.getVariableName());
DatabaseMapping mapping = declaration.getMapping();
ContainerPolicy containerPolicy = mapping.getContainerPolicy();
MappedKeyMapContainerPolicy mapPolicy = (MappedKeyMapContainerPolicy) containerPolicy;
descriptor = mapPolicy.getKeyMapping().getReferenceDescriptor();
}