mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
* 1476 - Query plan capture, initial wip capturing bind params * No effective change - Reset test default db to H2 * #1476 - Query plan capture, initial wip capturing bind params #1477 Update with consumer * #1476 - Query plan capture, initial wip capturing bind params #1477 Update with query plan request * #1476 - Query plan capture, initial wip capturing bind params #1477 Extract interface * #1476 - Query plan capture, initial wip capturing bind params #1477 Extract interface
37 lines
795 B
Java
37 lines
795 B
Java
package org.tests.batchload;
|
|
|
|
import io.ebean.BaseTestCase;
|
|
import io.ebean.Ebean;
|
|
import io.ebean.FetchConfig;
|
|
import org.junit.Test;
|
|
import org.tests.model.basic.Customer;
|
|
import org.tests.model.basic.ResetBasicData;
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
import static org.junit.Assert.assertNotNull;
|
|
|
|
public class TestSecondQueryNoRows extends BaseTestCase {
|
|
|
|
@Test
|
|
public void test() {
|
|
|
|
ResetBasicData.reset();
|
|
|
|
Customer cnew = new Customer();
|
|
cnew.setName("testSecQueryNoRows");
|
|
|
|
Ebean.save(cnew);
|
|
|
|
Customer c = Ebean.find(Customer.class)
|
|
.setAutoTune(false)
|
|
.setId(cnew.getId())
|
|
.fetch("contacts", new FetchConfig().query())
|
|
.findOne();
|
|
|
|
assertNotNull(c);
|
|
assertEquals(0, c.getContacts().size());
|
|
|
|
Ebean.delete(c);
|
|
}
|
|
}
|