ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vicky yes <afzaa...@hotmail.com>
Subject ibator don't know about Domains data types of PostgresDb ?
Date Sun, 18 Jan 2009 15:04:04 GMT

Hi ,
every body i have a problem with ibator can help me any body my problem is
this ,

my table in postgresDb like this..

CREATE TABLE "public"."partytype" (
  "partytype_id" "public"."code" NOT NULL, 
  "name" "public"."lname", 
  "description" "public"."description", 
  "name_i18n" VARCHAR(128)[], 
  "description_i18n" TEXT[], 
  "last_update" "public"."last_update", 
  CONSTRAINT "pk_partytype" PRIMARY KEY("partytype_id")
) WITHOUT OIDS;

CREATE UNIQUE INDEX "partytype_pk" ON "public"."partytype"
  USING btree ("partytype_id");

public.code,public.lname,public.description,public.last_update are my
domains that contain a different data types.

so when i generate code with ibator that domains have in table ibator
genenrate me like this , jdbcType="OTHER" 

I show u this sqlMap.xml file .

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-2.dtd" >
<sqlMap namespace="partytype" >
  <resultMap id="ibatorgenerated_BaseResultMap"
class="com.ibator.model.Partytype" >
    <!--
      WARNING - This element is automatically generated by Apache iBATIS
ibator, do not modify.
      This element was generated on Sat Jan 17 11:35:30 CET 2009.
    -->
    <result column="partytype_id" property="partytype_id" jdbcType="OTHER"
/>
    <result column="name" property="name" jdbcType="OTHER" />
    <result column="description" property="description" jdbcType="OTHER" />
    <result column="name_i18n" property="name_i18n" jdbcType="ARRAY" />
    <result column="description_i18n" property="description_i18n"
jdbcType="ARRAY" />
    <result column="last_update" property="last_update" jdbcType="OTHER" />
  </resultMap>
  <sql id="ibatorgenerated_Example_Where_Clause" >
    <!--
      WARNING - This element is automatically generated by Apache iBATIS
ibator, do not modify.
      This element was generated on Sat Jan 17 11:35:30 CET 2009.
    -->
    <iterate property="oredCriteria" conjunction="or" prepend="where"
removeFirstPrepend="iterate" >
      <isEqual property="oredCriteria[].valid" compareValue="true" >
        (
        <iterate prepend="and"
property="oredCriteria[].criteriaWithoutValue" conjunction="and" >
          $oredCriteria[].criteriaWithoutValue[]$
        </iterate>
        <iterate prepend="and"
property="oredCriteria[].criteriaWithSingleValue" conjunction="and" >
          $oredCriteria[].criteriaWithSingleValue[].condition$
            #oredCriteria[].criteriaWithSingleValue[].value#
        </iterate>
        <iterate prepend="and"
property="oredCriteria[].criteriaWithListValue" conjunction="and" >
          $oredCriteria[].criteriaWithListValue[].condition$
          <iterate property="oredCriteria[].criteriaWithListValue[].values"
open="(" close=")" conjunction="," >
            #oredCriteria[].criteriaWithListValue[].values[]#
          </iterate>
        </iterate>
        <iterate prepend="and"
property="oredCriteria[].criteriaWithBetweenValue" conjunction="and" >
          $oredCriteria[].criteriaWithBetweenValue[].condition$
          #oredCriteria[].criteriaWithBetweenValue[].values[0]# and
          #oredCriteria[].criteriaWithBetweenValue[].values[1]#
        </iterate>
        )
      </isEqual>
    </iterate>
  </sql>
  <select id="ibatorgenerated_selectByExample"
resultMap="ibatorgenerated_BaseResultMap"
parameterClass="com.ibator.model.PartytypeExample" >
    <!--
      WARNING - This element is automatically generated by Apache iBATIS
ibator, do not modify.
      This element was generated on Sat Jan 17 11:35:30 CET 2009.
    -->
    select partytype_id, name, description, name_i18n, description_i18n,
