[forge-dev] Add means of defining constraint for Length on String
George Gastaldi
ggastald at redhat.com
Fri Sep 13 11:19:10 EDT 2013
Apparently there wasn't a JIRA for this.
Robb, I don't have this information that it was planned in the roadmap,
do you have any information about the version that it should have been
fixed?
On 09/13/2013 12:13 PM, Robb Greathouse wrote:
> I was told that it was on the roadmap and was going to be added.
> Don't know if it happened.
>
>
> Robb Greathouse
> Partner Enablement
> Middleware Business Unit
> JBoss, a Division of Red Hat
> cellphone 505-507-4906
>
> ------------------------------------------------------------------------
>
> 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 :
>
> @Column
> @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.
>
> Thanks
>
>
>
>
>
> 2012/12/29 George Gastaldi <gegastaldi at icloud.com
> <mailto:gegastaldi at 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 at jboss.com <mailto:robb.greathouse at 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 <tel:505-507-4906>
> >
>
> _______________________________________________
> forge-dev mailing list
> forge-dev at lists.jboss.org <mailto:forge-dev at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/forge-dev
>
>
>
>
> --
> Antonio Goncalves
> Software architect and Java Champion
>
> Web site <http://www.antoniogoncalves.org/> | Twitter
> <http://twitter.com/agoncal> | LinkedIn
> <http://www.linkedin.com/in/agoncal> | Paris JUG
> <http://www.parisjug.org/> | Devoxx France <http://www.devoxx.fr/>
>
>
>
>
> _______________________________________________
> forge-dev mailing list
> forge-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/forge-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20130913/4e590f84/attachment.html
More information about the forge-dev
mailing list