v5:activerecord:tablehasmany
This is an old revision of the document!
tableHasMany
void ADODB_Active_Record::TableHasMany( string $table, string $relation, string $foreignKey = '', string $foreignClass = 'ADODB_Active_Record' )
Description
For some classes, the mapping between class name and table name (which is the pluralised version) might not match. For example, the class name might be person, but the table name might be people
Usage
ADODB_Active_Record::tableHasMany('people', 'children', 'person_id')
v5/activerecord/tablehasmany.1449323146.txt.gz · Last modified: 2017/04/21 11:20 (external edit)