Thank you Actualize. First of all, I use exactly the same Catalyst tutorial in CPAN, original database for tutorial is SQLite. Would you please tell me if there is an Oracle version tutorial ? As SQLite database is not able to process large scale data, so I'm trying to replace SQLite settings with Oracle settings to practise the Catalyst tutorial. Here is schema for table 'books'.
package MyApp::Schema::Books; use strict; use warnings; use base 'DBIx::Class'; __PACKAGE__->load_components("Core"); __PACKAGE__->table("books"); __PACKAGE__->add_columns( "id", { data_type => "NUMBER", default_value => undef, is_nullable => 0, s +ize => 38 }, "title", { data_type => "VARCHAR2", default_value => undef, is_nullable => 1, size => 100, }, "rating", { data_type => "NUMBER", default_value => undef, is_nullable => 1, s +ize => 38 }, ); __PACKAGE__->set_primary_key("id"); # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-08-07 17:34:1 +2 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:t8NDS4p6epEhWCyorZl93Q # You can replace this text with custom content, and it will be preser +ved on regeneration # # Set relationships; # # has_many(): # args: # 1) Name of relationship, DBIC will create accessor with this +name # 2) Name of the model class referenced by this relationship # 3) Column name in *foreign* table __PACKAGE__->has_many(book_authors => 'MyApp::Schema::BookAuthors', 'b +ook_id'); # many_to_many(): # args: # 1) Name of relationship, DBIC will create accessor with this n +ame # 2) Name of has_many() relationship this many_to_many() is shor +tcut for # 3) Name of belongs_to() relationship in model class of has_man +y() above # You must already have the has_many() defined to use a many_to_ +many(). __PACKAGE__->many_to_many(authors => 'book_authors', 'author'); 1;

In reply to Re^6: Catalyst: model & context object usage by marscld
in thread Catalyst: model & context object usage by marscld

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.