Package com.avaje.tests.batchload

Source Code of com.avaje.tests.batchload.TestSecondQueryNoRows

package com.avaje.tests.batchload;

import org.junit.Assert;
import org.junit.Test;

import com.avaje.ebean.BaseTestCase;
import com.avaje.ebean.Ebean;
import com.avaje.ebean.FetchConfig;
import com.avaje.tests.model.basic.Customer;

public class TestSecondQueryNoRows extends BaseTestCase {

  @Test
  public void test() {

    Customer cnew = new Customer();
    cnew.setName("testSecQueryNoRows");

    Ebean.save(cnew);

    Customer c = Ebean.find(Customer.class).setAutofetch(false).setId(cnew.getId())
        .fetch("contacts", new FetchConfig().query()).findUnique();

    Assert.assertNotNull(c);
  }
}
TOP

Related Classes of com.avaje.tests.batchload.TestSecondQueryNoRows

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.