class Model_Comment extends RedBean_SimpleModel {
public $message;
public $something;
}
R::setup('sqlite:../data/slask.db');
R::nuke();
$b = R::dispense('comment');
$m = $b->box();
$m->message = 'Test';
R::store($m);
What am I doing wrong, and how can I get a boxed model to be stored? Even trying to store
$m->unbox()
wont work
If I run the below code, I'd expect that the model would get stored in the database, but it just inserts an empty row without the message.
class Model_Comment extends RedBean_SimpleModel {
public $message;
public $something;
}
R::setup('sqlite:test.db');
R::nuke();
$b = R::dispense('comment');
$m = $b->box();
$m->message = 'Test';
R::store($m);
How can I get RedBean to insert data from a Model instead of a Bean?
Even using
\R::store($m);
won't work...