Using Hyphens and Dots in Field and Region Names in GemFire queries
search cancel

Using Hyphens and Dots in Field and Region Names in GemFire queries

book

Article ID: 403537

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

Field and region names that include hyphens (-) or dots (.) can lead to syntax errors or unexpected behavior when writing queries in GemFire OQL.

Cause

  • Hyphens (-) in field names are treated by the query parser as subtraction operators, not part of the field name.

  • Dots (.) in region names are interpreted as object field or method access, not as part of the region path.

Resolution

  • Field Names
    • Use Java-friendly field names like fieldName or field_name to avoid quoting issues.

  • Region Names
    • Avoid using dots (.) in region names to prevent confusion with field access syntax.

    • Preferred alternatives:

      • Use underscores: /field_name