Entity and typelist case sensitivity changes
In version 8.0, the core Gosu language was case sensitive but types for entities and typelists remained case insensitive for many contexts.
In version 9.0, entity and typelist types are case sensitive in general for the following:
- Entity type names
- Entity method names
- Entity property names
- Typelist names
- Typelist value names
For most required changes, these differences cause
compilation errors you can easily find and fix in Studio. For example,
you might need to change entity.address
to entity.Address. Fix
all compilation errors.
Some required changes do not manifest
as compilation errors but are still critical to change in version 9.0.
If you pass any of the case sensitive names as String values to any API, it is
best practice to ensure that all String
values correctly capitalize the text. Otherwise, you see no compilation
errors in Studio but your code generates run time errors that might be
difficult or impossible to debug.
The following APIs changed to require
case sensitive String
values:
- Use of array syntax for entity
property names:
object[PropertyName]syntax. For example,myObject["PrimaryContact"]. - Use of Gosu reflection APIs, such as methods of the class gw.lang.reflect.ReflectUtil.
Even though the property names are case-sensitive now, on an entity type you cannot create two entity properties with names that differ only by case. Similarly, in one typelist you cannot create two typecodes with names that differ only by their case.
Some APIs remain case insensitive
The following entity and typelist APIs
remain case insensitive for String
values:
- Database query API methods that
take
Stringvalues to identify fields - Entity methods that get
and set properties with a
Stringvalue for the property name. - Entity methods that check the
contents of a bundle:
isFieldChanged,getOriginalValue,getAddedArrayElements,getChangedArrayElements,getRemovedArrayElements,isArrayElementChanged,isArrayElementAddedOrRemoved. See Determining what data changed in a bundle. - API methods that find
a typekey by its code (as a String) is case-insensitive, for example:
typekey.TYPELISTNAME.get("CODE"). - Entity path expressions (sometimes
called bean path expressions) in view entity data model definitions remain
case insensitive. See <viewEntity> elements and related data object types. The following example shows an entity path in the
pathattribute:<viewEntityName name="RelActAssignedUserName" path="RelatedActivity.AssignedUser"/>
