Found my gremlin.
I had three hasOne associations that when I appended the “_key” in the table column, table and the form, all started working.
Example: Changed “tax_cod” to “tax_cod_key”
No idea why this logic worked in v4.5.8 and not in v5.2.5. Naming conventions???
$this->hasOne('TaxCod', [
'className' => 'DataGroupDetails'
])
->setForeignKey('secondary_key')
->setBindingKey('tax_cod')
->setProperty('tax_cod')
->setConditions(['TaxCod.data_group_id' => 7])
->setDependent(false);
To
$this->hasOne('TaxCod', [
'className' => 'DataGroupDetails'
])
->setForeignKey('secondary_key')
->setBindingKey('tax_cod_key')
->setProperty('tax_cod')
->setConditions(['TaxCod.data_group_id' => 7])
->setDependent(false);
Different association that worked from the start
$this->hasOne('CompanyType', [
'className' => 'DataGroupDetails'
])
->setForeignKey('secondary_id')
->setBindingKey('company_type_id')
->setProperty('company_type')
->setConditions(['CompanyType.data_group_id' => 1])
->setDependent(false);