openjpa-dev mailing list archives

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


Rick Curtis commented on OPENJPA-1963:
23.1.4. Database schema

Hibernate uses Bean Validation constraints to generate an accurate database schema:

    * @NotNull leads to a not null column (unless it conflicts with components or table inheritance)
    * @Size.max leads to a varchar(max) definition for Strings
    * @Min, @Max lead to column checks (like value <= max)
    * @Digits leads to the definition of precision and scale (ever wondered which is which?
It's easy now with @Digits :) )

These constraints can be declared directly on the entity properties or indirectly by using
constraint composition.

> 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