You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Dianne Richards (JIRA)" <ji...@apache.org> on 2010/02/09 17:43:27 UTC

[jira] Updated: (OPENJPA-1107) Provide TraversableResolver for use with Bean Validation Factory

     [ https://issues.apache.org/jira/browse/OPENJPA-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dianne Richards updated OPENJPA-1107:
-------------------------------------

    Attachment: test_patch.txt

Providing a patch containing some tests for this function.

> Provide TraversableResolver for use with Bean Validation Factory
> ----------------------------------------------------------------
>
>                 Key: OPENJPA-1107
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1107
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: validation
>    Affects Versions: 2.0.0-M2
>            Reporter: Jeremy Bauer
>            Assignee: Donald Woods
>             Fix For: 2.0.0-M3
>
>         Attachments: test_patch.txt
>
>
> Per the JPA 2.0 specification, a TraversableResolver must be provided in order to meet the validation criteria outlined in section 3.6.1.2 of the 3/13/09 draft.
> The validator instance that is used for automatic validation upon lifecycle events must use a TraversableResolver
> that has the following behavior:
> • Attributes that have not been loaded must not be loaded.
> • Entity associations (single-valued or multi-valued) must not be traversed.
> These requirements guarantee that no unloaded attribute or association will be loaded by side effect and
> that no entity will be validated more than once.
> Embeddable attributes must be validated only if the Valid annotation has been specified on them.
> It is the responsibility of the persistence provider to pass an instance implementing the javax.validation.
> TraversableResolver interface to the Bean Validation provider by calling ValidatorFactory.
> usingContext().traversableResolver(

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.