ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# Class Phalcon\\Db\\Reference # Class **Phalcon\\Db\\Reference** *implements*[*Phalcon\\Db\\ReferenceInterface*](#) Allows to define reference constraints on tables ``` <pre class="calibre14">``` <?php $reference = new \Phalcon\Db\Reference("field_fk", array( 'referencedSchema' => "invoicing", 'referencedTable' => "products", 'columns' => array("product_type", "product_code"), 'referencedColumns' => array("type", "code") )); ``` ``` ### Methods public **getName** () Constraint name public **getSchemaName** () ... public **getReferencedSchema** () ... public **getReferencedTable** () Referenced Table public **getColumns** () Local reference columns public **getReferencedColumns** () Referenced Columns public **getOnDelete** () ON DELETE public **getOnUpdate** () ON UPDATE public **\_\_construct** (*unknown* $name, *unknown* $definition) Phalcon\\Db\\Reference constructor public static **\_\_set\_state** (*unknown* $data) Restore a Phalcon\\Db\\Reference object from export | - [索引](# "总目录") - [下一页](# "Class Phalcon\Db\Result\Pdo") | - [上一页](# "Class Phalcon\Db\RawValue") | - [API Indice](#) »