load()
load(\RedBeanPHP\OODB $oodb, string|array $types, mixed $id) : array<mixed,\RedBeanPHP\OODBBean>
Loads multiple types of beans with the same ID.
This might look like a strange method, however it can be useful for loading a one-to-one relation. In a typical 1-1 relation, you have two records sharing the same primary key. RedBeanPHP has only limited support for 1-1 relations. In general it is recommended to use 1-N for this.
Usage:
list( $author, $bio ) = R::loadMulti( 'author, bio', $id );
Parameters
\RedBeanPHP\OODB | $oodb | OODB object |
string|array | $types | the set of types to load at once |
mixed | $id | the common ID |