@@ -128,10 +128,21 @@ public function testSubQuery()
128
128
->where ('name ' , 'Developer ' )
129
129
->getCompiledSelect ();
130
130
131
- $ jobs = $ this ->db ->table ('job ' )
132
- ->where ('id not in ( ' . $ subQuery . ') ' , null , false )
133
- ->get ()
134
- ->getResult ();
131
+ if ($ this ->db ->DBDriver === 'OCI8 ' )
132
+ {
133
+ $ jobs = $ this ->db ->table ('job ' )
134
+ ->where ('"id" not in ( ' . $ subQuery . ') ' , null , false )
135
+ ->orderBy ('id ' )
136
+ ->get ()
137
+ ->getResult ();
138
+ }
139
+ else
140
+ {
141
+ $ jobs = $ this ->db ->table ('job ' )
142
+ ->where ('id not in ( ' . $ subQuery . ') ' , null , false )
143
+ ->get ()
144
+ ->getResult ();
145
+ }
135
146
136
147
$ this ->assertCount (3 , $ jobs );
137
148
$ this ->assertEquals ('Politician ' , $ jobs [0 ]->name );
@@ -148,10 +159,20 @@ public function testSubQueryAnotherType()
148
159
->where ('name ' , 'Developer ' )
149
160
->getCompiledSelect ();
150
161
151
- $ jobs = $ this ->db ->table ('job ' )
152
- ->where ('id = ( ' . $ subQuery . ') ' , null , false )
153
- ->get ()
154
- ->getResult ();
162
+ if ($ this ->db ->DBDriver === 'OCI8 ' )
163
+ {
164
+ $ jobs = $ this ->db ->table ('job ' )
165
+ ->where ('"id" = ( ' . $ subQuery . ') ' , null , false )
166
+ ->get ()
167
+ ->getResult ();
168
+ }
169
+ else
170
+ {
171
+ $ jobs = $ this ->db ->table ('job ' )
172
+ ->where ('id = ( ' . $ subQuery . ') ' , null , false )
173
+ ->get ()
174
+ ->getResult ();
175
+ }
155
176
156
177
$ this ->assertCount (1 , $ jobs );
157
178
$ this ->assertEquals ('Developer ' , $ jobs [0 ]->name );
0 commit comments