Changeset 923

Show
Ignore:
Timestamp:
05/04/08 22:51:54 (3 months ago)
Author:
laurentj
Message:

ticket #402: jelix-scripts, createdao and createdaocrud, there was no errors when generating a dao from a table which doesn't contain a primary key

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0.x/lib/jelix-scripts/commands/createdao.cmd.php

    r661 r923  
    153153 
    154154         } 
     155 
     156         if($primarykeys == '') { 
     157            throw new Exception("The table has no primary keys. A dao needs a primary key on the table to be defined."); 
     158         } 
     159 
    155160         $param['properties']=$properties; 
    156161         $param['primarykeys']=$primarykeys; 
     
    160165} 
    161166 
    162  
    163 ?> 
  • branches/1.0.x/lib/jelix-scripts/commands/createdao.cmd.php

    r661 r923  
    153153 
    154154         } 
     155 
     156         if($primarykeys == '') { 
     157            throw new Exception("The table has no primary keys. A dao needs a primary key on the table to be defined."); 
     158         } 
     159 
    155160         $param['properties']=$properties; 
    156161         $param['primarykeys']=$primarykeys; 
     
    160165} 
    161166 
    162  
    163 ?> 
  • branches/1.0.x/lib/jelix-scripts/commands/createdao.cmd.php

    r661 r923  
    153153 
    154154         } 
     155 
     156         if($primarykeys == '') { 
     157            throw new Exception("The table has no primary keys. A dao needs a primary key on the table to be defined."); 
     158         } 
     159 
    155160         $param['properties']=$properties; 
    156161         $param['primarykeys']=$primarykeys; 
     
    160165} 
    161166 
    162  
    163 ?> 
  • branches/1.0.x/lib/jelix-scripts/commands/createdao.cmd.php

    r661 r923  
    153153 
    154154         } 
     155 
     156         if($primarykeys == '') { 
     157            throw new Exception("The table has no primary keys. A dao needs a primary key on the table to be defined."); 
     158         } 
     159 
    155160         $param['properties']=$properties; 
    156161         $param['primarykeys']=$primarykeys; 
     
    160165} 
    161166 
    162  
    163 ?> 
  • branches/1.0.x/lib/jelix-scripts/jelix.php

    r646 r923  
    106106$command->init($options,$parameters); 
    107107 
    108 $command->run(); 
     108try { 
     109    $command->run(); 
     110}catch(Exception $e) { 
     111    echo "Error: ".$e->getMessage(),"\n"; 
     112    exit(1); 
     113
    109114 
    110 ?> 
     115exit(0); 
     116 
  • branches/1.0.x/lib/jelix-scripts/jelix.php

    r646 r923  
    106106$command->init($options,$parameters); 
    107107 
    108 $command->run(); 
     108try { 
     109    $command->run(); 
     110}catch(Exception $e) { 
     111    echo "Error: ".$e->getMessage(),"\n"; 
     112    exit(1); 
     113
    109114 
    110 ?> 
     115exit(0); 
     116 
  • branches/1.0.x/lib/jelix-scripts/jelix.php

    r646 r923  
    106106$command->init($options,$parameters); 
    107107 
    108 $command->run(); 
     108try { 
     109    $command->run(); 
     110}catch(Exception $e) { 
     111    echo "Error: ".$e->getMessage(),"\n"; 
     112    exit(1); 
     113
    109114 
    110 ?> 
     115exit(0); 
     116 
  • branches/1.0.x/lib/jelix-scripts/jelix.php

    r646 r923  
    106106$command->init($options,$parameters); 
    107107 
    108 $command->run(); 
     108try { 
     109    $command->run(); 
     110}catch(Exception $e) { 
     111    echo "Error: ".$e->getMessage(),"\n"; 
     112    exit(1); 
     113
    109114 
    110 ?> 
     115exit(0); 
     116 
  • trunk/lib/jelix-scripts/commands/createdao.cmd.php

    r661 r923  
    153153 
    154154         } 
     155 
     156         if($primarykeys == '') { 
     157            throw new Exception("The table has no primary keys. A dao needs a primary key on the table to be defined."); 
     158         } 
     159 
    155160         $param['properties']=$properties; 
    156161         $param['primarykeys']=$primarykeys; 
     
    160165} 
    161166 
    162  
    163 ?> 
  • trunk/lib/jelix-scripts/commands/createdao.cmd.php

    r661 r923  
    153153 
    154154         } 
     155 
     156         if($primarykeys == '') { 
     157            throw new Exception("The table has no primary keys. A dao needs a primary key on the table to be defined."); 
     158         } 
     159 
    155160         $param['properties']=$properties; 
    156161         $param['primarykeys']=$primarykeys; 
     
    160165} 
    161166 
    162  
    163 ?> 
  • trunk/lib/jelix-scripts/commands/createdao.cmd.php

    r661 r923  
    153153 
    154154         } 
     155 
     156         if($primarykeys == '') { 
     157            throw new Exception("The table has no primary keys. A dao needs a primary key on the table to be defined."); 
     158         } 
     159 
    155160         $param['properties']=$properties; 
    156161         $param['primarykeys']=$primarykeys; 
     
    160165} 
    161166 
    162  
    163 ?> 
  • trunk/lib/jelix-scripts/commands/createdao.cmd.php

    r661 r923  
    153153 
    154154         } 
     155 
     156         if($primarykeys == '') { 
     157            throw new Exception("The table has no primary keys. A dao needs a primary key on the table to be defined."); 
     158         } 
     159 
    155160         $param['properties']=$properties; 
    156161         $param['primarykeys']=$primarykeys; 
     
    160165} 
    161166 
    162  
    163 ?> 
  • trunk/lib/jelix-scripts/jelix.php

    r646 r923  
    106106$command->init($options,$parameters); 
    107107 
    108 $command->run(); 
     108try { 
     109    $command->run(); 
     110}catch(Exception $e) { 
     111    echo "Error: ".$e->getMessage(),"\n"; 
     112    exit(1); 
     113
    109114 
    110 ?> 
     115exit(0); 
     116 
  • trunk/lib/jelix-scripts/jelix.php

    r646 r923  
    106106$command->init($options,$parameters); 
    107107 
    108 $command->run(); 
     108try { 
     109    $command->run(); 
     110}catch(Exception $e) { 
     111    echo "Error: ".$e->getMessage(),"\n"; 
     112    exit(1); 
     113
    109114 
    110 ?> 
     115exit(0); 
     116 
  • trunk/lib/jelix-scripts/jelix.php

    r646 r923  
    106106$command->init($options,$parameters); 
    107107 
    108 $command->run(); 
     108try { 
     109    $command->run(); 
     110}catch(Exception $e) { 
     111    echo "Error: ".$e->getMessage(),"\n"; 
     112    exit(1); 
     113
    109114 
    110 ?> 
     115exit(0); 
     116 
  • trunk/lib/jelix-scripts/jelix.php

    r646 r923  
    106106$command->init($options,$parameters); 
    107107 
    108 $command->run(); 
     108try { 
     109    $command->run(); 
     110}catch(Exception $e) { 
     111    echo "Error: ".$e->getMessage(),"\n"; 
     112    exit(1); 
     113
    109114 
    110 ?> 
     115exit(0); 
     116 
Download in other formats: Unified Diff Zip Archive