[postmodern-devel] Developing with postmodern

Mariano Montone marianomontone at gmail.com
Mon Mar 22 17:57:53 UTC 2010


Marijn Haverbeke escribió:
>> So, I have no way of telling postgres to stop processing the query?
>> Actually, what I have are unsynchronized DAO objects (no any sort of
>> long queries),
>>     
>
> Can you show some code that demonstrates what you mean by an
> unsynchronized DAO object?
>   
When you have an CLOS (DAO) object's attribute and it doesn't exist in
the database table. Or otherwise, when you have an attribute in the
table that is not defined in the DAO class. I think you get a DAO
synchronization error when any of those happen. That is fine with me,
but I would like to get rid of the hung up and be able to go on querying
the db.

For example:

(defclass project-activity ()
  ((userid :accessor userid
       :initarg :userid
       :initform 0
       :col-type integer
       :documentation "The id of the user we are registering
                           the activity for")
   (projectid :accessor projectid
          :initarg :projectid
          :initform 0
          :col-type integer
          :documentation "The id of the project in which activity
                              was detected")
   (value :accessor value
      :initarg :value
      :initform 0
      :col-type integer
      :documentation "Each time user's activity in the project is
                          detected, this value is incremented. This is
                          used to determine the most active projects"))
  (:metaclass dao-class)
  (:documentation "Instances of this class are created when an user
modifies aproject (i.e. creates, modifies, or comments one of its issues)"))



If any of the attributes is not in the database, for instance 'value',
then I get the error and have to restart my application.




More information about the postmodern-devel mailing list