[Dbix-class] Oracle 8 doesn't understand JOIN :(

Michael Gray mjg17 at eng.cam.ac.uk
Tue Feb 14 11:14:59 CET 2006


Oh woe.  My next problem is that the rather elderly Oracle DB that I'm 
working against does not seem to understand the modern SQL JOIN keyword.

Thus, my schema:

__PACKAGE__->table('students');
...
__PACKAGE__->belongs_to('personnel_key' => 'COMET::Schema::Person');

gives rise to

 SELECT me.student_id, me.personnel_key, ...
 FROM students me  JOIN people personnel_key
 ON ( personnel_key.personnel_key = me.personnel_key ) 
 WHERE (student_id = ?)

which would in fact need to be expressed instead as the more traditional

 SELECT me.student_id, me.personnel_key, ...
 FROM students me, people personnel_key
 WHERE ( personnel_key.personnel_key = me.personnel_key )
   AND (student_id = ?)

It looks as if Storage::DBI::_recurse_from() is where the join action 
is, but even if I passed a new pseudo_join_type of, say, 
_SIMULATE_JOIN_, it's not clear to me how I'd add the join condition to 
the statement's WHERE clause.

Any suggestions gratefully received.  

Many thanks
-- 
Michael



More information about the Dbix-class mailing list