Example #1
0
	/**
	 * Retrieves all Records in the specified table associated with the current
	 * Record.
	 *
	 * @param string $tableName the name of the table to use
	 * @return \Bedrock\Model\ResultSet any associated records in the table
	 */
	public function associated($tableName, $limit = array()) {
		try {
			$result = \Bedrock\Model\Query::associated($this, $tableName, $limit);
			return $result;
		}
		catch(\Exception $ex) {
			\Bedrock\Common\Logger::exception($ex);
			throw new \Bedrock\Model\Record\Exception('A problem was encountered while checking for associated records.');
		}
	}