Open svetlyak40wt opened 5 years ago
I'm still able to reproduce this issue on the latest Mito.
ql :all :latest
github mito fukamachi/mito
qlot install
;; (defpackage #:mito-test
;; (:use #:cl))
;; (in-package mito-test)
(defclass project ()
((name :col-type :text))
(:metaclass mito:dao-table-class))
(defclass with-link-to-project-mixin ()
((project :col-type project))
(:metaclass mito:dao-table-mixin))
(defclass action (with-link-to-project-mixin)
()
(:metaclass mito:dao-table-class))
(defun test-issue ()
(mito:connect-toplevel :sqlite3
:database-name "db.sqlite")
(mito:save-dao (make-instance 'action)))
qlot exec ros --eval '(ql:quickload :mito)' --load test.lisp --eval '(test-issue)'
[art@lispbook:/tmp/check-mito]% qlot exec ros --eval '(ql:quickload :mito)' --load test.lisp --eval '(test-issue)'
To load "mito":
Load 1 ASDF system:
mito
; Loading "mito"
.....
debugger invoked on a SIMPLE-ERROR in thread
#<THREAD "main thread" RUNNING {10005205B3}>:
When attempting to read the slot's value (slot-value), the slot
MITO.CLASS.TABLE::PARENT-COLUMN-MAP is missing from the object
#<STANDARD-CLASS MITO.DAO.TABLE:DAO-CLASS>.
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE] Ignore runtime option --eval "(ros:run '((:eval\"(ros:asdf)\")(:eval\"(ros:quicklisp)\")(:eval \"(ql:quickload :mito)\")(:load \"test.lisp\")(:eval \"(test-issue)\")(:quit)))".
1: [ABORT ] Skip rest of --eval and --load options.
2: Skip to toplevel READ/EVAL/PRINT loop.
3: [EXIT ] Exit SBCL (calling #'EXIT, killing the process).
((:METHOD SLOT-MISSING (T T T T)) #<unused argument> #<STANDARD-CLASS MITO.DAO.TABLE:DAO-CLASS> MITO.CLASS.TABLE::PARENT-COLUMN-MAP SLOT-VALUE NIL) [fast-method]
0]
This error happens when you have a reference to another table in the class, having
metclass = dao-table-mixin
.Here is a full example to reproduce this problem:
After these classes were defined, try:
This is a full stack trace from the Emacs: