[PHPCR-60] add finalize step to mapping to calculate and validate Created: 09/Mar/12  Updated: 02/Oct/13  Resolved: 02/Oct/13

Status: Resolved
Project: Doctrine PHPCR
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: David Buchmann Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: None


follow up of the discussion in https://github.com/doctrine/phpcr-odm/pull/120

id strategy:

1. if there is an id with a strategy always use that
2. if not and there is a parent and a node name mapping use the parent strategy
3. else use assigned strategy if there is an id field
4. throw an exception that you can't use this document

finalizing the mapping could have the added benefit of combined validation. for example if assigned strategy is parent and name but there is no field mapped to the name, it would tell this is invalid.

think what should be validated at the finalize point.

Comment by Lukas Kahwe [ 04/Oct/12 ]

added a method for final validation here https://github.com/doctrine/phpcr-odm/pull/180

Comment by David Buchmann [ 02/Oct/13 ]

see https://github.com/doctrine/phpcr-odm/pull/351

Generated at Sun Oct 04 05:24:00 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.