[Dbix-class] DBIx::Class::Schema->deploy and ORACLE woes
    Scott Pham (scpham) 
    scpham at cisco.com
       
    Fri Jun  6 15:53:04 BST 2008
    
    
  
Do you still get the same results when you do it in 1 call like below?
__PACKAGE__->load_classes(qw/Host TestGroup Test Result HostToTestGroup
TestGroupToTest/);
"umuntu ngumuntu ngabantu"
-----Original Message-----
From: Doug Scoular (dscoular) 
Sent: Friday, June 06, 2008 3:38 AM
To: DBIx::Class user and developer list
Subject: Re: [Dbix-class] DBIx::Class::Schema->deploy and ORACLE woes
Hi Scott,
Scott Pham (scpham) wrote:
> I wonder if you can just do a cascade_copy => 0 to your has_many to 
> get rid of the 'ON UPDATE CASCADE'.
>
>   
    Adding cascade_copy => 0 to the has_many/belongs_to relations
    did indeed get rid of the 'ON UPDATE CASCADE' clause.
    I now get code that ORACLE could accept, however the
    order of the table definitions in the SQL output doesn't
    follow the order I defined them in my schema and this
    leads to forward reference issues:
__PACKAGE__->load_classes(qw/Host/);
__PACKAGE__->load_classes(qw/TestGroup/);
__PACKAGE__->load_classes(qw/Test/);
__PACKAGE__->load_classes(qw/Result/);
__PACKAGE__->load_classes(qw/HostToTestGroup/);
__PACKAGE__->load_classes(qw/TestGroupToTest/);
    The output order from create_ddl_dir (and I assume deploy too)
    is:
-- Table: hosts
-- Table: host_to_testgroup *needs testgroup table defined
-- Table: results *needs test defined
-- Table: test *needs testgroup defined
-- Table: testgroups
-- Table: testgroup_to_test 
    So I guess I'll just hand edit it back into the correct order
    to avoid forward references. I don't suppose there's a way
    of controlling the order ?
    Cheers,
    Doug
_______________________________________________
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.rawmode.org
    
    
More information about the DBIx-Class
mailing list