propelorm / Propel2

Propel2 is an open-source high-performance Object-Relational Mapping (ORM) for modern PHP
http://propelorm.org/
MIT License
1.26k stars 397 forks source link

Is referenceOnly="false" for exteral-schema works? #890

Open jasteralan opened 9 years ago

jasteralan commented 9 years ago

I write a schema.xml like this :

<?xml version="1.0" encoding="utf-8"?>
<database name="default" defaultIdMethod="native" defaultPhpNamingMethod="underscore">
  <external-schema filename="some.xml" referenceOnly="false" />
</database>

But when I run propel sql:build. I got an default.sql with no any content. I trace the code into AbstractManager.php includeExternalSchemas method (~ line 361) :

$referenceOnly = $externalSchema->getAttribute('referenceOnly');

The $referenceOnly will be a string, so it is always be true. So, I need ti write referenceOnly="0" to force the $referenceOnly to be "false". Not sure it's a bug, or it's just because I lose something?

marcj commented 9 years ago

Obviously a bug. :)