Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

EntityLoadByExample

Load entities matching an example entity.

Method Signature

EntityLoadByExample(sampleEntity=[any], unique=[boolean])

Arguments

Argument
Type
Required
Description
Default

sampleEntity

any

true

Instance of an ORM entity to use as an example for the query.

unique

boolean

false

Whether to return a single unique result (true) or an array of results (false).

false

Examples

Load all matching entities using a sample entity as the filter.

sample = entityNew( "Manufacturer", { name: "Honda" } );
matches = entityLoadByExample( sample );

Pass unique=true to return a single matching entity:

sample = entityNew( "Manufacturer", { name: "Honda" } );
singleMatch = entityLoadByExample( sample, true );

Last updated

Was this helpful?