selectManyToManyData()

Overview

public any function selectManyToManyData(
      required string objectName  
    , required string propertyName
    ,          array  selectFields
    ,          string orderBy      = ""
)

Selects records from many-to-many relationships

Info

You can pass additional arguments to those specified below and they will all be passed to the selectData() method

Arguments

NameTypeRequiredDescription
objectNamestringYesName of the object that has the many-to-many property defined
propertyNamestringYesName of the many-to-many property
selectFieldsarrayNoArray of fields to select
orderBystringNo (default="")Plain SQL order by statement

Example

tags = presideObjectService.selectManyToManyData(
          objectName   = "event"
        , propertyName = "tags"
        , orderby      = "tags.label"
);