openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Bauer (JIRA)" <>
Subject [jira] [Commented] (OPENJPA-1963) bean-validation constraints should be used for generating ddl schemas
Date Wed, 30 Mar 2011 20:21:05 GMT


Jeremy Bauer commented on OPENJPA-1963:

This feature was included under "Ideas explored and not standardized" in an appendix of the
JSR-303/Bean Validation specification and simply wasn't ready for prime time at the time the
spec was published.  OpenJPA could have chosen to implement this feature, but at the risk
of implementing a feature that most likely will be updated and possibly cause backward compatibility
issues in a future version.  It was decided not to implement the feature for that reason.
 My guess is that we'll see this feature become standardized (non-optional) and expanded upon
in the next revisions of the Bean Validation and JPA specifications.

Side note - scanning for these annotations in OpenJPA would be fairly trivial.  Processing
constraints defined in XML will be more difficult.  OpenJPA would need to either do all the
same annotation + constraint XML processing as the Bean Validation provider or tie into whatever
constraint metadata is supplied by the validation API to determine which constraints need
to applied as mapping information.  If we considered adding this feature to a future version
of OpenJPA 2.x.x (based on JPA 2.0 and BV 1.0), my preference would be to require users to
specifically enable it via an option on the configuration and mapping tool.

> bean-validation constraints should be used for generating ddl schemas
> ---------------------------------------------------------------------
>                 Key: OPENJPA-1963
>                 URL:
>             Project: OpenJPA
>          Issue Type: New Feature
>          Components: validation
>    Affects Versions: 2.1.0
>            Reporter: Gerhard Petracek
> the bean-validation spec. contains:
> >Persistence Providers are encouraged to make use of Bean Validation constraint metadata
when generating DDL schemas.
> other jpa2 implementations already support it. it's a really useful feature and might
be a blocker for users who would like to use openjpa2.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message