On 4/3/06, Sebastian Riedel <[EMAIL PROTECTED]> wrote:
>      use DBIx::Class::Schema::Declare [
>
>          One => {
>              foo => { primary => 1 },
>              bar => 'text',
>          }, { table => 'three' },
>
>          Two => {
>              baz => { primary    => 1 },
>              qux => { type       => 'text', length => 23, null => 0 },
>              one => { belongs_to => 'One' }
>          }
>
>      ];


Consider:

  table {
    class 'One';
    column 'foo', -primary => 1;
    column 'bar', Text();
  }

  table {
    class 'Two';
    column 'baz', -primary => 1;
    column 'qux', Text(23), -not_null => 1;
    belongs_to 'one';
  }

It really surprises me if that's your notion of "elegantness". I think
you have a rather wicked notion of what's elegant or not. But probably
it's just me.

-Nilson Santos F. Jr.

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/

Reply via email to