我有两个表:
键
历史
如何在Twig的key
实体内部访问history
?
{{ history.key.hook }}
似乎不起作用?
{{ dump(history) }}
提供了这一点:
object(RedBeanPHP\OODBBean)#120 (10) { ["properties":protected]=> array(5) { ["id"]=> string(1) "1" ["date"]=> string(19) "2018-12-06 16:06:21" ["action"]=> string(6) "Issued" ["user_id"]=> string(1) "1" ["key_id"]=> string(2) "17" } ["__info":protected]=> array(7) { ["type"]=> string(7) "history" ["sys.id"]=> string(2) "id" ["sys.orig"]=> array(5) { ["id"]=> string(1) "1" ["date"]=> string(19) "2018-12-06 16:06:21" ["action"]=> string(6) "Issued" ["user_id"]=> string(1) "1" ["key_id"]=> string(2) "17" } ["tainted"]=> bool(false) ["changed"]=> bool(false) ["changelist"]=> array(0) { } ["model"]=> NULL } ["beanHelper":protected]=> object(RedBeanPHP\BeanHelper\SimpleFacadeBeanHelper)#28 (0) { } ["fetchType":protected]=> NULL ["withSql":protected]=> string(0) "" ["withParams":protected]=> array(0) { } ["aliasName":protected]=> NULL ["via":protected]=> NULL ["noLoad":protected]=> bool(false) ["all":protected]=> bool(false) }