UPDATE-OBJECTS-JOINS — Updates joined slots of objects.Function
objects
A list of instances of a View Class.
slots
* :immediate (default) - refresh join slots with :retrieval :immediate
* :deferred - refresh join slots created with :retrieval :deferred
* :all,t - refresh all join slots regardless of :retrieval
* list of symbols - which explicit slots to refresh
* a single symobl - what slot to refresh
force-p
A Boolean, defaulting to T
.
class-name
A list of instances of a View Class.
max-len
A non-negative integer or NIL
defaulting to
*default-update-objects-max-len*.
When non-nil this is essentially a batch size for the max number of objects
to query from the database at a time. If we need more than max-len
we loop till we have all the objects
Updates from the records of the appropriate database tables the join slots specified by SLOTS in the supplied list of View Class instances OBJECTS. A simpler method of causing a join-slot to be requeried is to set it to unbound, then request it again. This function has efficiency gains where join-objects are shared among the `objects` (querying all join-objects, then attaching them appropriately to each of the `objects`)
(defvar *addresses* (select 'deferred-employee-address :order-by [ea_join aaddressid] :flatp t)) => *ADDRESSES* (slot-boundp (car *addresses*) 'address) => NIL (update-objects-joins *addresses*) => (slot-boundp (car *addresses*) 'address) => T (slot-value (car *addresses*) 'address) => #<ADDRESS {480B0F1D}>