This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » symfony 1.3 and 1.4 » Issues with propel:build on Propel 1.5
Issues with propel:build on Propel 1.5 [message #102888] Wed, 21 July 2010 18:09 Go to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Hi all

I am using Symfony 1.3.6 and Propel 1.5 on Win XP SP2, PHP 5.2.10 and Oracle 10g. I have a schema from which I can build my models, forms and filters, but if I try to build all classes together it bombs out.

This is the system behaving itself:

C:\Program Files\Apache Software Foundation\Apache2.2\sites\Newsfast\symfony13-upgrade>php symfony propel:build-model
>> schema    converting "C:/Program Files/Ap...lugin/config/schema.yml" to XML
>> schema    putting C:/Program Files/Apache...erated-sfGuardPlugin-schema.xml
>> schema    converting "C:/Program Files/Ap...lugin/config/schema.yml" to XML
>> schema    putting C:/Program Files/Apache...uardExtensionsPlugin-schema.xml
>> schema    converting "C:/Program Files/Ap...lugin/config/schema.yml" to XML
>> schema    putting C:/Program Files/Apache...ed-nfGuardMenuPlugin-schema.xml
>> schema    converting "C:/Program Files/Ap...lugin/config/schema.yml" to XML
>> schema    putting C:/Program Files/Apache...rated-nfCTrainPlugin-schema.xml
>> file+     config\generated-sfGuardPlugin-schema.xml
>> file-     C:/Program Files/Apache Softwar...erated-sfGuardPlugin-schema.xml
>> file+     config\generated-nfGuardExtensionsPlugin-schema.xml
>> file-     C:/Program Files/Apache Softwar...uardExtensionsPlugin-schema.xml
>> file+     config\generated-nfGuardMenuPlugin-schema.xml
>> file-     C:/Program Files/Apache Softwar...ed-nfGuardMenuPlugin-schema.xml
>> file+     config\generated-nfCTrainPlugin-schema.xml
>> file-     C:/Program Files/Apache Softwar...rated-nfCTrainPlugin-schema.xml
>> propel    Running "om" phing task
>> file-     C:/Program Files/Apache Softwar...erated-sfGuardPlugin-schema.xml
>> file-     C:/Program Files/Apache Softwar...ed-nfGuardMenuPlugin-schema.xml
>> file-     C:/Program Files/Apache Softwar...uardExtensionsPlugin-schema.xml
>> file-     C:/Program Files/Apache Softwar...rated-nfCTrainPlugin-schema.xml
>> autoload  Resetting application autoloaders
>> autoload  Resetting CLI autoloader

C:\Program Files\Apache Software Foundation\Apache2.2\sites\Newsfast\symfony13-upgrade>php symfony propel:build-filters
>> propel    generating filter form classes
>> tokens    C:/Program Files/Apache Softwar.../BaseFormFilterPropel.class.php
>> autoload  Resetting application autoloaders

C:\Program Files\Apache Software Foundation\Apache2.2\sites\Newsfast\symfony13-upgrade>php symfony propel:build-forms
>> propel    generating form classes
>> tokens    C:/Program Files/Apache Softwar...ade/lib/form/BaseForm.class.php
>> tokens    C:/Program Files/Apache Softwar...b/form/BaseFormPropel.class.php
>> autoload  Resetting application autoloaders
>> file-     C:/Program Files/Apache Softwar.../config/config_autoload.yml.php

OK, this is the system misbehaving:

C:\Program Files\Apache Software Foundation\Apache2.2\sites\Newsfast\symfony13-upgrade>php symfony propel:build --all-classes
>> schema    converting "C:/Program Files/Ap...lugin/config/schema.yml" to XML
>> schema    putting C:/Program Files/Apache...erated-sfGuardPlugin-schema.xml
>> schema    converting "C:/Program Files/Ap...lugin/config/schema.yml" to XML
>> schema    putting C:/Program Files/Apache...uardExtensionsPlugin-schema.xml
>> schema    converting "C:/Program Files/Ap...lugin/config/schema.yml" to XML
>> schema    putting C:/Program Files/Apache...ed-nfGuardMenuPlugin-schema.xml
>> schema    converting "C:/Program Files/Ap...lugin/config/schema.yml" to XML
>> schema    putting C:/Program Files/Apache...rated-nfCTrainPlugin-schema.xml
>> file+     config\generated-sfGuardPlugin-schema.xml
>> file-     C:/Program Files/Apache Softwar...erated-sfGuardPlugin-schema.xml
>> file+     config\generated-nfGuardExtensionsPlugin-schema.xml
>> file-     C:/Program Files/Apache Softwar...uardExtensionsPlugin-schema.xml
>> file+     config\generated-nfGuardMenuPlugin-schema.xml
>> file-     C:/Program Files/Apache Softwar...ed-nfGuardMenuPlugin-schema.xml
>> file+     config\generated-nfCTrainPlugin-schema.xml
>> file-     C:/Program Files/Apache Softwar...rated-nfCTrainPlugin-schema.xml
>> propel    Running "om" phing task
>> file-     C:/Program Files/Apache Softwar...erated-sfGuardPlugin-schema.xml
>> file-     C:/Program Files/Apache Softwar...ed-nfGuardMenuPlugin-schema.xml
>> file-     C:/Program Files/Apache Softwar...uardExtensionsPlugin-schema.xml
>> file-     C:/Program Files/Apache Softwar...rated-nfCTrainPlugin-schema.xml
>> autoload  Resetting application autoloaders
>> file-     C:/Program Files/Apache Softwar.../config/config_autoload.yml.php
>> propel    generating form classes


  Cannot fetch TableMap for undefined table: LOCATION


[?php

/**
 * Employee form base class.
 *
 * @method Employee getObject() Returns the current form's model object
 *
 * @package    ##PROJECT_NAME##
 * @subpackage form
 * @author     ##AUTHOR_NAME##
 */
abstract class BaseEmployeeForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'EMP_EMPLOYEE_NUMBER'        => new sfWidgetFormInputText(),
      'EMP_C_PEOPLE'               => new sfWidgetFormInputCheckbox(),
      'EMP_ILM'                    => new sfWidgetFormInputCheckbox(),
      'EMP_LOCATION_ID'            => new sfWidgetFormPropelChoice(
C:\Program Files\Apache Software Foundation\Apache2.2\sites\Newsfast\symfony13-upgrade>

The LocationTableMap is, incidentally, defined in the same folder as all the other tablemaps.

I am wondering if the problem is to do with the fact that the Oracle builder has named all of my columns in upper case with camel-cased PhpNames, but when it looks for a tablemap is ignoring the PhpName. Just a thought...


Remember Palestine
Re: Issues with propel:build on Propel 1.5 [message #102902 is a reply to message #102888 ] Wed, 21 July 2010 23:19 Go to previous messageGo to next message
xplo  is currently offline xplo
Messages: 428
Registered: September 2008
Faithful Member
Hello,
Looks like it s failing to find the model of your foreign key EMP_LOCATION_ID of your employe model.

I can think of 2 thing :
.check if your schema is not wrong especialy on this fk
.delete om and map subdirectory of your propel model, i had case of some old file generating errors in propel:build-all
Re: Issues with propel:build on Propel 1.5 [message #103199 is a reply to message #102888 ] Wed, 28 July 2010 15:58 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Thanks for the input. However, surely your suggestion cannot be the case if the model builds fine with "propel:build-model"?

Edit: in any case, the schema was build by Propel, by introspecting the database with "build-schema".

[Updated on: Wed, 28 July 2010 15:58]


Remember Palestine
Re: Issues with propel:build on Propel 1.5 [message #103206 is a reply to message #103199 ] Wed, 28 July 2010 17:24 Go to previous message
xplo  is currently offline xplo
Messages: 428
Registered: September 2008
Faithful Member
well i had the same problem with build-all while build-model worked but i dont remember exactly why.
i removed all the autogenerated propel file and it worked fine after, no harm doing that anyway.

build-schema is not 100% functional especially on non mysql db, i remember struggling with mssql last year, so i wouldnt be surprised if oracle support is not as good as mysql support and hence your fk definition being wrong in the schema.

Previous Topic:[SOLVED] propel - modified fields, old values
Next Topic:edit an object with a custom column in admin generator
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software