Closed kinekt4 closed 7 years ago
After editing the schema file to add either the package or namespace attribute, the build command seems to have forgotten where the schema file is.
Schema
<database name="default" defaultIdMethod="native" defaultPhpNamingMethod="underscore"> .... </database>
How to Reproduce
php app/console propel:database:reverse default cp ./generated-reversed-database/schema.xml ./src/CompanyName/AppBundle/Resource/config/. php app/console propel:model:build --connection=conn1
ERROR
Please define a package attribute or a namespace attribute for schema schema.xml
package
namespace
schema.xml
UPDATE schema.xml
<database name="default" defaultIdMethod="native" defaultPhpNamingMethod="underscore" package="src" namespace="CompanyName\AppBundle\Model">
RUN BUILD
php app/console propel:model:build --connection=conn1
No schema files were found (matching your schema fileset definition)
Work around
cp src/CompanyName/AppBundle/Resource/config/schema.xml app/cache/dev/propel/.
This issue has also been documented here: http://techiekhanna.blogspot.com.au/2015/04/propel-2-and-symfony-26.html
Env php: v 5.6 symfony: v 2.8 propel: v2.0 propel bundle: v2.0
in your database is name="default" but you try to build models for --connection=conn1
name="default"
--connection=conn1
Thanks @marcj . I think that did the trick
After editing the schema file to add either the package or namespace attribute, the build command seems to have forgotten where the schema file is.
Schema
How to Reproduce
ERROR
UPDATE schema.xml
RUN BUILD
ERROR
Work around
This issue has also been documented here: http://techiekhanna.blogspot.com.au/2015/04/propel-2-and-symfony-26.html
Env php: v 5.6 symfony: v 2.8 propel: v2.0 propel bundle: v2.0