phramework / jsonapi

jsonapi implementation for phramework
https://phramework.github.io/jsonapi/
Apache License 2.0
4 stars 2 forks source link

Relationship behaviour on handlePost #50

Open nohponex opened 7 years ago

nohponex commented 7 years ago

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

Currently, when a Resource is parsed using parseFromRecord($record) it will:

On the other hand when inserting new resources using handlePost

Should we have similar behaviour for post ?

nohponex commented 7 years ago

@alkallio