2014.10.16 Programmer's Notes

The next thing I want to work on is properly flushing the cache
after a delete of an object.  Right now, only the object itself
is forgotten by the cache.  I want to rework the "forget" code
such that it checks for sub-objects of the forgotten object in
the cache and forgets about those instances as well.  That should
take care of synchronizing with the deletion of sub-objects by
the stored procedures in the database, and will make it easier
to code the eventual syncsets between client nodes.  (What, you think
I was going to leave everything in pure client-server mode forever?
Perish the thought -- I've done plenty of work on distributed systems
synchronization over the years; I just haven't gotten that far with
the code yet.)

After that, I think I need to do some changes to the engine and to
the delete code.  In the engine, I need to add a Table verb "ReferencesSubObjects"
that checks all the relationships (non-inherited) of an object/table for
Lookup relationships that reference sub-objects (Components, Children,
or Details.)  If this verb returns "yes", then the delete stored proc
needs to clear those references after it's audited the delete record
to the history.  I'll also need a verb for the Relationships that
checks "IsSubObjectReference" so I know which relationships to clear
in the delete code.  When such relationships exist, they are always
nullable because the Container/Parent/Master has to be created in the
database before the Components/Children/Details, with the reference
being set later by an Update of the object (e.g. the PrimaryIndex
reference of a Table.)  The only reason I can delete a CFDbTest 2.0
Table object is that it's incomplete and doesn't actually make a PrimaryIndex
reference like a CFBam 2.0 Table does (this was intentional because I
knew I couldn't handle it yet.)

Once that's done, I'll give it a hard think as to whether I want to
release those two changes as a Service Pack 4, or whether I want to include
the Chain implementation in Service Pack 4.  I have to admit I'm doing my
best to postpone working on Chains because I know how difficult they are
and how much work they're going to be.  I'm thinking I'll probably release
the Chain support as Service Pack 5 instead of delaying Service Pack 4 -- there
are too many supportable cases where the two changes I've outlined would fix
problems that I *know* exist in the manufactured code.  I'd rather people get
those fixes early than delay for a few weeks or months to implement the Chains.
(Yes, I really do expect Chain support to take that long.  It's an ugly beast
to deal with when coding manually, never mind trying to automate the process.)