X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=tests%2Ftest-ooddl.lisp;h=9037e53280fa1c9e5d6080996a72b227ffa06556;hp=a5db79f0f5b2268274724008f6241a7083c2c318;hb=ad3505e2f0d71c858425e4e13b7d9d00e633ba61;hpb=ec1872df0ec2761b4ab6811dc12f960f6f455819 diff --git a/tests/test-ooddl.lisp b/tests/test-ooddl.lisp index a5db79f..9037e53 100644 --- a/tests/test-ooddl.lisp +++ b/tests/test-ooddl.lisp @@ -17,7 +17,7 @@ (in-package #:clsql-tests) -#.(clsql:locally-enable-sql-reader-syntax) +(clsql-sys:file-enable-sql-reader-syntax) (def-view-class big () @@ -102,6 +102,21 @@ (slot-value (employee-manager employee2) 'last-name)) "Lenin") +(deftest :ooddl/join/4 + (with-dataset *ds-employees* + (values + (length (employee-addresses employee10)) + ;; add an address + (let ((*db-auto-sync* T)) + (make-instance 'address :addressid 50) + (make-instance 'employee-address :emplid 10 :addressid 50) + ;; again + (length (employee-addresses employee10))) + (progn + (update-objects-joins (list employee10) :slots '(addresses)) + (length (employee-addresses employee10))))) + 0 0 1) + (deftest :ooddl/big/1 ;;tests that we can create-view-from-class with a bigint slot, ;; and stick a value in there. @@ -110,7 +125,7 @@ (clsql:table-exists-p [big] ) (progn (clsql:drop-table [big] :if-does-not-exist :ignore) - (clsql:table-exists-p [big]))) + (clsql:table-exists-p [big] ))) ) t nil) @@ -184,5 +199,4 @@ )) -#.(clsql:restore-sql-reader-syntax-state)