public void test() {
OpenJPAEntityManagerSPI em = emf.createEntityManager();
StoreManager store = ((EntityManagerImpl) em).getBroker().getStoreManager().getDelegate();
FetchPlan fp = getFetchPlan(em);
try {
sql.clear();
if (store instanceof JDBCStoreManager == false) {
fail("StoreManager is not an instanceof JDBCStoreManager");
}
// Set this JDBCFetchPlan property so that we will select FKs for fields that are in the DFG, but not
// included in the current load. If this property isn't set, the FK for eagerOneToOneOwner will not be
// selected.
((JDBCFetchPlan)fp).setIgnoreDfgForFkSelect(true);
// Remove all relationships
fp.removeField(OptSelectEntity.class, "eagerOneToOne");
fp.removeField(OptSelectEntity.class, "eagerOneToOneOwner");
fp.removeField(OptSelectEntity.class, "lazyOneToOne");
fp.removeField(OptSelectEntity.class, "lazyOneToOneOwner");
OptSelectEntity ee1 = em.find(OptSelectEntity.class, e1.getId());
// Make sure our sql has no joins
assertEquals(1, sql.size());