Je n'arrive pas à faire fonctionner la méthode box()
, je ne reçois que NULL
.RedBean renvoie la valeur null lors du déballage du modèle du bean?
Par exemple, si je fais ce
$bean = \R::load('comment', 2);
print("\n\nBEAN:\n");
var_dump($bean);
$model = $bean->box();
print("\n\nMODEL:\n");
var_dump($model);
Je reçois ce
BEAN:
class RedBeanPHP\OODBBean#68 (10) {
protected $properties =>
array(4) {
'id' =>
string(1) "2"
'user' =>
string(1) "2"
'reply_to' =>
NULL
'message' =>
string(30) "Test comment 1"
}
protected $__info =>
array(4) {
'type' =>
string(7) "comment"
'sys.id' =>
string(2) "id"
'sys.orig' =>
array(5) {
'id' =>
string(1) "2"
'user' =>
string(1) "1"
'reply_to' =>
NULL
'message' =>
string(30) "Test comment 1"
}
'tainted' =>
bool(false)
'changed' =>
bool(false)
}
protected $beanHelper =>
class RedBeanPHP\BeanHelper\SimpleFacadeBeanHelper#17 (0) {
}
protected $fetchType =>
NULL
protected $withSql =>
string(0) ""
protected $withParams =>
array(0) {
}
protected $aliasName =>
NULL
protected $via =>
NULL
protected $noLoad =>
bool(false)
protected $all =>
bool(false)
}
MODEL:
NULL
De toute évidence, il existe des données dans la fève, alors pourquoi ne box()
retour NULL
?