Thanks Marco. On Tuesday, September 27, 2016 at 11:57:13 PM UTC+2, Marco Pivetta wrote: > > Doctrine does not (and will not) support DEFAULT values set at DDL level, > and treats the in-memory entity as authoritative at all times. >
That wouldn't be needed if I were able to tell Doctrine that a column should not be set in the current request. I can choose the fields that should be selected, so why not be able to choose which fields should be implicitly populated by the DBMS? The problem is: In this simple example I can find a way to generate the value myself. But what about columns that are automatically populated via a trigger or the like? That would either mean to duplicate the whole trigger in the application OR to amend all the triggers in the DBMS. That's ... well, suboptimal. * avoid mapping those entity fields at all (doctrine will skip those > fields in all queries) > This is not an option, as I need to read the value. And as there is no way to make Doctrine ignore this column during write operations, I do run into the exact same problem. * move the GUID (or generally default logic) to your entity's constructor > Not an option either as lined out above. Thanks for the response, though! Best wishes, Dominik -- 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.
