mirror of
https://github.com/apache/openjpa.git
synced 2025-02-08 02:59:42 +00:00
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
|
* Verifies an entity and its persistent attributes are in the proper
|
||||||
* not loaded state.
|
* not loaded state.
|
||||||
|
*
|
||||||
|
* This test is retired, because lazy states <em>may</em> be loaded as well.
|
||||||
*/
|
*/
|
||||||
public void testNotLoadedLazy() {
|
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
|
* Verifies an entity and its persistent attributes are in the proper
|
||||||
* NOT_LOADED state.
|
* NOT_LOADED state.
|
||||||
|
*
|
||||||
|
* Note: This test is retired.
|
||||||
*/
|
*/
|
||||||
public void testNotLoadedEager() {
|
public void testNotLoadedEager() {
|
||||||
verifyIsLoadedEagerState(false);
|
// verifyIsLoadedEagerState(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -233,7 +237,7 @@ public class TestPersistenceUnitUtil extends SingleEMFTestCase{
|
|||||||
|
|
||||||
ee = em.getReference(EagerEntity.class, ee.getId());
|
ee = em.getReference(EagerEntity.class, ee.getId());
|
||||||
assertNotNull(ee);
|
assertNotNull(ee);
|
||||||
assertEagerLoadState(puu, ee, false);
|
// assertEagerLoadState(puu, ee, false);
|
||||||
|
|
||||||
ee.setName("AppEagerName");
|
ee.setName("AppEagerName");
|
||||||
EagerEmbed emb = createEagerEmbed();
|
EagerEmbed emb = createEagerEmbed();
|
||||||
|
@ -197,8 +197,8 @@ public class OpenJPAPersistenceUtil {
|
|||||||
BitSet loadSet = sm.getLoaded();
|
BitSet loadSet = sm.getLoaded();
|
||||||
|
|
||||||
// Simple load state check for the field
|
// Simple load state check for the field
|
||||||
if (!loadSet.get(fmd.getIndex()))
|
if (loadSet.get(fmd.getIndex()))
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
Object field = sm.fetchField(fmd.getIndex(), false);
|
Object field = sm.fetchField(fmd.getIndex(), false);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user