[odb-users] Lazy pointers, yet agian

Данил Патрушев danyapat at yandex.ru
Thu Jan 30 04:46:01 EST 2025


<div>Hi. Revisiting lazy pointers.</div><div> </div><div>The "isNull() - loaded()" truth table that's in the sources and which was already cited on this list a while ago is confusing to me:</div><div> </div><div><div>  // isNull()   loaded()</div><div>  //</div><div>  1.  true       true      NULL pointer to transient object</div><div>  2.  false      true      valid pointer to persistent object</div><div>  3.  true       false     unloaded pointer to persistent object</div><div>  4. false      false     valid pointer to transient object</div><div> </div><div>Based on what I've been able to deduce from reading the sources the lazy pointer consists of two parts - eager part and lazy part.<br />The pointer is considered NULL if both these parts are null, the pointer is considered loaded, if either they are both null, or they<br />are both not null. Which leads to the conclusion that if the pointer is NULL then it is necessarily loaded, and the 3 combination is</div><div>impossible. Am I missing something here?</div></div>


More information about the odb-users mailing list