問題タブ [mappedsuperclass]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
inheritance - Specify parent's Doctrine targetEntity in extended concrete class
TenantUserProjectMember
and VendorUserProjectMember
both have a $user
property but they have different targetEntities. Both of these classes extend the MappedSuperclass AbstractUserProjectMember
. While not shown, this $user
property has additional attributes, and I would like to define it once in AbstractUserProjectMember
and override the associations in the concrete classes.
I have tried the following but get errors association TenantUserProjectMember#user
and VendorUserProjectMember#user
refer to the inverse side field of AbstractUser#projectMembers
which does not exist. Note that I cannot add a $projectMembers
to AbstractUser
as not all extended classes have such a property.
Is it possible to specify parent's targetEntity in the extended concrete class, and if so how?
#xA;#xA;#xA;#xA;#xA;#xA;