Affects Version/s: 2.4.2
Fix Version/s: None
Security Level: All
I have the following classes:
and these tables: diet_entries, recipes, ingredients.
The idea was not to create the table for supplements since a supplement needs no extra attributes other then those derived from an ingredient, otherwise I would have added Supplement to discriminator map of DietEntry and provided a table for it which is mandatory in JOINED inheritance.
But the problem now is that when a query is build it looks like this:
An exception occurred while executing
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'i0_.name' in 'field list
The query for Ingredient is missing a join with the diet_entries table from which the ingredient derives. ORM only sees entities/tables down the inheritance path from the Ingredient class but not up from Ingredient to DietEntry