last_update
    from partytype
    <isParameterPresent >
      <include refid="partytype.ibatorgenerated_Example_Where_Clause" />
      <isNotNull property="orderByClause" >
        order by $orderByClause$
      </isNotNull>
    </isParameterPresent>
  </select>
  <select id="ibatorgenerated_selectByPrimaryKey"
resultMap="ibatorgenerated_BaseResultMap"
parameterClass="com.ibator.model.Partytype" >
    <!--
      WARNING - This element is automatically generated by Apache iBATIS
ibator, do not modify.
      This element was generated on Sat Jan 17 11:35:30 CET 2009.
    -->
    select partytype_id, name, description, name_i18n, description_i18n,
last_update
    from partytype
    where partytype_id = #partytype_id:OTHER#
  </select>
  <delete id="ibatorgenerated_deleteByPrimaryKey"
parameterClass="com.ibator.model.Partytype" >
    <!--
      WARNING - This element is automatically generated by Apache iBATIS
ibator, do not modify.
      This element was generated on Sat Jan 17 11:35:30 CET 2009.
    -->
    delete from partytype
    where partytype_id = #partytype_id:OTHER#
  </delete>
  <delete id="ibatorgenerated_deleteByExample"
parameterClass="com.ibator.model.PartytypeExample" >
    <!--
      WARNING - This element is automatically generated by Apache iBATIS
ibator, do not modify.
      This element was generated on Sat Jan 17 11:35:30 CET 2009.
    -->
    delete from partytype
    <include refid="partytype.ibatorgenerated_Example_Where_Clause" />
  </delete>
  <insert id="ibatorgenerated_insert"
parameterClass="com.ibator.model.Partytype" >
    <!--
      WARNING - This element is automatically generated by Apache iBATIS
ibator, do not modify.
      This element was generated on Sat Jan 17 11:35:30 CET 2009.
    -->
    insert into partytype (name, description, name_i18n, description_i18n,
last_update)
    values (#name:OTHER#, #description:OTHER#, #name_i18n:ARRAY#,
#description_i18n:ARRAY#,
      #last_update:OTHER#)
    <selectKey resultClass="java.lang.Object" keyProperty="partytype_id" >
      SELECT LAST_INSERT_ID()
    </selectKey>
  </insert>
  <insert id="ibatorgenerated_insertSelective"
parameterClass="com.ibator.model.Partytype" >
    <!--
      WARNING - This element is automatically generated by Apache iBATIS
ibator, do not modify.
      This element was generated on Sat Jan 17 11:35:30 CET 2009.
    -->
    insert into partytype
    <dynamic prepend="(" >
      <isNotNull prepend="," property="name" >
        name
      </isNotNull>
      <isNotNull prepend="," property="description" >
        description
      </isNotNull>
      <isNotNull prepend="," property="name_i18n" >
        name_i18n
      </isNotNull>
      <isNotNull prepend="," property="description_i18n" >
        description_i18n
      </isNotNull>
      <isNotNull prepend="," property="last_update" >
        last_update
      </isNotNull>
      )
    </dynamic>
    values
    <dynamic prepend="(" >
      <isNotNull prepend="," property="name" >
        #name:OTHER#
      </isNotNull>
      <isNotNull prepend="," property="description" >
        #description:OTHER#
      </isNotNull>
      <isNotNull prepend="," property="name_i18n" >
        #name_i18n:ARRAY#
      </isNotNull>
      <isNotNull prepend="," property="description_i18n" >
        #description_i18n:ARRAY#
      </isNotNull>
      <isNotNull prepend="," property="last_update" >
        #last_update:OTHER#
      </isNotNull>
      )
    </dynamic>
    <selectKey resultClass="java.lang.Object" keyProperty="partytype_id" >
      SELECT LAST_INSERT_ID()
    </selectKey>
  </insert>
  <select id="ibatorgenerated_countByExample"
parameterClass="com.ibator.model.PartytypeExample"
resultClass="java.lang.Integer" >
    <!--
      WARNING - This element is automatically generated by Apache iBATIS
ibator, do not modify.
      This element was generated on Sat Jan 17 11:35:30 CET 2009.
    -->
    select count(*) from partytype
    <include refid="partytype.ibatorgenerated_Example_Where_Clause" />
  </select>
  <update id="ibatorgenerated_updateByExampleSelective" >
    <!--
      WARNING - This element is automatically generated by Apache iBATIS
ibator, do not modify.
      This element was generated on Sat Jan 17 11:35:30 CET 2009.
    -->
    update partytype
    <dynamic prepend="set" >
      <isNotNull prepend="," property="record.partytype_id" >
        partytype_id = #record.partytype_id:OTHER#
      </isNotNull>
      <isNotNull prepend="," property="record.name" >
        name = #record.name:OTHER#
      </isNotNull>
      <isNotNull prepend="," property="record.description" >
        description = #record.description:OTHER#
      </isNotNull>
      <isNotNull prepend="," property="record.name_i18n" >
        name_i18n = #record.name_i18n:ARRAY#
      </isNotNull>
      <isNotNull prepend="," property="record.description_i18n" >
        description_i18n = #record.description_i18n:ARRAY#
      </isNotNull>
      <isNotNull prepend="," property="record.last_update" >
        last_update = #record.last_update:OTHER#
      </isNotNull>
    </dynamic>
    <isParameterPresent >
      <include refid="partytype.ibatorgenerated_Example_Where_Clause" />
    </isParameterPresent>
  </update>
  <update id="ibatorgenerated_updateByExample" >
    <!--
      WARNING - This element is automatically generated by Apache iBATIS
ibator, do not modify.
      This element was generated on Sat Jan 17 11:35:30 CET 2009.
    -->
    update partytype
    set partytype_id = #record.partytype_id:OTHER#,
      name = #record.name:OTHER#,
      description = #record.description:OTHER#,
      name_i18n = #record.name_i18n:ARRAY#,
      description_i18n = #record.description_i18n:ARRAY#,
      last_update = #record.last_update:OTHER#
    <isParameterPresent >
      <include refid="partytype.ibatorgenerated_Example_Where_Clause" />
    </isParameterPresent>
  </update>
  <update id="ibatorgenerated_updateByPrimaryKeySelective"
parameterClass="com.ibator.model.Partytype" >
    <!--
      WARNING - This element is automatically generated by Apache iBATIS
ibator, do not modify.
      This element was generated on Sat Jan 17 11:35:30 CET 2009.
    -->
    update partytype
    <dynamic prepend="set" >
      <isNotNull prepend="," property="name" >
        name = #name:OTHER#
      </isNotNull>
      <isNotNull prepend="," property="description" >
        description = #description:OTHER#
      </isNotNull>
      <isNotNull prepend="," property="name_i18n" >
        name_i18n = #name_i18n:ARRAY#
      </isNotNull>
      <isNotNull prepend="," property="description_i18n" >
        description_i18n = #description_i18n:ARRAY#
      </isNotNull>
      <isNotNull prepend="," property="last_update" >
        last_update = #last_update:OTHER#
      </isNotNull>
    </dynamic>
    where partytype_id = #partytype_id:OTHER#
  </update>
  <update id="ibatorgenerated_updateByPrimaryKey"
parameterClass="com.ibator.model.Partytype" >
    <!--
      WARNING - This element is automatically generated by Apache iBATIS
ibator, do not modify.
      This element was generated on Sat Jan 17 11:35:30 CET 2009.
    -->
    update partytype
    set name = #name:OTHER#,
      description = #description:OTHER#,
      name_i18n = #name_i18n:ARRAY#,
      description_i18n = #description_i18n:ARRAY#,
      last_update = #last_update:OTHER#
    where partytype_id = #partytype_id:OTHER#
  </update>
</sqlMap>

for u this is a problem of ibator or other one ?

thanks to all.
-- 
View this message in context: http://www.nabble.com/ibator-don%27t-know-about-Domains-data-types-of-PostgresDb---tp21528740p21528740.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message