You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2007/08/22 08:46:33 UTC

[jira] Commented: (STR-1947) how to align field maxlenths with JDBC source

    [ https://issues.apache.org/struts/browse/STR-1947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41980 ] 

Paul Benedict commented on STR-1947:
------------------------------------

This could be done with post-processing:
https://issues.apache.org/struts/browse/STR-3085

Right now only the main Struts configuration can be handled. But there's an upcoming Validator 1.4 release, and if you can think of a way to modify Validator (or the plugin), you can get what you want.

> how to align field maxlenths with JDBC source
> ---------------------------------------------
>
>                 Key: STR-1947
>                 URL: https://issues.apache.org/struts/browse/STR-1947
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1.0
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Ralf Hauser
>            Assignee: Struts Developers
>            Priority: Minor
>
> in http://www.manning-source.com/books/husted/husted_ch12.pdf on p370, Ted
> rightfully says that one disadvantage of using the valiator.xml is that there is
> now yet another file that needs to be kept synchronized.
> With  http://sourceforge.net/projects/fmpp and asm-dumpfield as per
> http://sourceforge.net/mailarchive/message.php?msg_id=6152001, I was able to
> automate this all in a single place (i.e. page markup, the ActionForm, and the
> Validator and Struts configuration).
> The alignment of SQL field names AND lengths is yet a similar problem.
> Were mysqldump working as specified (http://bugs.mysql.com/bug.php?id=1530), my
> fmpp could do that too and generate a SQLConst.java file that would prevent my
> sql queries suffering from time-consuming field name typos, etc.
> Similarly, such sql-schema output could also be used to extract maximum field
> lengths and data types for validation.xml. (especially since for example MySQL
> is very much in need for maxlength validation - http://lists.mysql.com/java/6889)
> Suggestions:
> 1) as per Ted's chapter, it would be useful to have a "Pro&Con" or "When to best
> use the validator" section in dev_validator.html
> 2) add a ToDo section to the chapter listing the need for a mechanism to easily
> align maxlength of SQL and the struts validator (see also
> http://bugs.mysql.com/bug.php?id=1307) - or do you already have a solution for that?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.