X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Fooddl.lisp;h=02c11f021df00c7d3bf1502c612ff4c4994696cc;hp=2a81f8aefacca29975f9f6de6caa4ceacb1b00e5;hb=6bee16be3f891067ae8fe1a67e13b39e8ee72598;hpb=a244caf265fff60cc9d00083e15951762dd7f1ca diff --git a/sql/ooddl.lisp b/sql/ooddl.lisp index 2a81f8a..02c11f0 100644 --- a/sql/ooddl.lisp +++ b/sql/ooddl.lisp @@ -1,8 +1,6 @@ ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- ;;;; ************************************************************************* ;;;; -;;;; $Id$ -;;;; ;;;; The CLSQL Object Oriented Data Definitional Language (OODDL) ;;;; ;;;; This file is part of CLSQL. @@ -45,7 +43,7 @@ (setf (slot-value instance slot-name) (fault-join-slot class instance slot-object)) (setf (slot-value instance slot-name) nil))) - (when (and (normalisedp class) + (when (and (normalizedp class) (not (member slot-name (mapcar #'(lambda (esd) (slot-definition-name esd)) (ordered-class-direct-slots class)))) @@ -53,7 +51,7 @@ (let ((*db-deserializing* t)) (if (view-database instance) (setf (slot-value instance slot-name) - (fault-join-normalised-slot class instance slot-object)) + (fault-join-normalized-slot class instance slot-object)) (setf (slot-value instance slot-name) nil))))))) (call-next-method)) @@ -93,7 +91,7 @@ in DATABASE which defaults to *DEFAULT-DATABASE*." (if tclass (let ((*default-database* database) (pclass (car (class-direct-superclasses tclass)))) - (when (and (normalisedp tclass) (not (table-exists-p (view-table pclass)))) + (when (and (normalizedp tclass) (not (table-exists-p (view-table pclass)))) (create-view-from-class (class-name pclass) :database database :transactions transactions)) (%install-class tclass database :transactions transactions)) @@ -104,16 +102,16 @@ in DATABASE which defaults to *DEFAULT-DATABASE*." (defmethod %install-class ((self standard-db-class) database &key (transactions t)) (let ((schemadef '()) - (ordered-slots (if (normalisedp self) + (ordered-slots (if (normalizedp self) (ordered-class-direct-slots self) (ordered-class-slots self)))) (dolist (slotdef ordered-slots) - (let ((res (database-generate-column-definition (class-name self) + (let ((res (database-generate-column-definition self slotdef database))) (when res (push res schemadef)))) (if (not schemadef) - (unless (normalisedp self) + (unless (normalizedp self) (error "Class ~s has no :base slots" self)) (progn (create-table (sql-expression :table (view-table self)) (nreverse schemadef)