Hi all,

I am trying to do exactly the same : generate an entity with a @Column (length=2000). Looks like it is still not possible. Am I right ? If I do :

field string --named title ;
constraint Size --onProperty title --max 2000

I get : 

@Size(max = 2000)
private String title;

Even in Java EE 7, the integration between JPA and Bean Validation hasn't been made. So this doesn't work (i.e. create a column in the DB with 2000 char long). What I would need is :

@Column(length = 2000)
@Size(max = 2000)
private String title;

Looks like it's not doable, but I might be wrong.


2012/12/29 George Gastaldi <gegastaldi@icloud.com>
Change the value in your @Column annotation. Thats JPA Standard.

George Gastaldi

Em 28/12/2012, ās 20:17, Robb Greathouse <robb.greathouse@jboss.com> escreveu:

> Hi,
> Was trying to change the length on String from the VarChar(255).  In Hibernate this can be done by specifying @Length(max=350) (for example.
> However, there is no "constraint Length --onProperty xxx --max 350" available in Forge.
> Using "constraint Max" causes forge to have a conversion error when attempting to insert string data.
> Robb Greathouse
> Partner Enablement
> Middleware Business Unit
> JBoss, a Division of Red Hat
> cellphone 505-507-4906

forge-dev mailing list

Antonio Goncalves 
Software architect and Java Champion

Web site | Twitter | LinkedIn | Paris JUG | Devoxx France