mirror of https://github.com/apache/openjpa.git
OPENJPA:2379: simplify isLoaded() logic
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1479651 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0d1b15220d
commit
6d313db788
|
@ -53,9 +53,11 @@ public class TestPersistenceUnitUtil extends SingleEMFTestCase{
|
|||
/*
|
||||
* Verifies an entity and its persistent attributes are in the proper
|
||||
* not loaded state.
|
||||
*
|
||||
* This test is retired, because lazy states <em>may</em> be loaded as well.
|
||||
*/
|
||||
public void testNotLoadedLazy() {
|
||||
verifyIsLoadedEagerState(false);
|
||||
// verifyIsLoadedEagerState(false);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -69,9 +71,11 @@ public class TestPersistenceUnitUtil extends SingleEMFTestCase{
|
|||
/*
|
||||
* Verifies an entity and its persistent attributes are in the proper
|
||||
* NOT_LOADED state.
|
||||
*
|
||||
* Note: This test is retired.
|
||||
*/
|
||||
public void testNotLoadedEager() {
|
||||
verifyIsLoadedEagerState(false);
|
||||
// verifyIsLoadedEagerState(false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -233,7 +237,7 @@ public class TestPersistenceUnitUtil extends SingleEMFTestCase{
|
|||
|
||||
ee = em.getReference(EagerEntity.class, ee.getId());
|
||||
assertNotNull(ee);
|
||||
assertEagerLoadState(puu, ee, false);
|
||||
// assertEagerLoadState(puu, ee, false);
|
||||
|
||||
ee.setName("AppEagerName");
|
||||
EagerEmbed emb = createEagerEmbed();
|
||||
|
|
|
@ -197,8 +197,8 @@ public class OpenJPAPersistenceUtil {
|
|||
BitSet loadSet = sm.getLoaded();
|
||||
|
||||
// Simple load state check for the field
|
||||
if (!loadSet.get(fmd.getIndex()))
|
||||
return false;
|
||||
if (loadSet.get(fmd.getIndex()))
|
||||
return true;
|
||||
|
||||
Object field = sm.fetchField(fmd.getIndex(), false);
|
||||
|
||||
|
|
Loading…
Reference in New Issue