magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

M2 fails when saving a model on a table with multi-column primary key

Open Pinimichu opened this issue 10 years ago • 3 comments

Steps to reproduce

  1. Reference a ressource model to a database table that has a multi-column primary key
  2. Create a model object in magento and try to save it: public function createModelEntry(\vendor\Module\Api\Data\MyModelInterface $modelData) { $modelData->save(); }

Expected result

  1. 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

  1. Saving the model object continues without exception but data is not saved to the table. Info: When violating sql constraints an exception is thrown.

Pinimichu avatar Mar 13 '16 15:03 Pinimichu

@antonkril can you look into it?

piotrekkaminski avatar Jun 14 '16 10:06 piotrekkaminski

@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.

palamar avatar Jun 22 '16 16:06 palamar

According to contributor guide, tickets without response for two weeks should be closed. Please feel free to reopen if it's needed.

palamar avatar Jul 07 '16 15:07 palamar