-
-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Description
I would like to automatically name a node based on a given prefix then an auto-generated numeric suffix, e.g.:
node1/
foobar-0/
foobar-1/
foobar-2/
This allows children to be mapped and accessed as an array (e.g. @Children(filter=foobar-*).
This is not currently possible with event listeners as, on update, the child node name is required and the generator is invoked before the event is fired.
It would seem better to me to use a custom generator for this purpose. Doctrine allows a mapping for @CustomIdGenerator:
/**
* @Id @Column(type="string") @GeneratedValue(strategy="CUSTOM")
* @CustomIdGenerator(class="stdClass")
*/
public $id;I don't really see why this cannot be a service, but we could at least copy this in the PHPCR-ODM.
Metadata
Metadata
Assignees
Labels
No labels