Ticket #3545: propel-inheritance-bug.patch
| File propel-inheritance-bug.patch, 3.1 kB (added by Kris.Wallsmith, 8 months ago) |
|---|
-
lib/plugins/sfPropelPlugin/test/unit/fixtures/schema.xml
old new 83 83 <column name="culture" isCulture="true" type="varchar" size="7" required="true" primaryKey="true" /> 84 84 </table> 85 85 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 86 94 </database> -
lib/plugins/sfPropelPlugin/test/unit/fixtures/schema.yml
old new 52 52 53 53 ab_group_i18n: 54 54 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 -
lib/plugins/sfPropelPlugin/test/unit/fixtures/new_schema.yml
old new 69 69 tableName: ab_group_i18n 70 70 columns: 71 71 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 -
lib/plugins/sfPropelPlugin/lib/propel/sfPropelDatabaseSchema.class.php
old new 556 556 $extended_package = isset($this->database[$tb_name]['_attributes']['package']) ? 557 557 $this->database[$tb_name]['_attributes']['package'] : 558 558 $this->database['_attributes']['package']; 559 $extended_class = $this->database[$tb_name]['_attributes']['phpName'];560 559 560 $extended_class = isset($this->database[$tb_name]['_attributes']['phpName']) ? 561 $this->database[$tb_name]['_attributes']['phpName'] : 562 sfInflector::camelize($tb_name); 563 561 564 foreach ($column['inheritance'] as $key => $class) 562 565 { 563 566 $attributes_string .= sprintf(' <inheritance extends="%s.%s" key="%s" class="%s" />%s',