Hello!
While saving an entity locally works like a charm, it wont work on a remote server.
I have already cleared the cache folder, even I synchronized both database schemata.
Error:
Error: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'program_type' cannot be null
If you are using SQL keywords as table column names, you can enable identifier quoting for your database connection in config/app.php.
SQL Query:
UPDATE channel_programs SET time_start = :c0 , time_end = :c1 , date_change = :c2 , all_day = :c3 , program_type = :c4 , program_interval_type = :c5 WHERE id = :c6
The entity in beforeSave method gives following output:
object(App\Model\Entity\ChannelProgram) {
'id' => (int) 4201,
'channel_id' => (int) 11,
'time_start' => object(Cake\I18n\Time) {
'time' => '2017-05-30T01:00:00+02:00',
'timezone' => 'Europe/Vienna',
'fixedNowTime' => false
},
'time_end' => object(Cake\I18n\Time) {
'time' => '2017-05-30T01:05:00+02:00',
'timezone' => 'Europe/Vienna',
'fixedNowTime' => false
},
'date_create' => object(Cake\I18n\FrozenTime) {
'time' => '2017-05-31T16:31:32+00:00',
'timezone' => 'UTC',
'fixedNowTime' => false
},
'date_change' => object(Cake\I18n\Time) {
'time' => '2017-05-31T16:34:37+02:00',
'timezone' => 'Europe/Vienna',
'fixedNowTime' => false
},
'all_day' => false,
'program_type' => 'spot',
'program_interval_type' => 'weekly',
'channel_program_dow' => object(App\Model\Entity\ChannelProgramDow) {
'channel_program_id' => (int) 4201,
'day' => 'tuesday',
'date_create' => object(Cake\I18n\FrozenTime) {
'time' => '2017-05-31T16:31:32+00:00',
'timezone' => 'UTC',
'fixedNowTime' => false
},
'date_change' => object(Cake\I18n\FrozenTime) {
'time' => '2017-05-31T16:31:32+00:00',
'timezone' => 'UTC',
'fixedNowTime' => false
},
'[new]' => false,
'[accessible]' => [
'*' => true
],
'[dirty]' => [
'day' => true
],
'[original]' => [
'day' => 'monday'
],
'[virtual]' => [],
'[errors]' => [],
'[invalid]' => [],
'[repository]' => 'ChannelProgramDows'
},
'[new]' => false,
'[accessible]' => [
'*' => true
],
'[dirty]' => [
'time_start' => true,
'time_end' => true,
'channel_program_dow' => true,
'date_change' => true
],
'[original]' => [
'time_start' => object(Cake\I18n\FrozenTime) {
'time' => '2017-05-31T01:00:00+00:00',
'timezone' => 'UTC',
'fixedNowTime' => false
},
'time_end' => object(Cake\I18n\FrozenTime) {
'time' => '2017-05-31T01:05:00+00:00',
'timezone' => 'UTC',
'fixedNowTime' => false
},
'date_change' => object(Cake\I18n\FrozenTime) {
'time' => '2017-05-31T16:31:32+00:00',
'timezone' => 'UTC',
'fixedNowTime' => false
}
],
'[virtual]' => [],
'[errors]' => [],
'[invalid]' => [],
'[repository]' => 'ChannelPrograms'
}
I cannot figure out what’s going on, since this field is definitly NOT NULL - it also works locally …