We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relationship class is defined as
<?php public function __construct( ResourceModel $model, int $type = Relationship::TYPE_TO_ONE, string $recordDataAttribute = null, \stdClass $callbacks = null, int $flags = Relationship::FLAG_DEFAULT )
So data can be fetched/manipulated using $recordDataAttribute or $callbacks object
$recordDataAttribute
$callbacks
Currently, when a Resource is parsed using parseFromRecord($record) it will:
Resource
parseFromRecord($record)
On the other hand when inserting new resources using handlePost
TYPE_TO_ONE
TYPE_TO_MANY
Should we have similar behaviour for post ?
The text was updated successfully, but these errors were encountered:
@alkallio
Sorry, something went wrong.
No branches or pull requests
Relationship class is defined as
So data can be fetched/manipulated using
$recordDataAttribute
or$callbacks
objectCurrently, when a
Resource
is parsed usingparseFromRecord($record)
it will:$recordDataAttribute
is defined, and that property is defined in given recordOn the other hand when inserting new resources using handlePost
TYPE_TO_ONE
attribute will be injected to inserted recordTYPE_TO_MANY
it will use POST callback to insert the data after the record is created (it will also throw an exception if POST is not defined)Should we have similar behaviour for post ?
$recordDataAttribute
, both forTYPE_TO_ONE
andTYPE_TO_MANY
, it will inject attribute to inserted recordThe text was updated successfully, but these errors were encountered: