Previous Class
Solar_Sql_Model_Related_HasMany

Solar_Sql_Model_Related_HasOne
Overview

Next Page
Constants

Solar_Sql_Model_Related_HasOne

Represents the characteristics of a relationship where a native model "has one" of a foreign model.

Catalog

This class is part of the Solar_Sql_Model package.

Inheritance:

Constants

None.

Public Properties

These are all the public properties in the Solar_Sql_Model_Related_HasOne class.

You can also view the list of all public, protected, and private properties.

$cols
Fetch these columns for the related records.
$distinct
When fetching records, use DISTINCT ?
$fetch
The fetch type to use: 'one', 'all', 'assoc', etc.
$foreign_alias
Aliases the foreign table to this name.
$foreign_class
The class name of the foreign model.
$foreign_col
The name of the column to join with in the foreign table.
$foreign_inherit_col
If the foreign model uses single-table inheritance, this is the column where the inheritance value is stored.
$foreign_inherit_val
If the foreign model has an inheritance type, the value of that inheritance type (as stored in foreign_inherit_col).
$foreign_key
The virtual element called foreign_key automatically populates the native_col or foreign_col value for you, based on the association type.
$foreign_primary_col
The name of the foreign primary column.
$foreign_table
The name of the table for the foreign model.
$group
Additional GROUP clauses when fetching records.
$having
Additional HAVING clauses when fetching records.
$name
The name of the relationship as defined by the original (native) model.
$native_alias
The alias for the native table.
$native_class
The class of the native model.
$native_col
The native column to match against the foreign primary column.
$native_table
The name of the native table.
$order
Additional ORDER clauses when fetching records.
$paging
When fetching records, use this many records per page of results.
$through
The relationship name through which we find foreign records.
$through_alias
The "through" table alias.
$through_foreign_col
In the "through" table, the column that has the matching foreign value.
$through_key
The virtual element through_key automatically populates the 'through_foreign_col' value for you.
$through_native_col
In the "through" table, the column that has the matching native value.
$through_table
The "through" table name.
$type
The type of the relationship as defined by the original (native) model; e.g., 'has_one', 'belongs_to', 'has_many'.
$where
Additional WHERE clauses when fetching records.

Public Methods

These are all the public methods in the Solar_Sql_Model_Related_HasOne class.

You can also view the list of all public, protected, and private methods.

__construct()
Constructor.
__destruct()
Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().
apiVersion()
Reports the API version for this class.
dump()
Convenience method for getting a dump the whole object, or one of its properties, or an external variable.
getModel()
Returns the related model instance.
load()
Loads this relationship object with user-defined characteristics (options), and corrects them as needed.
locale()
Looks up class-specific locale strings based on a key.
newSelect()
Creates a new selection object for records on this relationship.
setNativeModel()
Sets the native (origin) model instance.
toArray()
Returns the relation characteristics as an array.