Test and Fix for #127 Exception using findIds() with inheritance

SINGLE_TABLE
This commit is contained in:
Rob Bygrave
2014-05-14 21:10:52 +12:00
parent 2ddef37632
commit 9f916998c9
2 changed files with 32 additions and 1 deletions
@@ -0,0 +1,31 @@
package com.avaje.tests.query.other;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import com.avaje.ebean.BaseTestCase;
import com.avaje.ebean.Ebean;
import com.avaje.tests.model.basic.Truck;
import com.avaje.tests.model.basic.Vehicle;
public class TestFindIdsWithInheritance extends BaseTestCase {
@Test
public void testQuery() {
Truck truck = new Truck();
truck.setLicenseNumber("TK123");
Ebean.save(truck);
List<Object> ids = Ebean.find(Vehicle.class).findIds();
Assert.assertNotNull(ids);
Ebean.delete(truck);
}
}