Changeset 324

Show
Ignore:
Timestamp:
03/02/07 15:09:22 (1 year ago)
Author:
mikey
Message:

bugfix in net.stubbles.rdbms.persistence.creator.stubDatabaseCreator
made experimental example work again

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/experiments/people/mikey/persistence/createTable.php

    r256 r324  
    44stubClassLoader::load('net.stubbles.rdbms.rdbms', 
    55                      'net.stubbles.rdbms.persistence.stubPersistable', 
    6                       'net.stubbles.rdbms.persistence.querybuilder.stubDatabaseQueryBuilderFactory
     6                      'net.stubbles.rdbms.persistence.creator.stubDatabaseCreator
    77); 
    88require_once 'MyNewsArticle.php'; 
    99require_once 'connection.php'; 
    1010 
    11 $connection       = stubDatabaseConnectionPool::getConnection(); 
    12 $queryBuilder     = stubDatabaseQueryBuilderFactory::create($connection); 
    13 var_dump($connection->exec($queryBuilder->createTable('MyNewsArticle'))); 
     11$creator = stubDatabaseCreator::getInstance(stubDatabaseConnectionPool::getConnection()); 
     12$creator->createTable('MyNewsArticle'); 
    1413?> 
  • trunk/src/main/php/net/stubbles/rdbms/persistence/creator/stubDatabaseCreator.php

    r316 r324  
    1010                      'net.stubbles.rdbms.persistence.annotations.stubDBTableAnnotation', 
    1111                      'net.stubbles.rdbms.persistence.annotations.stubDBColumnAnnotation', 
    12                       'net.stubbles.rdbms.persistence.finder.stubDatabaseCreatorException', 
     12                      'net.stubbles.rdbms.persistence.creator.stubDatabaseCreatorException', 
    1313                      'net.stubbles.rdbms.querybuilder.stubDatabaseQueryBuilderFactory', 
    1414                      'net.stubbles.rdbms.querybuilder.stubDatabaseTableDescription', 
     
    9898        $tableDescription = new stubDatabaseTableDescription(); 
    9999        $tableDescription->setName($dbTable->getName()); 
     100        $tableDescription->setType($dbTable->getType()); 
     101        $tableDescription->setCharacterSet($dbTable->getCharacterSet()); 
     102        $tableDescription->setCollation($dbTable->getCollation()); 
     103        $tableDescription->setComment($dbTable->getComment()); 
    100104        $methods = $refClass->getMethods(); 
    101105        foreach ($methods as $method) {