Name

UPDATE-OBJECTS-JOINS — Updates joined slots of objects.Function

Syntax

      update-objects-joins objects &key slots force-p class-name max-len => 

Arguments and Values

objects

A list of instances of a View Class.

slots

A list of slot names in object or T.

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*.

Description

Updates from the records of the appropriate database tables the join slots specified by slots in the supplied list of View Class instances objects. slots when T means that all join slots with :retrieval :immediate are updated. class-name is used to specify the View Class of all instance in objects, when NIL then the class of the first instance in objects is used. force-p when T means that all join slots are updated whereas a value of NIL means that only unbound join slots are updated. max-len when non-nil specifies that update-object-joins may issue multiple database queries with a maximum of max-len instances updated in each query.

Examples

(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}>     
      

Side Effects

The slot values of objects are modified.

Affected by

*default-update-objects-max-len*

Exceptional Situations

Database errors.

See Also

*default-update-objects-max-len*
update-instance-from-records
update-slot-from-record

Notes

None.