Magento 2.1.1.
Is there any way to set custom created_at
attribute on newly created product? I used method $product->setCreatedAt($date)
before saving it. Value is set on product object, but finally when saving it into db, mysql mechanism is trigger, which sets current timestamp, not mine. I logged sql queries, and field created_at
is not in insert
into catalog_product_entity
, so it's actually normal that mysql fills that field with default value.
Only way I could modify it was pure sql, but it is not a way to go.