How to receive Childrens inherited datas from an Entity that is having a JOINED relation with it parent

according to the following structure i need to receive the data “name”(from entity Media) and the data “ext” (from Entity Image) when i use a findAllRequest from the template repository.

class Template {
   Zone $Zone(@ORMOne to Many)
...
}

class Zone {
  Media $media(@ORMOne to Many)
...
}

@ORMInheritanceType("JOINED")
class Media{
  $name
...
}

class Image extends Media{
 $ext
...
}

For the moment i currently receive the Template Datas in this form (using the method Zone=> setMedia(Image $image) to add the media in the zone Entity)

Template => 
id 1
zones => [
id => 1
  media => [
  id => 2,
  name => media1
  ] 
]

Why the ext information from the Media herited class ‘Image’ is missing in the datas received ? How can i get them ?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *