Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • ActionToRecord
  • CActiveFinder
  • CActiveRecord
  • CActiveRecordBehavior
  • CActiveRecordMetaData
  • CActiveRelation
  • CBaseActiveRelation
  • CBelongsToRelation
  • CHasManyRelation
  • CHasOneRelation
  • CJoinElement
  • CJoinQuery
  • CManyManyRelation
  • ContactsNameBehavior
  • CStatElement
  • CStatRelation
  • ERememberFiltersBehavior
  • FileSystemObjectBehavior
  • MobileLayouts
  • RecordAliases
  • RelationshipsBehavior
  • TopicReplies
  • X2ActiveRecord
  • X2Flow
  • Overview
  • Package
  • Class
  • Tree

Class CActiveRelation

CActiveRelation is the base class for representing active relations that bring back related objects.

CComponent
Extended by CBaseActiveRelation
Extended by CActiveRelation

Direct known subclasses

CBelongsToRelation, CHasManyRelation, CHasOneRelation

Indirect known subclasses

CManyManyRelation
Package: system\db\ar
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/db/ar/CActiveRecord.php
Methods summary
public
# mergeWith( array $criteria, boolean $fromScope = false )

Merges this relation with a criteria specified dynamically.

Merges this relation with a criteria specified dynamically.

Parameters

$criteria
array
$criteria the dynamically specified criteria
$fromScope
boolean
$fromScope whether the criteria to be merged is from scopes

Overrides

CBaseActiveRelation::mergeWith()
Methods inherited from CBaseActiveRelation
__construct()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
public string $joinType 'LEFT OUTER JOIN'
#

join type. Defaults to 'LEFT OUTER JOIN'.

join type. Defaults to 'LEFT OUTER JOIN'.

public string $on ''
#

ON clause. The condition specified here will be appended to the joining condition using AND operator.

ON clause. The condition specified here will be appended to the joining condition using AND operator.

public string $alias
#

the alias for the table that this relation refers to. Defaults to null, meaning the alias will be the same as the relation name.

the alias for the table that this relation refers to. Defaults to null, meaning the alias will be the same as the relation name.

public string|array $with array()
#

specifies which related objects should be eagerly loaded when this related object is lazily loaded. For more details about this property, see CActiveRecord::with().

specifies which related objects should be eagerly loaded when this related object is lazily loaded. For more details about this property, see CActiveRecord::with().

public boolean $together
#

whether this table should be joined with the primary table. When setting this property to be false, the table associated with this relation will appear in a separate JOIN statement. If this property is set true, then the corresponding table will ALWAYS be joined together with the primary table, no matter the primary table is limited or not. If this property is not set, the corresponding table will be joined with the primary table only when the primary table is not limited.

whether this table should be joined with the primary table. When setting this property to be false, the table associated with this relation will appear in a separate JOIN statement. If this property is set true, then the corresponding table will ALWAYS be joined together with the primary table, no matter the primary table is limited or not. If this property is not set, the corresponding table will be joined with the primary table only when the primary table is not limited.

public mixed $scopes
#
scopes to apply Can be set to the one of the following:
  • Single scope: 'scopes'=>'scopeName'.
  • Multiple scopes: 'scopes'=>array('scopeName1','scopeName2').
scopes to apply Can be set to the one of the following:
  • Single scope: 'scopes'=>'scopeName'.
  • Multiple scopes: 'scopes'=>array('scopeName1','scopeName2').

Since

1.1.9
public string $through
#

the name of the relation that should be used as the bridge to this relation. Defaults to null, meaning don't use any bridge.

the name of the relation that should be used as the bridge to this relation. Defaults to null, meaning don't use any bridge.

Since

1.1.7
Properties inherited from CBaseActiveRelation
$className, $condition, $foreignKey, $group, $having, $join, $joinOptions, $name, $order, $params, $select
API documentation generated by ApiGen 2.8.0