company logo

from method

The from method defines the operand collection for a select statement or an access path. The from method requires a list of one or more parameters, which refer access paths or expressions. The result of the from method is the product set of all passed collections.

Usually, within an access path the preceding part in front of an operation implicitly defines a from operation. For compatibility reasons, one may, however, explicitly define a from operation. Thus, the path definition from(Person).select ... is the same as Person.select ..., and from(Person, Company).select ... is the same as (Person, Company).select ...

The from method allows defining simple collection references, but also union or cross product collections as in the example above.

The from operation is a generalization of the product operation, which allows operating on a single operand, as well. There is no specific expression for the product set as the from() or () expression.

Generalisations:  product method

Related topics