Note that there are some explanatory texts on larger screens.

plurals
  1. POHow does ColdFusion ORM deal with changes made outside of ORM
    text
    copied!<p>I've just begun learning about ColdFusion ORM and persistent cfcs and how it can improve application performance. I'm still working on gaining a full understanding before trying to implement anything on my own sites, but there's one question I can't seem to find the answer to anywhere.</p> <p>I understand that much of the performance increase comes from batching database CRUD in a single transaction at the end of a page, and from intelligent caching of select statements. Regarding the latter, how does this caching work and, more specifically, how does it deal with changes made outside of the ColdFusion application.</p> <p>For instance, suppose I have a users table that looks like the following:</p> <p><B>Name &nbsp; Hair</B></p> <p>Nick &nbsp;&nbsp;&nbsp;&nbsp; Brown</p> <p>John &nbsp;&nbsp;&nbsp; Blonde</p> <p>Now suppose that I run a simple update query through PL/SQL Developer to update John's hair color to black. Now...</p> <ul> <li>What will happen the next time a page tries to list John's hair color?</li> <li>Assuming the hair color is still showing as blonde because it was cached, how can one flush that cache?</li> <li>Assuming the hair color is still cached as blonde, what happens if I change John's name to Jonathon using CF ORM? Will it overwrite the hair color back to blonde when it updates the row?</li> <li>Similarly, what if I try to update the hair color to green using CF ORM? Will CF check and notice that it's cached value (blonde) is no longer the current value (black) and give some kind of feedback?</li> </ul> <p>Just as importantly (maybe more importantly), what are the answers to those same questions if a CFQuery is used to update John's hair color instead of an external program. In other words, can CFQuery be safely used on an ORM managed table?</p> <p>I tried reviewing CF's documentation, Hibernate's documentation, and a variety of online blogs, but information on ORM's caching and how it interacts with other database manipulation methods (CFQuery, PL/SQL Developer, etc) is lacking. Any help would be appreciated.</p> <p>Thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload