magento2
magento2 copied to clipboard
M2 fails when saving a model on a table with multi-column primary key
Steps to reproduce
- Reference a ressource model to a database table that has a multi-column primary key
- Create a model object in magento and try to save it:
public function createModelEntry(\vendor\Module\Api\Data\MyModelInterface $modelData) { $modelData->save(); }
Expected result
- Model object should be saved to the database table or an exception should be thrown that multi-column primary keys are not supported
Actual result
- Saving the model object continues without exception but data is not saved to the table. Info: When violating sql constraints an exception is thrown.
@antonkril can you look into it?
@Pinimichu Please, provide the used version. If the problem is actual for a specific tag, please, specify it and be sure that the latest update was used.
According to contributor guide, tickets without response for two weeks should be closed. Please feel free to reopen if it's needed.