ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cimballi (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Created: (IBATIS-579) Ibator generates invalid sql select statement for columns with spaces in name
Date Wed, 04 Feb 2009 00:35:59 GMT
Ibator generates invalid sql select statement for columns with spaces in name
-----------------------------------------------------------------------------

                 Key: IBATIS-579
                 URL: https://issues.apache.org/jira/browse/IBATIS-579
             Project: iBatis for Java
          Issue Type: Bug
          Components: Tools
    Affects Versions: 2.3.3
         Environment: Used with Microsoft SQL Server 2008
            Reporter: Cimballi


When you tell Ibator to generate the SqlMap file for a table with several columns and one
of them with spaces in the name, you can have a problem (not always) because Ibator trunks
the lines. So, if it trunks in the middle of the column name, it will generates an error at
the execution.
Example :
  <select id="ibatorgenerated_selectByExample" resultMap="ibatorgenerated_BaseResultMap"
parameterClass="xxxxx" >
    <!--
      WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
      This element was generated on Tue Feb 03 19:19:42 GMT-05:00 2009.
    -->
    select RowSort, xxxxx, xxxxx, xxxxx, xxxxx, xxxxx, "xxxxx xxxxx", "xxxxx
      xxxxx", xxxxx
    from xxxxx

I replaced the real names with xxxxx, but you can see that the column name is not on one line,
and at the generation, instead of having 1 space in the middle, it will have 5 or more spaces.

You should add a constraint that write the name of a column on one line only, said differently,
you should not break the line between 2 "".


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


Mime
View raw message