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 CBaseActiveRelation

CBaseActiveRelation is the base class for all active relations.

CComponent
Extended by CBaseActiveRelation

Direct known subclasses

CActiveRelation, CStatRelation

Indirect known subclasses

CBelongsToRelation, CHasManyRelation, CHasOneRelation, CManyManyRelation
Package: system\db\ar
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Located at x2engine/framework/db/ar/CActiveRecord.php
Methods summary
public
# __construct( string $name, string $className, string $foreignKey, array $options = array() )

Constructor.

Constructor.

Parameters

$name
string
$name name of the relation
$className
string
$className name of the related active record class
$foreignKey
string
$foreignKey foreign key for this relation
$options
array
$options additional options (name=>value). The keys must be the property names of this class.
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
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 $name
#

name of the related object

name of the related object

public string $className
#

name of the related active record class

name of the related active record class

public mixed $foreignKey
#

the foreign key in this relation

the foreign key in this relation

public mixed $select '*'
#

list of column names (an array, or a string of names separated by commas) to be selected. Do not quote or prefix the column names unless they are used in an expression. In that case, you should prefix the column names with 'relationName.'.

list of column names (an array, or a string of names separated by commas) to be selected. Do not quote or prefix the column names unless they are used in an expression. In that case, you should prefix the column names with 'relationName.'.

public string $condition ''
#

WHERE clause. For CActiveRelation descendant classes, column names referenced in the condition should be disambiguated with prefix 'relationName.'.

WHERE clause. For CActiveRelation descendant classes, column names referenced in the condition should be disambiguated with prefix 'relationName.'.

public array $params array()
#

the parameters that are to be bound to the condition. The keys are parameter placeholder names, and the values are parameter values.

the parameters that are to be bound to the condition. The keys are parameter placeholder names, and the values are parameter values.

public string $group ''
#

GROUP BY clause. For CActiveRelation descendant classes, column names referenced in this property should be disambiguated with prefix 'relationName.'.

GROUP BY clause. For CActiveRelation descendant classes, column names referenced in this property should be disambiguated with prefix 'relationName.'.

public string $join ''
#

how to join with other tables. This refers to the JOIN clause in an SQL statement. For example, <span class="php-quote">'LEFT JOIN users ON users.id=authorID'</span>.

how to join with other tables. This refers to the JOIN clause in an SQL statement. For example, <span class="php-quote">'LEFT JOIN users ON users.id=authorID'</span>.

Since

1.1.3
public string|array $joinOptions ''
#

property for setting post-JOIN operations such as USE INDEX. String typed value can be used with JOINs for HAS_MANY and MANY_MANY relations, while array typed value designed to be used only with MANY_MANY relations. First array element will be used for junction table JOIN and second array element will be used for target table JOIN.

property for setting post-JOIN operations such as USE INDEX. String typed value can be used with JOINs for HAS_MANY and MANY_MANY relations, while array typed value designed to be used only with MANY_MANY relations. First array element will be used for junction table JOIN and second array element will be used for target table JOIN.

Since

1.1.16
public string $having ''
#

HAVING clause. For CActiveRelation descendant classes, column names referenced in this property should be disambiguated with prefix 'relationName.'.

HAVING clause. For CActiveRelation descendant classes, column names referenced in this property should be disambiguated with prefix 'relationName.'.

public string $order ''
#

ORDER BY clause. For CActiveRelation descendant classes, column names referenced in this property should be disambiguated with prefix 'relationName.'.

ORDER BY clause. For CActiveRelation descendant classes, column names referenced in this property should be disambiguated with prefix 'relationName.'.

API documentation generated by ApiGen 2.8.0