<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
  <channel>
    <title>devin</title>
    <description></description>
    <link>http://devin.javaeye.com</link>
    <language>UTF-8</language>
    <copyright>Copyright 2003-2008, JavaEye.com</copyright>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>JavaEye - 做最棒的软件开发交流社区</generator>
      <item>
        <title>timestamp,datetime数据类型在ibatis中</title>
        <author>devin</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://devin.javaeye.com">devin</a>&nbsp;
          链接：<a href="http://devin.javaeye.com/blog/100883" style="color:red;">http://devin.javaeye.com/blog/100883</a>&nbsp;
          发表时间: 2007年07月14日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          mysql数据库字段为timestamp或datetime类型，在ibatis中不知道怎么配置，我用java.util.Date,和<br />java.sql.Timestamp都试过，都不行，不知道怎么解决，有人知道吗？谢谢！<br /><pre name="code" class="java">	&lt;resultMap id="forumResult" class="forum">
		&lt;result property="forumId" column="forumId" />
		&lt;result property="name" column="name" />
		&lt;result property="description" column="description" />
		&lt;result property="status" column="status" />
		&lt;result property="forumOrder" column="forumOrder" />
		&lt;result property="catId" column="catId" />
		&lt;result property="topicCount" column="topicCount" />
		&lt;result property="postCount" column="postCount" />
		&lt;result property="lastPostId" column="lastPostId" />
		&lt;result property="lastPoster" column="lastPoster" />
		&lt;result property="lastPostDate" column="lastPostDate"/>
		&lt;result property="lastTopicId" column="lastTopicId" />
		
	&lt;/resultMap>

import java.util.Date;

public class Forum {

	private Long forumId;

	private String name;

	private String description;

	private int status;

	private int forumOrder;

	private int catId;

	private int topicCount;

	private int postCount;

	private Long lastPostId;

	private String lastPoster;

	private Date lastPostDate;

	private Long lastTopicId;

CREATE TABLE forum(                                                                    
  forumId bigint(20) unsigned NOT NULL AUTO_INCREMENT,                                     
  name varchar(200) DEFAULT NULL,                                                           
  description varchar(200) DEFAULT NULL,
  status int(2) unsigned DEFAULT NULL,                                                
  forumOrder int(2) unsigned DEFAULT NULL,                                                 
  catId bigint(20) unsigned NOT NULL DEFAULT '0', 
  topicCount bigint(20) unsigned DEFAULT NULL,                                             
  postCount bigint(20) unsigned DEFAULT NULL, 
  lastPostId bigint(20) unsigned DEFAULT NULL,                                          
  lastPoster varchar(255) DEFAULT NULL,                                      
  lastPostDate datetime NOT NULL,  
  lastTopicId bigint(20) unsigned DEFAULT NULL,                                           
  PRIMARY KEY (forumId)                                                             
);
</pre>
          <br/><br/>
          <span style="color:red;">
            <a href="http://devin.javaeye.com/blog/100883#comments" style="color:red;">已有 <strong>8</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">北京: 千橡集团暨校内网诚聘软件研发工程师</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Sat, 14 Jul 2007 02:29:03 +0800</pubDate>
        <link>http://devin.javaeye.com/blog/100883</link>
        <guid>http://devin.javaeye.com/blog/100883</guid>
      </item>
  </channel>
</rss>