FAQ
Hello,

We are using catalyst with an Oracle database.
We are using DBIx::Class::Schema::Loader to create the DBIx::Class
interface,
with the following command;
./myapp_create.pl model DB DBIC::Schema MyApp::Schema create=static
'dbi:Oracle:sid½BDEV;host=ch7ux002.xxxxx;port21' 'user' 'user' '{
AutoCommit => 0 }'

It seems that the data_types are not set, in contradiction with the
DBIx::Class documentation.

Anyone has a clue on how to automatically fecth the datatypes ?

Thanks,


-----------------------------------------
This message and any attachment are confidential, may be privileged
or otherwise protected from disclosure and are intended only for
use by the addressee(s) named herein. If you are not the intended
recipient, you must not copy this message or attachment or disclose
the contents to any other person. If you have received this
transmission in error, please notify the sender immediately and
delete the message and any attachment from your system. Merck
Serono does not accept liability for any omissions or errors in
this message which may arise as a result of E-Mail-transmission or
for damages resulting from any unauthorized changes of the content
of this message and any attachment thereto. If verification is
required, please request a hard-copy version. Merck Serono does not
guarantee that this message is free of viruses and does not accept
liability for any damages caused by any virus transmitted
therewith.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090206/4403e4f6/attachment.htm

Search Discussions

  • Jay Shirley at Feb 6, 2009 at 5:26 pm

    On Fri, Feb 6, 2009 at 9:10 AM, wrote:
    Hello,

    We are using catalyst with an Oracle database.
    We are using DBIx::Class::Schema::Loader to create the DBIx::Class
    interface,
    with the following command;
    ./myapp_create.pl model DB DBIC::Schema MyApp::Schema create=static
    'dbi:Oracle:sid½BDEV;host=ch7ux002.xxxxx;port21' 'user' 'user' '{
    AutoCommit => 0 }'

    It seems that the data_types are not set, in contradiction with the
    DBIx::Class documentation.

    Anyone has a clue on how to automatically fecth the datatypes ?

    Please post to the DBIC mailing list, at
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class

    -J
  • Karl Forner at Feb 11, 2009 at 12:47 pm
    I believe I fixed the problem (cf my post "bug found in and tentatively
    fixed in DBIx::Class::Schema::Loader::DBI::Oracle::_tables_list" in the dbix
    mailing list").

    Here's a copy :
    We had a problem because DBIx::Class::Schema::Loader did not get the
    column_info for our Oracle database : no data_types, is_nullable, default
    etc.. attributes were set.
    We traced the problem down to DBIx::Class::Schema::Loader::DBI::Oracle::_tables_list,
    that changed the table names to lowercase.

    So just commenting the line 69 : $table = lc $table;
    seems to fix the problem.

    The test is either to call the _tables_list and check the table names,
    or to create a schema on a n oracle db using
    DBIx::Class::Schema::Loader::make_schema_at, and to check that the generated
    DBIx::Class objects have
    the column attributes such as data_type, default_value , is_nullable ,
    size etc...


    Here are some details:
    DBIx::Class::Schema::Loader $VERSION = '0.04004'
    perl, v5.8.8 built for i486-linux-gnu-thread-multi

    diff:
    --- Oracle.pm 2009-02-11 13:35:08.000000000 +0100
    +++ Oracle.pm.fixed 2009-02-11 13:35:04.000000000 +0100
    @@ -66,7 +66,7 @@
    $table =~ s/\w+\.//;

    next if $table eq 'PLAN_TABLE';
    - $table = lc $table;
    + # $table = lc $table; # removed by kf
    push @tables, $1
    if $table =~ /\A(\w+)\z/;
    }
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090211/03124790/attachment.htm
  • Zbigniew Lukasiak at Feb 12, 2009 at 9:42 am

    On Wed, Feb 11, 2009 at 1:47 PM, Karl Forner wrote:
    I believe I fixed the problem (cf my post "bug found in and tentatively
    fixed in DBIx::Class::Schema::Loader::DBI::Oracle::_tables_list" in the dbix
    mailing list").

    Here's a copy :
    We had a problem because DBIx::Class::Schema::Loader did not get the
    column_info for our Oracle database : no data_types, is_nullable, default
    etc.. attributes were set.
    We traced the problem down to DBIx::Class::Schema::Loader::
    DBI::Oracle::_tables_list, that changed the table names to lowercase.

    So just commenting the line 69 : $table = lc $table;
    seems to fix the problem.

    The test is either to call the _tables_list and check the table names,
    or to create a schema on a n oracle db using
    DBIx::Class::Schema::Loader::make_schema_at, and to check that the generated
    DBIx::Class objects have
    the column attributes such as data_type, default_value , is_nullable ,
    size etc...


    Here are some details:
    DBIx::Class::Schema::Loader $VERSION = '0.04004'
    perl, v5.8.8 built for i486-linux-gnu-thread-multi

    diff:
    --- Oracle.pm 2009-02-11 13:35:08.000000000 +0100
    +++ Oracle.pm.fixed 2009-02-11 13:35:04.000000000 +0100
    @@ -66,7 +66,7 @@
    $table =~ s/\w+\.//;

    next if $table eq 'PLAN_TABLE';
    - $table = lc $table;
    + # $table = lc $table; # removed by kf
    Hmm - it was just the first version of that code that I worken on -
    but I remember that there some problems when the metadata was saved
    under a hash key different from the table name, because it is referred
    in other places. Not that I am sure it applies here - but this might
    be something you should check.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedFeb 6, '09 at 5:10p
activeFeb 12, '09 at 9:42a
posts4
users4
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase