SQL : Put schema constraints into bean model

Bug #623994 reported by Timo Westkämper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Querydsl
Fix Released
Medium
Unassigned

Bug Description

 Put schema constraints into bean model in annotation form (nullability, size, regex constraints ?!?)

Changed in querydsl:
importance: Undecided → Medium
Changed in querydsl:
milestone: none → 2.0
summary: - SQL: Put schema constraints into bean model
+ SQL : Put schema constraints into bean model
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

The annotation set to be used would be the annoations for Bean Validation : http://relation.to/Bloggers/BeanValidationSneakPeekPartI

Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Here is a mapping from the DatabaseMetaData getColumns values

COLUMN_SIZE -> @Max(n)
NULLABLE columnNoNulls -> @NotNull

Revision history for this message
Timo Westkämper (timo-westkamper) wrote :
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Currently Max and NotNull are used. Feel free to suggest additions :

@Table("EMPLOYEE")
public class Employee {

    @Column("DATEFIELD")
    private java.sql.Date datefield;

    @Max(50)
    @Column("FIRSTNAME")
    private String firstname;

    @NotNull
    @Column("ID")
    private Integer id;

...

}

Changed in querydsl:
status: New → Fix Committed
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Released in 1.9.4

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.