Two lists with same model type

10 views
Skip to first unread message

Pillen

unread,
Dec 28, 2015, 2:21:13 PM12/28/15
to redbeanphp
How to do the followig:

In a "car" bean I simply want to have two arrays (or lists) which both hold beans from type "wheel".

car
------
wheels
spare_wheels

How to do that in RedBeans?



gabor

unread,
Jan 2, 2016, 9:49:34 AM1/2/16
to redbeanphp


You cant, RedBeanPHP uses 1-1 DB structure:

$car->ownWheelList
$car->ownSparewheelList

gabor

unread,
Jan 2, 2016, 9:50:37 AM1/2/16
to redbeanphp


why not add a column type or tag to wheel instead?
Reply all
Reply to author
Forward
0 new messages