fatal error: call to a member function get children column() on a non-object

Below is given schema.yml of my project:

propel:
_attributes: {noXsd: false, defaultIdMethod: none, package: lib.model}
cms_admin:
_attributes:               { phpName: Admin, isI18N: true, i18nTable: cms_admin_i18n }
adm_id:                    { type: INTEGER, required: true, primaryKey: true, autoIncrement: true}
adm_email:                 { type: VARCHAR, size:100, required: true }
adm_passwd:                { type: VARCHAR, size:100, required: true }
adm_create_date:           { type: TIMESTAMP }
adm_last_login:            { type: TIMESTAMP }
adm_last_login_ip:         { type: VARCHAR, size:100 }

cms_admin_i18n:
_attributes:               { phpName: AdminI18n }
adm_id:                    { type: INTEGER, required: true, primaryKey: true  }
adm_culture:               { isCulture: true, type: varchar, size: 7, required:true, primaryKey: true }
adm_f_name:                { type: VARCHAR, size:100 }
adm_l_name:                { type: VARCHAR, size:100 }

when i tried to generate model with this schema.yml i throw me an error “fatal error: call to a member function getchildrencolumn() on a non-object”

but it was soon resolved. below is the changed schema.yml that generated a model without any errors:

propel:
_attributes: {noXsd: false, defaultIdMethod: none, package: lib.model}
cms_admin:
_attributes:               { phpName: Admin, isI18N: true, i18nTable: cms_admin_i18n }
adm_id:                    { type: INTEGER, required: true, primaryKey: true, autoIncrement: true}
adm_email:                 { type: VARCHAR, size:100, required: true }
adm_passwd:                { type: VARCHAR, size:100, required: true }
adm_create_date:           { type: TIMESTAMP }
adm_last_login:            { type: TIMESTAMP }
adm_last_login_ip:         { type: VARCHAR, size:100 }

cms_admin_i18n:
_attributes:               { phpName: AdminI18n }
adm_id:                    { type: INTEGER, required: true, primaryKey: true, foreignTable: cms_admin, foreignReference: adm_id }
adm_culture:               { isCulture: true, type: varchar, size: 7, required:true, primaryKey: true }
adm_f_name:                { type: VARCHAR, size:100 }
adm_l_name:                { type: VARCHAR, size:100 }

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s