=== modified file 'src/com/goldencode/p2j/persist/orm/BaseRecord.java'
--- old/src/com/goldencode/p2j/persist/orm/BaseRecord.java	2025-09-01 14:26:39 +0000
+++ new/src/com/goldencode/p2j/persist/orm/BaseRecord.java	2026-05-07 12:39:49 +0000
@@ -2,7 +2,7 @@
 ** Module   : BaseRecord.java
 ** Abstract : The abstract base class for all business data model object classes.
 **
-** Copyright (c) 2019-2025, Golden Code Development Corporation.
+** Copyright (c) 2019-2026, Golden Code Development Corporation.
 **
 ** -#- -I- --Date-- ---------------------------------------Description---------------------------------------
 ** 001 ECF 20191001 Created initial version with basic data and accessors.
@@ -58,7 +58,8 @@
 **     AL2 20231102 Added computeIndexForHydrator for lazy hydration. Reworked getDatum.
 **     AL2 20231106 Set liveProps only when actively doing lazy hydration. Compute cardinality separately.
 **     AL2 20231218 Fixed lazy hydration to honor refreshing. Fixed getUnhydratedFields to honor incomplete.
-** 017 AP  20250807 Adapted equalData for lazy hydration. 
+**     AP  20250807 Adapted equalData for lazy hydration. 
+**     TG  20260407 Added clearHydrator method. NPE fix on setAllLiveProps.
 */
 
 /*
@@ -1021,6 +1022,10 @@
    
    protected void setAllLiveProps()
    {
+      if (liveProps == null)
+      {
+         return;
+      }
       for (int i = 0; i < data.length; i++)
       {
          liveProps.set(i);
@@ -1262,6 +1267,14 @@
          unhydratedIndex = unhydratedFields.nextSetBit(unhydratedIndex + 1);
       }
    }
+
+   /**
+    * Set the {@link BaseRecord#hydrator} to {@code #Null}.
+    */
+   public void clearHydrator()
+   {
+      hydrator = null;
+   }
    
    /**
     * Get the static record metadata for the concrete subclass.

=== modified file 'src/com/goldencode/p2j/persist/orm/SQLQuery.java'
--- old/src/com/goldencode/p2j/persist/orm/SQLQuery.java	2025-09-01 13:52:32 +0000
+++ new/src/com/goldencode/p2j/persist/orm/SQLQuery.java	2026-05-07 12:40:07 +0000
@@ -2,7 +2,7 @@
 ** Module   : SQLQuery.java
 ** Abstract : Object which performs an SQL query and processes the results.
 **
-** Copyright (c) 2019-2025, Golden Code Development Corporation.
+** Copyright (c) 2019-2026, Golden Code Development Corporation.
 **
 ** -#- -I- --Date-- ---------------------------------------Description---------------------------------------
 ** 001 ECF 20191001 Created initial version with stubbed methods.
@@ -73,12 +73,13 @@
 ** 022 LS  20250714 Do not reload an INCOMPLETE record in 'hydrateRecordImpl' if the needed fields are
 **                  already set.
 ** 023 ECF 20230803 Prototyped lazy hydration.
-** 024 AL2 20231211 Refactor to use new getters for row structure count and DMO iface. 
+**     AL2 20231211 Refactor to use new getters for row structure count and DMO iface. 
 **     AL2 20231102 Reworked hydration to better support lazy with partial. 
 **     AL2 20231103 Added JMX to track lazy hydration.
 **     AL2 20231101 Allow the some result-sets to be owned by the session to make it live longer and honor
 **                  lazy hydration.
 **     AL2 20231214 Fixed lazy hydration to work with partial hydration as well. Fixed rebase mismatches.
+**     TG  20260407 Added updateIncompleteState which updates cached INCOMPLETE dmo.
 */
 
 /*
@@ -1127,9 +1128,23 @@
                NEW_LAZY_RECORD.update(1);
                session.associate(r);
             }
+            else
+            {
+               updateIncompleteState(r, rowStructure, session);
+            }
             
             return r;
          }
+         else if (cachedRec != null)
+         {
+            // We are not in lazy mode, but in Session cache we have a DMO which was not hydrated yet,
+            // or we have an INCOMPLETE DMO that needs further hydration.
+            rowStructure.hydrate(session, resultSet, rsOffset, r);
+
+            updateIncompleteState(r, rowStructure, session);
+
+            return r;
+         }
 
          NON_LAZY_HYDRATE_RECORD.update(1);
       }
@@ -1162,7 +1177,8 @@
          
          // cache the hydrated record
          session.associate(r);
-      }      catch (ReflectiveOperationException exc)
+      }
+      catch (ReflectiveOperationException exc)
       {
          throw new PersistenceException("Error creating record", exc);
       }
@@ -1181,7 +1197,34 @@
       
       return r;
    }
-   
+
+   /**
+    * Check the {@link BaseRecord} is it should still be marked as INCOMPLETE or not.
+    * If it still INCOMPLETE, update {@link BaseRecord#readFields} to match with the current
+    * {@link RowStructure}.
+    *
+    * @param   r
+    *          Record to check
+    * @param   rowStructure
+    *          Used if is INCOMPLETE and to get the loaded fields.
+    * @param   session
+    *          Current Session
+    */
+   private static void updateIncompleteState(BaseRecord r, RowStructure rowStructure, Session session)
+   {
+      if (r.checkState(DmoState.INCOMPLETE))
+      {
+         if (!rowStructure.isIncomplete())
+         {
+            r.updateState(session, DmoState.INCOMPLETE, false);
+         }
+         else if (r._getReadFields() != null)
+         {
+            r._getReadFields().or(rowStructure.getLoadedFields());
+         }
+      }
+   }
+
    /**
     * Closes this object by releasing all acquired resources.
     */

