use of mbg.test.ib2j5.generated.miscellaneous.model.Anotherawfultable in project generator by mybatis.
the class MiscellaneousTest method testAnotherAwfulTableInsert.
@Test
public void testAnotherAwfulTableInsert() {
SqlMapClient sqlMap = getSqlMapClient();
try {
Anotherawfultable record = new Anotherawfultable();
record.setId(5);
record.setSelect("select");
record.setInsert("insert");
sqlMap.insert("MBGTEST_ANOTHERAWFULTABLE.insert", record);
Anotherawfultable key = new Anotherawfultable();
key.setId(5);
Anotherawfultable returnedRecord = (Anotherawfultable) sqlMap.queryForObject("MBGTEST_ANOTHERAWFULTABLE.selectByPrimaryKey", key);
assertEquals(record.getId(), returnedRecord.getId());
assertEquals(record.getSelect(), returnedRecord.getSelect());
assertEquals(record.getInsert(), returnedRecord.getInsert());
assertEquals(record.getUpdate(), returnedRecord.getUpdate());
assertEquals(record.getDelete(), returnedRecord.getDelete());
} catch (SQLException e) {
fail(e.getMessage());
}
}
Aggregations