[Dbix-class] Note for DBIx::Class::ForceUTF8 users

2010-01-28 Thread Peter Rabbitson
As outlined in this bugreport [1], there is a possibility that update() calls
will be disturbed by changes in the upcoming version of DBIx::Class. Please
contact the author for a fix, or build your own ForceUTF8 component as
outlined in the bugreport.

Cheers

[1] http://rt.cpan.org/Public/Bug/Display.html?id=53520

___
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk


[Dbix-class] DBIx::Class::InflateColumn::File deprecated (retained for backwards comp)

2010-01-28 Thread Peter Rabbitson
As per http://dev.catalyst.perl.org/svnweb/bast/revision/?rev=8466,
consider switching to IC::FS if possible.

___
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk


Re: [Dbix-class] How to specify the necessary scheme?

2010-01-28 Thread Wallace Reis
On 21/01/2010, at 12:46, konstan...@tokar.ru wrote:
 Hi, All!
 
 How to use the schema description generated Schema::Loader, for the scheme 
 necessary to me?
 For example, there is class DBIC::EMULATOR::Cruise, I write for the current 
 scheme
 
 use DBIC::EMULATOR;
 my $schema = DBIC::EMULATOR-connect(...);
 my $record = $schema-resultset('ship')-search()-first ();
 
 But if I need to address to tables of other scheme, for example EMULATOR2, 
 EMULATOR3, how it to make? 
 Something like 
 
 my $record = $schema-resultset(EMULATOR2.ship')-search ()-first();
 my $record = $schema-resultset(EMULATOR3.ship')-search ()-first();


You can create separate namespace for each *db schema* you have under your 
*DBIC schema* one, then
you use the qualified table name when you set up the result class:

if your DBIC schema is DBIC::EMULATOR,

code
package DBIC::EMULATOR::EMULATOR1::ship;

use parent 'DBIx::Class::Core';

__PACKAGE__-table('EMULATOR1.ship');
[...]

package DBIC::EMULATOR::EMULATOR2::ship;

use parent 'DBIx::Class::Core';

__PACKAGE__-table('EMULATOR2.ship');
[...]

/code

thus, when you need to get the resultset for this result class you do:

my $emulator1_ship_rs = $schema-resultset('EMULATOR1::ship');
my $emulator2_ship_rs = $schema-resultset('EMULATOR2::ship');

--
   wallace reis/wreis Catalyst and DBIx::Class consultancy with a clue
   Software Engineer  and a commit bit: http://shadowcat.co.uk/catalyst/
Shadowcat Systems Limited
http://www.shadowcat.co.uk http://www.linkedin.com/in/wallacereis
___
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk