[postmodern-devel] Exlcuding slots dao-save
Phil Marneweck
zaries at global.co.za
Fri Nov 6 17:33:09 UTC 2009
Some additional info:
address and company are dao classes as well
The idea is eventually(by tommorrow some time) to be able to update the
child classes as well in the weblocks postmodern store I am working on.
But for now I am just trying to get the main class to update.
I dont know if some thing like updating the child classes from the main
class could have value for postmodern itself.
Any comments or suggestions would be most welcome.
On Fri, 2009-11-06 at 18:33 +0200, Phil Marneweck wrote:
> > 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