doctrine / doctrine/phpcr-odm

Support nested associative arrays

Open
#417 46 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
PHP
Stars
181
Forks
102
PR merge metrics
No merged PRs in 30d

Description

It should be possible to have an array type which automatically creates a structure, e.g

``` php
class Site {
/**
* @PHPCR\AssocArray()
*/
protected $preferences;
}
```

Then automatically map that to a PHPCR structure:

```
/site
preferences/
- jcr:primaryType = phpcr:associative_array
- key1 = value
key2/
- key3: = value
- key4: = value
key5/
```

Contributor guide

Open the contributing guide

Research direction

The issue names no implementation files or tests. Start by tracing how the Site::$preferences example would be mapped to the shown PHPCR structure, and consider the work done when nested associative arrays are persisted with the requested structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.