Skip to content

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

Closed
@Pinimichu

Description

@Pinimichu

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions