君子博学而日参省乎己 则知明而行无过矣

博客园 首页 新随笔 联系 订阅 管理

2012年3月8日 #

摘要: I have a very simple MySql table with an auto increament primary key,1CREATE TABLE sampah2(3id INT(10) NOT NULL AUTO_INCREMENT,4name VARCHAR(30),5PRIMARY KEY (id)6)my question is, how can i get my object’s generated primary key if i insert a new object to table “sampah”?The answer is actually quite 阅读全文
posted @ 2012-03-08 23:52 刺猬的温驯 阅读(297) 评论(0) 推荐(0) 编辑

摘要: One of the latest MyBatis feature is the ability to use Annotations or XML to do One-to-One or One-to-Many queries. Let’s start with an example, as usual im using PostgreSQL, Netbeans 6.9 and MyBatis 3.0.2.First is a simple database with 2 different tables,CREATE DATABASE test CREATE TABLE master .. 阅读全文
posted @ 2012-03-08 23:46 刺猬的温驯 阅读(948) 评论(0) 推荐(0) 编辑