use of org.nutz.dao.Dao in project nutz by nutzam.
the class RecordDaoTest method test_insert_with_autoinc_id.
@Test
public void test_insert_with_autoinc_id() {
if (dao.meta().isOracle())
return;
Dao dao = ioc.get(Dao.class);
for (int i = 0; i < 10; i++) {
Record re = Record.create();
re.put("*name", "wendal" + R.UU32());
re.put("+id", 0);
re.put(".table", "t_pet");
dao.insert(re);
assertTrue(re.getInt("id") > 0);
}
}
Aggregations