Answer the question
In order to leave comments, you need to log in
Strange behavior on INSERT YII2. Who faced?
There is an ActiveRecord in the table with which it works, there are a number of CHAR(255) NOT NULL fields, for example field1, field2 . This AR is used to load data from the API into the internal database. From api, from time to time the value field1, field2 comes in the form of an empty string, and accordingly this value is set in the model. The following situation arose: sometimes, for some reason, Yii converts empty values to null when writing to the database. At the same time, in most cases, it writes them down correctly, besides, there is a default validator.
Today, with a colleague, we revised the model along and across, nothing that could cause such behavior was found. Maybe someone faced a similar situation? tell me which way to dig.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question