X-Git-Url: https://git.hcoop.net/clinton/lisp-on-lines.git/blobdiff_plain/e37ba21c0da40f4a6920cca150df9c8966c9cfea..a6644385238aac1694af714e321c34456bea3441:/src/meta-model.lisp diff --git a/src/meta-model.lisp b/src/meta-model.lisp index 9ea1d3c..9065071 100644 --- a/src/meta-model.lisp +++ b/src/meta-model.lisp @@ -177,5 +177,13 @@ "returns the SLOT in the foreign VIEW-CLASS that joins with FOREIGN-KEY" (car (list-relations-helper view (find-join-helper foreign-key) :return-key :foreign-key))) +(defmethod explode-has-many ((view t) join-slot) + "returns the class of the join as the primary value, the second and third value is the home key and the foreign key" + (let ((att (assoc join-slot (list-join-attributes view)))) + (values (getf (cdr att) :join-class) + (getf (cdr att) :home-key) + (getf (cdr att) :foreign-key)))) + +