0

I have a custom table for company with a column : sales_representative_id

// print_r($company->getSalesRepresentativeId());exit;
 $this->sellerCompanyService->createCompany($company, $customer);

here the print_r returns the correct value which is passing via the form submit. But after save, in DB the stored value is 20. What ever we passed, the value is become 20.

There is no default value set, and the issue is for only this col.

2
  • Please add more details about logic in createCompany, etc. What is the value before you try to save and what is value saved Jun 7, 2022 at 10:19
  • Sorry It was my mistake.. The value is taken from a default configuration, I was unaware
    – Thulya
    Jun 7, 2022 at 11:30

1 Answer 1

0

Please check your InstallSchema.php file in Setup. There must be somet wrong setting. Try to fix it. Then remove your Module entry from setup:module table. and run setup:upgrade and all other commands.

1
  • ->addColumn( CompanyInterface::SALES_REPRESENTATIVE_ID, Table::TYPE_INTEGER, null, ['unsigned' => true, 'nullable' => true], 'Sales Representative ID' ) tried, no change and no issues found
    – Thulya
    Jun 7, 2022 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.