Previous Page
Constants

Solar_Sql_Model_Related_HasMany
Properties

Next Page
Methods

Properties

Public

$cols

(string|array) Fetch these columns for the related records.

Inherited from Solar_Sql_Model_Related.

$distinct

(bool) When fetching records, use DISTINCT ?

Inherited from Solar_Sql_Model_Related.

$fetch

(string) The fetch type to use: 'one', 'all', 'assoc', etc.

Inherited from Solar_Sql_Model_Related.

$foreign_alias

(string) Aliases the foreign table to this name.

Inherited from Solar_Sql_Model_Related.

Default is the relationship name.

$foreign_class

(string) The class name of the foreign model.

Inherited from Solar_Sql_Model_Related.

Default is the first matching class for the relationship name, as loaded from the parent class stack. Automatically honors single-table inheritance.

$foreign_col

(string) The name of the column to join with in the foreign table.

Inherited from Solar_Sql_Model_Related.

This forms one-half of the relationship. Default is per association type.

$foreign_inherit_col

(string) If the foreign model uses single-table inheritance, this is the column where the inheritance value is stored.

Inherited from Solar_Sql_Model_Related.

$foreign_inherit_val

(string) If the foreign model has an inheritance type, the value of that inheritance type (as stored in foreign_inherit_col).

Inherited from Solar_Sql_Model_Related.

$foreign_key

(string) The virtual element called foreign_key automatically populates the native_col or foreign_col value for you, based on the association type.

Inherited from Solar_Sql_Model_Related.

This will be used only when native_col and foreign_col are not set.

$foreign_primary_col

(string) The name of the foreign primary column.

Inherited from Solar_Sql_Model_Related.

$foreign_table

(string) The name of the table for the foreign model.

Inherited from Solar_Sql_Model_Related.

Default is the table specified by the foreign model.

$group

(string|array) Additional GROUP clauses when fetching records.

Inherited from Solar_Sql_Model_Related.

$having

(string|array) Additional HAVING clauses when fetching records.

Inherited from Solar_Sql_Model_Related.

$name

(string) The name of the relationship as defined by the original (native) model.

Inherited from Solar_Sql_Model_Related.

$native_alias

(string) The alias for the native table.

Inherited from Solar_Sql_Model_Related.

$native_class

(string) The class of the native model.

Inherited from Solar_Sql_Model_Related.

$native_col

(string) The native column to match against the foreign primary column.

Inherited from Solar_Sql_Model_Related.

$native_table

(string) The name of the native table.

Inherited from Solar_Sql_Model_Related.

$order

(string|array) Additional ORDER clauses when fetching records.

Inherited from Solar_Sql_Model_Related.

$paging

(int) When fetching records, use this many records per page of results.

Inherited from Solar_Sql_Model_Related.

$through

(string) The relationship name through which we find foreign records.

Inherited from Solar_Sql_Model_Related.

$through_alias

(string) The "through" table alias.

Inherited from Solar_Sql_Model_Related.

$through_foreign_col

(string) In the "through" table, the column that has the matching foreign value.

Inherited from Solar_Sql_Model_Related.

$through_key

(string.) The virtual element through_key automatically populates the 'through_foreign_col' value for you.

Inherited from Solar_Sql_Model_Related.

$through_native_col

(string) In the "through" table, the column that has the matching native value.

Inherited from Solar_Sql_Model_Related.

$through_table

(string) The "through" table name.

Inherited from Solar_Sql_Model_Related.

$type

(string) The type of the relationship as defined by the original (native) model; e.g., 'has_one', 'belongs_to', 'has_many'.

Inherited from Solar_Sql_Model_Related.

$where

(string|array) Additional WHERE clauses when fetching records.

Inherited from Solar_Sql_Model_Related.

Protected

$_config

(array) Collection point for configuration values.

Inherited from Solar_Base.

Note that you do not define config defaults in $_config directly.

<?php
// DO NOT DO THIS
protected $_config = array(
    'foo' => 'bar',
    'baz' => 'dib',
);
?>

Instead, define config defaults in a protected property named for the class, withan underscore prefix.

For exmple, a "Vendor_Class_Name" class would define the default config array in "$_Vendor_Class_Name". This convention lets child classes inherit parent config keys and values.

<?php
// DO THIS INSTEAD
protected $_Vendor_Class_Name = array(
    'foo' => 'bar',
    'baz' => 'dib',
);
?>

$_foreign_model

(Solar_Sql_Model) An instance of the foreign (related) model.

Inherited from Solar_Sql_Model_Related.

$_native_model

(Solar_Sql_Model) An instance of the native (origin) model that defined this relationship.

Inherited from Solar_Sql_Model_Related.

Private

None.