Replies: 8 comments
-
I believe this may be a duplicate of #2931? |
Beta Was this translation helpful? Give feedback.
-
In your issue you seem to mention only the missing attributes of the daughter classes whereas in my case it is an impossibility to use Doctrine Relations with an abstract class. |
Beta Was this translation helpful? Give feedback.
-
Hi @baudev, as we've discussed on Slack, have you checked this out? (The annotation has the same name as Doctrine's |
Beta Was this translation helpful? Give feedback.
-
Hi @teohhanhui, not sure if I should post it here, but since the issue was still open ... 🙂 I'm also getting This is the (simplified) scheme: <entity name="App\Entity\User" inheritance-type="JOINED">
<discriminator-column name="type" type="string"/>
<discriminator-map>
<discriminator-mapping value="type_a" class="App\Entity\UserTypeA"/>
<discriminator-mapping value="type_b" class="App\Entity\UserTypeB"/>
<discriminator-mapping value="type_c" class="App\Entity\UserTypeC"/>
</discriminator-map>
<one-to-many field="documents" target-entity="App\Entity\Document" mapped-by="user" orphan-removal="true"/>
</entity>
<entity name="App\Entity\Document">
<many-to-one field="user" target-entity="App\Entity\User" inversed-by="documents"/>
</entity> Is there anything I should be doing differently starting from 2.4.4? |
Beta Was this translation helpful? Give feedback.
-
Hello @baudev, did you ever find a way to fix this? 🙂 |
Beta Was this translation helpful? Give feedback.
-
@eekes, unfortunately I haven't really looked yet. I have many other bugs in parallel. |
Beta Was this translation helpful? Give feedback.
-
We see the same issue but interestingly only in API tests. It works just fine in the browser with real requests ... 🤔 |
Beta Was this translation helpful? Give feedback.
-
@teohhanhui Unfortunately one cannot add the Serializer
This makes sense since the property is managed by Doctrine using the Attempt to add it: /**
* @ORM\Column(type="string", length=255)
*/
public string $type; Next error:
Any ideas? |
Beta Was this translation helpful? Give feedback.
-
The regression appeared in version 2.4.4. Indeed, the code below is fully functional with version 2.4.3. I've discussed with @teohhanhui on Slack about this issue.
On the image, we can see the inheritance relationship between the different objects.
Teachr
andClient
inherit fromUser
which is an abstract class (codes are below).There is a relationship between the
User
andAddress
objects.User
:Client
(same forTeachr
):Address
:The error:
By the way, thank you for this wonderful framework ❤️
Beta Was this translation helpful? Give feedback.
All reactions