[Dbix-class] DBIx::Class::Schema->deploy and ORACLE woes
    Doug Scoular 
    dscoular at cisco.com
       
    Fri Jun  6 08:38:13 BST 2008
    
    
  
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
    
    
More information about the DBIx-Class
mailing list