Skip to content

[New Feature] Data target extension for advanced relations - #96

Merged
fashxp merged 26 commits into
pimcore:1.xfrom
woellundwoell:data-target-advanced-relations
Oct 27, 2021
Merged

fashxp merged 26 commits into
pimcore:1.xfrom
woellundwoell:data-target-advanced-relations

Conversation

@woellundwoell

Copy link
Copy Markdown
Contributor
  • DirectDataTarget can handle advanced relations
  • Option "append / merge relation items"

I have read the CLA Document and I hereby sign the CLA

@fashxp

fashxp commented Sep 28, 2021

Copy link
Copy Markdown
Member

I would prefer to have an own data target ManyToManyRelation instead of packing all that functionality into the Direct data target.

Because now all preprocessing is done for all the attributes - and besides that $definition->getFieldDefinition($attributeName); will not always return a field definition, e.g. for object brick attributes and I'm also not sure about localized attributes.

Having an own data target also would allow us to add more specific assigment features in the future, e.g. removeItems

Could you update your PR accordingly?

@woellundwoell

Copy link
Copy Markdown
Contributor Author

We thought it was a good idea to integrate the functionality in the DirectDateTarget. ;)
But OK, we will separate it into a M2MRelationDataTarget and provide a PR.

@woellundwoell

Copy link
Copy Markdown
Contributor Author

The main reason why we decided to implement it this way was that otherwise an extra operator is needed to identify a new TransformationDataType in a "ManyToManyRelationDataTarget".
What Du you think?

@woellundwoell

Copy link
Copy Markdown
Contributor Author

Another possibility would be to move all relation imports into a new DataTarget. So we don't need an extra Operator.
But this would break existing settings for manyToManyRelation imports...

@fashxp fashxp self-assigned this Oct 27, 2021
@fashxp fashxp added this to the v1.3.0 milestone Oct 27, 2021
@fashxp
fashxp merged commit c2b0525 into pimcore:1.x Oct 27, 2021
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants