Created
September 3, 2012 12:18
-
-
Save wendal/3608917 to your computer and use it in GitHub Desktop.
Nutz Chain插入后获取主键
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Trans.exec(new Atom() { | |
public void run() { | |
dao.insert("tp_pet", Chain.make("age", 12)); | |
Sql sql = Sqls.fetchLong("SELECT @@@@IDENTITY"); | |
dao.execute(sql); | |
long petId = sql.getObject(Long.class); | |
System.out.println(petId); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment