We have created a relationships between 4 modules (documents, farmer, farmer_info, district) that represent tables in the database.
We need the relationships(foreign keys) between tables in the database to be created automatically after creating relationship between modules in SuiteCRM. This is not happening after creating relationship between modules in SuiteCRM.
Example: We have farmer field in contract module (as if farmer (fk) column in contract table). We’ve created the relationship between contract and farmer modules. When sending the test API request to the contract we see all the data and we get the result of related farmer data in this form:
*‘company_farmer_company_contract’ - this represents the pivot table created by SuiteCRM in database.
The problems are:
- We have to create links per every contract each time (every row). But we want the SuiteCRM automatically create a ‘link’ between every related modules.
- When we want to create a connection in form of foreign keys in those tables like farmer.id is a FK in contract.farmer_id it appears that SuiteCRM creates tables (they are empty when created so we fill them with migrated data) where the ID columns, that are created automatically by SuiteCRM, are CHAR data type. That means we have to change them manually in database in every table and even after that we get errors.
Thanks in advance