首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

级联检询的配置

2012-08-26 
级联查询的配置ibatis 级联查询的配置:?xml version1.0 encodingUTF-8?!DOCTYPE sqlMap PUBLIC

级联查询的配置

ibatis 级联查询的配置:

<?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="login"><resultMap id="login-result"><result property="email" column="email" /><result property="password" column="password" /><result property="loginID" column="login_ID" /><result property="user" column="user_ID" select="login.queryUserByID" /><result property="lastLoginTime" column="lastLoginTime" /><result property="lastLoginIP" column="lastLoginIP" /></resultMap><select id="validateLogin" parameterresultMap="login-result">select email,password,login_ID,user_ID,lastLoginTime,lastLoginIPfrom loginwhere email = #email# and password = #password#;</select><resultMap id="user-result"><result property="phone" column="phone"/><result property="name" column="name"/><result property="qq" column="qq"/><result property="address" column="address"/><result property="level" column="level"/><result property="point" column="point"/><result property="userID" column="User_ID"/><result property="activation" column="activation"/><result property="role" select="login.queryRoleByUser"/></resultMap><select id="queryUserByID" parameterparameterresultClass="set">select Role_IDfrom roleuser where User_ID = #userID#</select></sqlMap>

?

热点排行