0

I've implemented the behavior like this

<table name="user" idMethod="native" phpName="User">
    <column name="id" phpName="Id" type="INTEGER" size="12" primaryKey="true" autoIncrement="true" required="true"/>
    <behavior name="delegate">
        <parameter name="to" value="user_profile" />
    </behavior>
    <vendor type="mysql">
        <parameter name="Engine" value="InnoDB"/>
    </vendor>
</table>
<table name="user_profile" idMethod="native" phpName="UserProfile">
    <column name="avatar" phpName="Avatar" type="VARCHAR" size="255"/>
    <column name="birthday" phpName="Birthday" type="DATE" required="true" defaultValue="0000-00-00"/>
    <vendor type="mysql">
        <parameter name="Engine" value="InnoDB"/>
    </vendor>
</table>

after the migration and the build model command i'm still unable to get the ActiveRecord methods, am i missing a step?

javal88
  • 1,188
  • 3
  • 17
  • 29
  • What step is parsing the XML? – Rick James Oct 29 '18 at 23:45
  • @RickJames There're 3 steps in order to implement the behavior: 1 modify the schema, 2 do the migration, 3 re-build models – javal88 Oct 30 '18 at 08:27
  • I estimate that there are about 100 3rd-party packages that use MySQL under the covers. I answer a lot of questions on this forum that implies that very few of them get all the details 'right'. To do any non-trivial project, the user needs to understand the nuances of _both_ the package _and_ MySQL. – Rick James Oct 30 '18 at 17:16

0 Answers0