Files
ebean/src/test/java/org/tests/batchload/TestSecondQueryNoRows.java
T
Rob BygraveandGitHub 94591954b3 1476 - Query plan capture, initial wip capturing bind params (#1477)
* 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
2018-12-19 16:04:28 +13:00

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);
}
}