[Dbix-class] Re: question about connect from manual
Jim Green
student.northwestern at gmail.com
Wed Feb 23 18:57:35 GMT 2011
>Why don't you keep a pre-connected $schema object within the scope of
>your table accesses instead? DBIC will automatically reconnect if the
>connection is dropped between table accesses.
lets say I have
__PACKAGE__->connection(connection details) in the Schema.pm
when I want to use a certain table I still need to
my $schema = My::Schema->connect();
in my application code.
I don't think it is smart enough to have to do this each time I need to
access a table.
I want something as simple as
my $rs = $schema->resultset(tablename),
everything else I hope dbic can conceal it.
Thanks!
Jim
--
View this message in context: http://dbix-class.35028.n2.nabble.com/question-about-connect-from-manual-tp6045074p6057443.html
Sent from the DBIx-Class mailing list archive at Nabble.com.
More information about the DBIx-Class
mailing list