Skip to content

Search methods

Simon Mourier edited this page Feb 19, 2020 · 1 revision

Search methods are very similar to Load Methods since they are also used to load data from database. The main differences are:

  • A search method always returns a collection of its declaring entity instances

  • Arguments are always nullable (optional)

  • The wildcard character can be used to include all possible arguments.

  • Target artifacts are optimized for a great number of optional arguments. For example, the SQL Server producer produce a different style of code for Search and for Load methods.

More information such as available operators, examples or advanced methods, can be found in the Architect Guide, and more especially in the Methods chapter.

Search definition

The general syntax is:

search([argumentType1] argument1, [argumentType2] argument2, ... , [argumentTypeN] argumentN) [From <source>] [<where> <order by>] | [raw]
  • <source> can be an Entity or a View name

  • <where> is a where clause

  • <order by> is an order by clause

see load methods for a description of raw, arguments, source, where and order by clause.

In addition to explicit arguments, Search methods also accept wildcards such as '*' and '**'.

  • Using the '*' wildcard indicates the method to enable search on all persistent properties.

  • Using the '**' wildcard indicates the method to enable search on all persistent properties of the current entities as well as on all derived entity properties as well.

Note: For more information, please refer to the Search method article in the Architect Guide.

Clone this wiki locally