Development

Changeset 8972

You must first sign up to be able to contribute.

Changeset 8972

Show
Ignore:
Timestamp:
05/15/08 08:44:01 (5 months ago)
Author:
FabianLange
Message:

applied Kris patch to new propel inheritance support, using table name if phpName is not set. fixes #3545

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/sfPropelDatabaseSchema.class.php

    r8815 r8972  
    557557          $this->database[$tb_name]['_attributes']['package'] : 
    558558          $this->database['_attributes']['package']; 
    559         $extended_class = $this->database[$tb_name]['_attributes']['phpName']; 
    560559         
     560        $extended_class = isset($this->database[$tb_name]['_attributes']['phpName']) ? 
     561          $this->database[$tb_name]['_attributes']['phpName'] : 
     562          sfInflector::camelize($tb_name); 
     563 
    561564        foreach ($column['inheritance'] as $key => $class) 
    562565        { 
  • branches/1.1/lib/plugins/sfPropelPlugin/test/unit/fixtures/new_schema.yml

    r8815 r8972  
    7070    columns: 
    7171      motto:          longvarchar 
     72   
     73  History: 
     74    tableName:      history 
     75    columns: 
     76      id: 
     77      type:         { type: varchar(64) } 
     78    inheritance: 
     79      column:       type 
     80      classes: 
     81        new_user:   History_NewUser 
     82        new_page:   History_NewPage 
  • branches/1.1/lib/plugins/sfPropelPlugin/test/unit/fixtures/schema.xml

    r8815 r8972  
    8484  </table> 
    8585 
     86  <table name="history"> 
     87    <column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true" /> 
     88    <column name="type" type="varchar" size="64" inheritance="single"> 
     89      <inheritance extends="lib.model.History" key="new_user" class="History_NewUser" /> 
     90      <inheritance extends="lib.model.History" key="new_page" class="History_NewPage" /> 
     91    </column> 
     92  </table> 
     93 
    8694</database> 
  • branches/1.1/lib/plugins/sfPropelPlugin/test/unit/fixtures/schema.yml

    r8815 r8972  
    5353  ab_group_i18n: 
    5454    motto:            longvarchar 
     55   
     56  history: 
     57    _attributes:    { phpName: History } 
     58    id: 
     59    type:           { type: varchar(64) } 
     60    _inheritance: 
     61      column:       type 
     62      classes: 
     63        new_user:   History_NewUser 
     64        new_page:   History_NewPage