Skip to content

Commit

Permalink
Add auto-generated accessors with :conc-name only when :reader and :w…
Browse files Browse the repository at this point in the history
…riter are not specified.
  • Loading branch information
fukamachi committed May 24, 2024
1 parent 8da8c80 commit 72ec630
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/core/dao/column.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 72ec630

Please sign in to comment.