Including retired entities in query results
When an entity instance is retired, its Retired property is set to true. The Data
Dictionary tells you which entity types can be retired by including
Retireable in their lists
of delegates. By default, query results do not include retired instances,
even if they satisfy all the predicates of the query. For query purposes
generally, you must treat retired entities as if they were deleted and
no longer in the application database.
To include retired instances in the results
of a query, call the withFindRetired
method with the value true,
as the following Gosu code shows.
uses gw.api.database.Query
var query = Query.make(Activity)
query.compare(Activity#ActivityPattern, Equals, null)
query.withFindRetired(true)
Important: Use the withFindRetired method on queries
only under exceptional circumstances that require exposing retired entities.
