Doctrine orm 使用继承正确显示映射关联

Doctrine orm 使用继承正确显示映射关联,doctrine-orm,symfony4,symfony2-easyadmin,easyadmin,Doctrine Orm,Symfony4,Symfony2 Easyadmin,Easyadmin,我正在使用条令处理实体继承 我有一个基本实体BaseEntity 然后我有FirstEntity和SecondEntity,它们扩展了BaseEntity 另一方面,我有一个标准实体,它有一个映射关联,即OneToManyBaseEntity命名的baseEntities 在标准实体的查看页面中,还应显示与此实体相关的基本实体列表 但我有点麻烦 第一个错误: An exception has been thrown during the rendering of a template ("War

我正在使用条令处理实体继承

我有一个基本实体BaseEntity

然后我有FirstEntitySecondEntity,它们扩展了BaseEntity

另一方面,我有一个标准实体,它有一个映射关联,即OneToManyBaseEntity命名的baseEntities

标准实体的查看页面中,还应显示与此实体相关的基本实体列表

但我有点麻烦

第一个错误

An exception has been thrown during the rendering of a template ("Warning: nl2br() expects parameter 1 to be string, object given").
第一个解决方案:我强制将属性的类型关联起来

-{property:baseEntities,type:association}
我还有第二个错误

An exception has been thrown during the rendering of a template ("Notice: Undefined index: targetEntity").
但是如果我将类型设置为array,我会得到正确的项目列表,但是只有简单的文本。我希望有链接到相关实体的链接-第一实体第二实体查看页面

-{property:baseEntities,type:array}

有必要将类型“关联”和类型选项添加到相关实体的类中,以便也具有链接,例如,这里我使用我的类标记

 { property: 'tags', type: 'association', type_options: 'App\Entity\Tag' }