Skip to content

Copy Service does not works properly for Entities which extends Data Object and implements ExtensibleDataInterface #23386

@swnsma

Description

@swnsma

Summary (*)

There is no way to use Extension Attributes in Copy Service if you are using entity class which extends DataObject

Examples (*)

abstract class AbstractModel extends \Magento\Framework\DataObject

  1. Create Extension Attribute for Quote Address.
  2. Create Extension Attribute for Order.
  3. Try to copy Extension Attribute from Quote Address to Order Extension Attribute with \Magento\Framework\DataObject\Copy.

Detected in magento/inventory#2309

Proposed solution

Change fallback from:

Array -> DataObject -> ExtensibleDataInterface -> AbstractSimpleObject
to
Array -> ExtensibleDataInterface -> DataObject -> AbstractSimpleObject

Metadata

Metadata

Assignees

Labels

Fixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Format is validGate 1 Passed. Automatic verification of issue format passed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions