Cannot determine value type from string"xxxx"

北城以北 提交于 2020-01-10 04:13:04

页面显示时报Cannot determine value type from string “'这类的错误这个时候就要注意了,这种错误绝大多数都是出现在连表查询上面,立刻检查你的mapper.xml

 <resultMap type="ZxChange" id="ZxChangeResult">
        <id     property="id"        column="id"       />
        <result property="assetsId"      column="assets_id"     />
        <result property="changeType"      column="change_type"     />
        <result property="submittedDepartment"      column="submitted_department"     />
        <result property="submitOne"        column="submit_one"        />
        <result property="useDepartment"      column="use_department"     />
        <result property="users"    column="users"   />
        <result property="extend1"      column="extend1"     />
        <result property="extend2"    column="extend2"   />
        <result property="extend3"        column="extend3"        />
        <result property="extend4"        column="extend4"        />
        <result property="extend5"        column="extend5"        />
        <result property="share_time"        column="share_time"        />
            <association property="zxSassetmanagement" javaType="ZxSassetmanagement">
                <id     property="id"        column="id"       />
                <result property="name"      column="name"     />
                <result property="asset_num"      column="asset_num"     />
                <result property="brand"      column="brand"     />
                <result property="assetSpecification"        column="asset_specification"        />
                <result property="number"      column="number"     />
                <result property="type"    column="type"   />
                <result property="units"      column="units"     />
                <result property="supplier"    column="supplier"   />
                <result property="picture"        column="picture"        />
                <result property="price"        column="price"        />
                <result property="purchasing_time"        column="purchasing_time"        />
                <result property="storageTime"        column="storage_time"        />
                <result property="warehousingCampus"        column="warehousing_campus"        />
                <result property="state"        column="state"        />
                <result property="operator"        column="operator"        />
                <result property="location"        column="location"        />
                <result property="campus"        column="campus"        />
                <result property="department"        column="department"        />
                <result property="extend1"        column="e1"        />
                <result property="extend2"        column="e2"        />
                <result property="extend3"        column="e3"        />
                <result property="extend4"        column="e4"        />
                <result property="extend5"        column="e5"        />
            </association>
    </resultMap>

我这里用的association
这里注意相同的字段需要用别名区分

  <result property="extend1"        column="e1"        />
                <result property="extend2"        column="e2"        />
                <result property="extend3"        column="e3"        />
                <result property="extend4"        column="e4"        />
                <result property="extend5"        column="e5"        />

修改过后重启项目报错就会消失了。

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!