The argument to 'join' parameter must be the name of the DBIx::Class relation to the foreign table, not the foreign key name. In some cases (autogenerated schema with DBix::Class::Schema::Loader) they will be the same, but in other cases (i.e. when you build the schema by hand), this might not necessarily be the case.

Have you checked this?

Have you executed your script with DBIC_TRACE=1 to see the exact SQL which is being generated?

Can you post the exact error message that Oracle gives you? It's quite clear that Oracle _does_ understand the JOIN syntax since..... well, forever.

Cheers
J.


Jorge González Villalonga
Director Técnico


DAIKON Integración y Desarrollo S.L.
Telf: (+34) 91 188 08 28
Fax: (+34) 91 632 65 42
www.daikon.es

El 29/05/11 19:45, Rohan M escribió:
Dear All,

 I'm using Oracle 8i as a back-end database server for my Catalyst application. When I try to use join parameter using DBIx::Class model, it gives me syntax error.
It doesn't understand 'JOIN' keyword in the SQL generated by DBIx::Class.

for example - >

my $Info = $c->model('App::Log')->search({
id => $someid,
},{
join => 'foreignkey_id',
});

I did checked "http://search.cpan.org/~frew/DBIx-Class-0.08115/lib/DBIx/Class/Storage/DBI/Oracle/WhereJoins.pm"  where it is mentioned that DBIx::Class automatically detects the version and calls the above class to generate the JOIN in oracle 8i fashion but somehow its not working.

Also I checked for join_type parameter which allows you to go for 'outer' or 'inner' join but it didn't work.

Could some body tell me how can I use join for oracle 8i using DBIx::Class model in the Catalyst application?


Thanks and regards,
Rohan




_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to