===== TableRecord ===== The TableRecord class describes one record from a Table. ==== Extends ==== [[vortex:tablestub|TableStub]] ==== Implements ==== [[vortex:initializable|Initializable]] ==== Constants ==== ==== Methods ==== ==== Code Examples ==== Connect the 1-side of a [[vortex:relation|Relation]] to another record $thisTableRecord = TableRecordFactory::getTableRecord( 'myTable', $idTableRecord1 ); $otherTableRecord = TableRecordFactory::getTableRecord( 'myOtherTable', $idTableRecord2 ); $thisTableRecord->set( 'theRelationField', $otherTableRecord->getUUID() ); Connect the 1-side of a multi[[vortex:relation#multirelation|Relation]] to another record specifying which relation to set $thisTableRecord = TableRecordFactory::getTableRecord( 'myTable', $idTableRecord1 ); $otherTableRecord = TableRecordFactory::getTableRecord( 'myOtherTable', $idTableRecord2 ); $thisTableRecord->set( 'theRelationField', "relationname;".$otherTableRecord->getUUID() ); alternatively $thisTableRecord = TableRecordFactory::getTableRecord( 'myTable', $idTableRecord1 ); $otherTableRecord = TableRecordFactory::getTableRecord( 'myOtherTable', $idTableRecord2 ); $thisTableRecord->getField( 'theRelationField' )->setActiveRelation( "relationname" ); $thisTableRecord->set( 'theRelationField', $otherTableRecord->getUUID() ); Connect the X-side of a [[vortex:relation|Relation]] to another record $thisTableRecord = TableRecordFactory::getTableRecord( 'myTable', $idTableRecord1 ); $otherTableRecord = TableRecordFactory::getTableRecord( 'myOtherTable', $idTableRecord2 ); $thisTableRecord->setRelation( 'relationName', $otherTableRecord->getUUID() ); Set a value to a field in the record $tableRecord->set( 'field', $value );