[postmodern-devel] Can't redefine slots as columns - why?
    Lucas Hope 
    lucas.r.hope at gmail.com
       
    Tue Mar 10 00:11:25 UTC 2009
    
    
  
Hi there,
I am just getting my feet wet with postmodern.  It looks like I will
be doing some heavy development with it for the next couple of weeks.
Wish me luck!
My (first?) issue is that I want to do something similar to the
following example code.  Here CIRCLE is an in-memory implementation of
a circle, and it is desired to create a DAO object which moves storage
to a postgres backend. (We have lots of circles...)
Pretend CIRCLE has a host of useful functionality attached and I can't
just point all the defmethods to DAO-CIRCLE.
(defclass SHAPE () ())
(defclass CIRCLE (SHAPE)
  (radius))
(defclass DAO-CIRCLE (CIRCLE)
  ((radius :col-type real))
  (:metaclass dao-class))
(dao-table-definition 'dao-circle)
=> ERROR: Slot RADIUS in class #<DAO-CLASS DAO-CIRCLE> is both a
column slot and a regular slot.
Why doesn't this work, and how can I make it work?  It seems like this
is useful functionality to have.  I want the DAO-CIRCLE's radius to be
a column slot.
Cheers,
-Luke
    
    
More information about the postmodern-devel
mailing list