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

Reply via email to