Yes, my reply is the same, any kind of custom fields are not solvable in the way you want, because doctrine doesn't have the hooks. Every field *must* be in a mapping file, SQL is the least of your problems. One solution is to use a $customFields array and map this as "json_array" into a text field in the database and then build your own index on top of that, or use PostgreSQL json index functionality.
greetings Benjamin On Thu, Jun 29, 2017 at 10:16 AM, Kleand Sherali <[email protected]> wrote: > Thank you for your reply! > > I do NOT mean objects with no properties at all, sorry for my wrong > example. I mean a normal mapped object BUT extended by adding more columns > to its table and I store these column values in an object property called > $customFields which contains key/value array ['column_name' => value], and > I need to be able to listen when these objects gets updated in order to > inject this array into the query to update the record with one call of > persist() and flush(). HERE > <http://docs.doctrine-project.org/projects/doctrine1/en/latest/en/manual/event-listeners.html#id65>I > think its what I am looking for but I can not include that in my vendor > folder for doctrine. > > My composer.json looks like > > "doctrine/orm": "~2.5.3", > "doctrine/dbal": "~2.5.3", > "doctrine/doctrine-bundle": "~1.2", > "doctrine/doctrine-fixtures-bundle": "2.2.*@dev", > "doctrine/migrations": "dev-master", > "doctrine/doctrine-migrations-bundle": "~1.0", > > -- > You received this message because you are subscribed to the Google Groups > "doctrine-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/doctrine-user. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
