我试图生成我的灯具,我收到了这个错误:
Catchable Fatal Error: Object of class FinanceBundle\Entity\Conversion could not be converted to string
这是我的相关实体:
ConversionLink实体
...
/**
*
* @var Conversion
*
* @ORM\Column(name="""conversionID""", type="bigint")
* @ORM\ManyToOne(targetEntity="FinanceBundle\Entity\Conversion")
* @ORM\JoinColumn(name="""conversionID""", referencedColumnName="""ID""")
*/
private $conversion;
... //getter setters and so on
转化实体不包含此关系。只有其他独立的领域。
这是我的转化路径灯具
FinanceBundle\Entity\ConversionLink:
conversionLink{1..5}:
# some fields ...
conversion: '@conversion*'
感谢。
答案 0 :(得分:0)
您的灯具文件应如下所示:
FinanceBundle\Entity\ConversionLink:
conversionLink{1..5}:
# some fields ...
conversion: '@conversion<current()>'
答案 1 :(得分:0)
试试这个:
FinanceBundle\Entity\ConversionLink:
conversionLink{1..5}:
# some fields ...
conversion: '@conversion$current'