From 72ec6305f336b32954ac743a0f892af6a120f44a Mon Sep 17 00:00:00 2001 From: Eitaro Fukamachi Date: Fri, 24 May 2024 03:02:23 +0000 Subject: [PATCH] Add auto-generated accessors with :conc-name only when :reader and :writer are not specified. --- src/core/dao/column.lisp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/dao/column.lisp b/src/core/dao/column.lisp index d4b7da4..8710525 100644 --- a/src/core/dao/column.lisp +++ b/src/core/dao/column.lisp @@ -29,10 +29,12 @@ (let ((accessor (intern (format nil "~:@(~A~A~)" *conc-name* name) *package*))) - (pushnew accessor readers) - (pushnew `(setf ,accessor) writers) - (setf (getf rest-initargs :readers) readers) - (setf (getf rest-initargs :writers) writers))) + (unless readers + (pushnew accessor readers) + (setf (getf rest-initargs :readers) readers)) + (unless writers + (pushnew `(setf ,accessor) writers) + (setf (getf rest-initargs :writers) writers)))) (when inflate (setf (getf rest-initargs :inflate) (eval inflate)))