From 1c5166f0e106b086a5f50a7ce5af2f50d6c6b58e Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Wed, 5 May 2004 10:09:10 +0000 Subject: [PATCH] r9246: return list of lists for :target-slot --- ChangeLog | 4 +++- sql/objects.lisp | 2 +- tests/test-oodml.lisp | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index f143111..540d6b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 4 May 2004 Kevin Rosenberg (kevin@rosenberg.net) * TODO: New section on optimizations, especially optimizing JOINs. - + * sql/objects.lisp: Have :target-slot return of list of lists rather + than a list of cons pairs to be conformant with CommonSQL. + 4 May 2004 Kevin Rosenberg (kevin@rosenberg.net) * Version 2.10.11 * base/basic-sql.lisp: Avoid multiple evaluation diff --git a/sql/objects.lisp b/sql/objects.lisp index fccf37d..2ebad78 100644 --- a/sql/objects.lisp +++ b/sql/objects.lisp @@ -722,7 +722,7 @@ superclass of the newly-defined View Class." (mapcar (lambda (obj) (let* ((target-name (gethash :target-slot dbi)) (target-class (find-class target-name))) - (cons + (list (car (fault-join-slot-raw target-class diff --git a/tests/test-oodml.lisp b/tests/test-oodml.lisp index 7e69d6e..804248b 100644 --- a/tests/test-oodml.lisp +++ b/tests/test-oodml.lisp @@ -85,9 +85,9 @@ (mapcar #'(lambda (pair) (list (typep (car pair) 'address) - (typep (cdr pair) 'employee-address) + (typep (second pair) 'employee-address) (slot-value (car pair) 'addressid) - (slot-value (cdr pair) 'addressid))) + (slot-value (second pair) 'addressid))) (employee-addresses employee1)) ((t t 1 1) (t t 2 2))) @@ -95,9 +95,9 @@ (mapcar #'(lambda (pair) (list (typep (car pair) 'address) - (typep (cdr pair) 'employee-address) + (typep (second pair) 'employee-address) (slot-value (car pair) 'addressid) - (slot-value (cdr pair) 'addressid))) + (slot-value (second pair) 'addressid))) (employee-addresses employee2)) ((t t 2 2))) -- 2.34.1