[forge-dev] Add means of defining constraint for Length on String
Antonio Goncalves
antonio.mailing at gmail.com
Fri Sep 13 11:16:33 EDT 2013
Hi George,
Unfortunately I will never have time to do a pull request (working on my
JavaOne conferences). This issue is not critical, I can do things
differently for my demo... but I've created a JIRA so we don't forget it
for Forge 2 (https://issues.jboss.org/browse/FORGE-1200)
Thanks
2013/9/13 George Gastaldi <ggastald at redhat.com>
> However, pull-requests are more than welcomed! :)
>
>
> On 09/13/2013 11:58 AM, George Gastaldi wrote:
>
> That could be solved by introducing a length parameter in the "field
> string" plugin.
> However, since this is a new feature and Forge 1 is feature-frozen, this
> will be addressed in Forge 2, unless it's a critical feature.
>
> Best Regards,
>
> George Gastaldi
>
> On 09/13/2013 11:52 AM, Antonio Goncalves wrote:
>
> 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>
>
>> 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>
>> 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
>> 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 listforge-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/forge-dev
>
>
>
>
> _______________________________________________
> forge-dev mailing listforge-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/forge-dev
>
>
>
> _______________________________________________
> forge-dev mailing list
> 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/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20130913/4ddf6903/attachment.html
More information about the forge-dev
mailing list