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

Paul Benedict updated STR-1947:
-------------------------------

    Fix Version/s: Future
         Assignee:     (was: Struts Developers)

> 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
>            Priority: Minor
>             Fix For: Future
>
>
> 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.

Reply via email to