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
34 lines
677 B
Java
34 lines
677 B
Java
package org.tests.batchload;
|
|
|
|
import io.ebean.BaseTestCase;
|
|
import io.ebean.Ebean;
|
|
import org.junit.Test;
|
|
import org.tests.model.basic.Customer;
|
|
import org.tests.model.basic.Order;
|
|
import org.tests.model.basic.Order.Status;
|
|
import org.tests.model.basic.ResetBasicData;
|
|
|
|
public class TestEmptyManyLazyLoad extends BaseTestCase {
|
|
|
|
@Test
|
|
public void test() {
|
|
|
|
ResetBasicData.reset();
|
|
|
|
Customer c = Ebean.find(Customer.class).findList().get(0);
|
|
|
|
Order o = new Order();
|
|
o.setCustomer(c);
|
|
o.setStatus(Status.NEW);
|
|
|
|
Ebean.save(o);
|
|
|
|
Order o2 = Ebean.find(Order.class, o.getId());
|
|
o2.getDetails().size();
|
|
|
|
// cleanup
|
|
Ebean.delete(o2);
|
|
|
|
}
|
|
}
|