[Dbix-class] RootClass DBIx::ContextualFetch

Bill Moseley moseley at hank.org
Sat Sep 26 14:13:50 GMT 2015


I have an old app that uses DBI directly with Postgresql.   I want to add
in support for DBIx::Class into the same app.  I don't want to double the
number of database connections so would like to replace the method that
returns a $dbh in the old app with:

$schema->storage->dbh;  # [1]


The issue is the old app uses DBI with a RootClass of DBIx::ContextualFetch
<http://search.cpan.org/dist/DBIx-ContextualFetch/lib/DBIx/ContextualFetch.pm#EXTENSIONS>
.

I see that DBIx::Class::CDBICompat::ImaDBI uses DBIx::ContextualFetch.

Is there any problem with setting the RootClass as DBIx::ContextualFetch
and running DBIC normally?


[1] Actually, I'd probably calll $storage->_get_dbh to reduced the number
of pings.

-- 
Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20150926/3719be3a/attachment.htm>


More information about the DBIx-Class mailing list