ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: jpetstore: port to UNIX?
Date Sat, 29 Jan 2005 05:03:30 GMT
JPetStore is portable.....MySQL is not.  But you're right, the
solution is to use the SQL in a case sensitive fashion (wacked).

Clinton


On Fri, 28 Jan 2005 19:08:27 -0600 (CST), Ken Simpson <ken@militho.com> wrote:
> Hi - has anyone ported JPetStore 4 to MySQL 4.1.x and Tomcat 5.5.4 under UNIX
> - from whence it came?
> 
> It appears to be a question of using the case on the SQL commands consistently.
> 
> For instance, the MySQL schema creates a database 'JPETSTORE' with upper case,
> and the 'account' table and columns with lower case
> 
>         create table account (
>                 userid varchar(80) not null,
>                 email varchar(80) not null,
>                 firstname varchar(80) not null,
>                 lastname varchar(80) not null,
>                 status varchar(2)  null,
>                 addr1 varchar(80) not null,
>                 addr2 varchar(40) null,
>                 city varchar(80) not  null,
>                 state varchar(80) not null,
>                 zip varchar(20) not null,
>                 country varchar(20) not null,
>                 phone varchar(80) not null,
>                 constraint pk_account primary key (userid)
>         );
> 
> but the sqlmapdao generates a mapping for upper case column names
> 
>         <sqlMap namespace="Account">
>                 <typeAlias alias="account" type="com.ibatis.jpetstore.domain.Account"/>
>                 <resultMap id="accountResult" class="account">
>                 <result property="username" column="USERID"/>
>                 <result property="email" column="EMAIL"/>
>                 <result property="firstName" column="FIRSTNAME"/>
>                 <result property="lastName" column="LASTNAME"/>
>                 <result property="status" column="STATUS"/>
>                 <result property="address1" column="ADDR1"/>
>                 <result property="address2" column="ADDR2"/>
>                 <result property="city" column="CITY"/>
>                 <result property="state" column="STATE"/>
>                 <result property="zip" column="ZIP"/>
>                 <result property="country" column="COUNTRY"/>
>                 <result property="phone" column="PHONE"/>
>                 <result property="languagePreference" column="LANGPREF"/>
>                 <result property="favouriteCategoryId" column="FAVCATEGORY" />
>                 <result property="listOption" column="MYLISTOPT" />
>                 <result property="bannerOption" column="BANNEROPT" />
>                 <result property="bannerName" column="BANNERNAME" />
>         </resultMap>
> 
>         [snip]
> 
> -- Ken
> 
>

Mime
View raw message