[postmodern-devel] Exlcuding slots dao-save

Phil Marneweck zaries at global.co.za
Fri Nov 6 16:33:06 UTC 2009


> On Sun, 2009-10-25 at 17:17 +0100, Marijn Haverbeke wrote:
> ..... Do you want extra slots in the
> object that don't correspond to db columns? Then just don't give them
> any Postmodern-specific options, and they will be normal slots.  

This does not seem to be true for me. But then again I could be defining
the class wrong (my knowledge of clos is very limited).

Using update-dao I get :

SIMPLE-ERROR: There is no applicable method for the generic function
#<STANDARD-GENERIC-FUNCTION POSTMODERN:UPDATE-DAO (3)> when called with
arguments (#<EMPLOYEE {1003E00FB1}>).

The class:

(defclass employee ()
  ((id :accessor employee-id     
       :col-type integer)
   (first-name :initarg :first-name
               :accessor first-name
               :col-type string)
   (last-name :initarg :last-name
              :accessor last-name	    
              :col-type string)
   (age :initarg :age
        :accessor age
        :col-type integer)
   (address-id :initarg :address-id
               :accessor employee-address-id
               :col-type integer
               )
   (company-id :initarg :company-id
               :accessor employee-company-id	      
               :col-type integer
               )  
   (address :accessor employee-address
            :initform (make-instance 'address)
            :type address
            )
   (company :accessor employee-company
            :type company
            ) 
   )











More information about the postmodern-devel mailing list