use of org.apache.cayenne.testdo.numeric_types.TinyintTestEntity in project cayenne by apache.
the class NumericTypesIT method testTinyintInInsert.
@Test
public void testTinyintInInsert() throws Exception {
TinyintTestEntity object = (TinyintTestEntity) (context).newObject("TinyintTestEntity");
object.setTinyintCol((byte) 1);
context.commitChanges();
}
use of org.apache.cayenne.testdo.numeric_types.TinyintTestEntity in project cayenne by apache.
the class NumericTypesIT method testTinyintInQualifier.
@Test
public void testTinyintInQualifier() throws Exception {
createTinyintDataSet();
// test
Expression qual = ExpressionFactory.matchExp("tinyintCol", (byte) 81);
List<?> objects = context.performQuery(new SelectQuery<>(TinyintTestEntity.class, qual));
assertEquals(1, objects.size());
TinyintTestEntity object = (TinyintTestEntity) objects.get(0);
assertEquals(new Byte((byte) 81), object.getTinyintCol());
}
Aggregations