QueryOptions constructor
var newQo = new QueryOptions( { mergeStrategy: MergeStrategy.OverwriteChanges }); // assume em1 is a preexisting EntityManager em1.setProperties( { queryOptions: newQo });
Any QueryOptions property that is not defined will be defaulted from any QueryOptions defined at a higher level in the breeze hierarchy, i.e.
A configuration object.
The FetchStrategy to use with any queries. Read Only
Whether to include cached deleted entities in a query result (false by default). Read Only
The MergeStrategy to use with any queries. Read Only
The default instance for use whenever QueryOptions are not specified.
Sets the 'defaultInstance' by creating a copy of the current 'defaultInstance' and then applying all of the properties of the current instance. The current instance is returned unchanged.
var newQo = new QueryOptions( { mergeStrategy: MergeStrategy.OverwriteChanges });
newQo.setAsDefault();
Returns a copy of this QueryOptions with the specified MergeStrategy, FetchStrategy, or 'includeDeleted' option applied.
// Given an EntityManager instance, em
var queryOptions = em.queryOptions.using(MergeStrategy.PreserveChanges);
or
var queryOptions = em.queryOptions.using(FetchStrategy.FromLocalCache);
or
var queryOptions = em.queryOptions.using({ mergeStrategy: MergeStrategy.OverwriteChanges });
or
var queryOptions = em.queryOptions.using({
includeDeleted: true,
fetchStrategy: FetchStrategy.FromLocalCache
});
A new QueryOptions instance.
Generated using TypeDoc
A QueryOptions instance is used to specify the 'options' under which a query will occur.