Skip to content

[RFC] Collection Field Type #715

@dantleech

Description

@dantleech

I wonder if it would be possible to create a field type which would map a collection of child nodes to the property.

$image1 = new Image();
// ...
$geolocation1 = new Geolocation();
// ...
$page = new Page();
$page->title = "My Homepage";
$page->images = [ $image1, $image2 ];
$page->geolocations = [ $gelolocation1, $geolocation2, ... ];

The difference between this and the @Children mapping is that these children would be directly related to the property, and stored in PHPCR as follows:

my-page/
    title: My Homepage
    some-ns:image-0/
        ...
    some-ns:image-1/
        ...

    some-ns:geolocation-0/
        ...
    some-ns:geolocation-1/
        ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions