FieldResolver
The FieldResolver
class allows you to generate field API names via the properties & relationships on the objects.
select
select
Accepts one or more non-relationship properties key or FunctionField
parent()
parent()
Allows you to traverse to a parent relationship. Returns a new FieldResolver
for the parent SObject type. Keeps track of "where it's been" so resulting fields are fully qualified. Can go multiple levels deep, but SOQL only supports a depth of 5.
subQuery()
subQuery()
Allows you to generate a "sub query" on a child relationship, to be used inside a SELECT statement of the parent object. The first parameter is a key of a child relationship. The second parameter is a function, which accepts a FieldResolver
for the child SObject type and return the subquery to generate.
Advanced Usage
Last updated
Was this helpful?