Question

I've had a look around the site and can't find any similar cases. However, I am getting the following error message when running propel:model:build in the console. (please note this xml is from using the reverse schema command and then transfered to schema.xml):

[RuntimeException]
SiteMobileBundle : Please define a package attribute or a namespace att ribute for schema schema.xml

Below is the start of my schema.xml

<database name="default"
          namespace="Site\MobileBundle\Model"
          defaultIdMethod="native"
>
<table name="additional_photos" phpName="AdditionalPhotos" idMethod="native">
    <column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
    <column name="type" phpName="Type" type="VARCHAR" size="50" required="true"/>
    <column name="thumbnail" phpName="Thumbnail" type="VARCHAR" size="100" required="true"/>
    <column name="image" phpName="Image" type="VARCHAR" size="100" required="true"/>
    <vendor type="mysql">
      <parameter name="Engine" value="MyISAM"/>
    </vendor>
  </table>

As you can see, the namespace has been set in the schema.xml, does anyone know why this error appears?

Thank you in advance.

Was it helpful?

Solution

Turns out I Wasn't looking up high enough in the stack trace, right at the top it stated that autoIncrement had been redefined, upon seeing this i noticed that one of my columns had auto-increment in the column twice.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top