logo
Ask your Symfony questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$20
Why does 'doctrine:build-schema' give me 'Missing class name'

I run this:

./symfony doctrine:build-schema


I get this error:

Missing class name.


Check the screenshot.

I went to Google and started looking for info about this error. I saw this thread on Google Groups.

Someone suggested the problem was in schema.yml.

Pratik Mazumder summarizes my confusion when they write:

schema.yml definition? But that's an empty file till now. I am trying to
make the same with php symfony doctrine:build-schema



Alexandre Salomé replied:

Can be because of empty file. Building a non existing schema....
OK, add a simple definition to your schema before continuing tests


I decided to delete the config/doctrine/schema.yml file and try again. But I still got the same error.

Any suggestions?

symfony version 1.4.8

[UPDATE]

Someone asked about PDO support:


 php -i | grep -i pdo
/etc/php5/cli/conf.d/pdo.ini,
/etc/php5/cli/conf.d/pdo_mysql.ini,
PDO
PDO support => enabled
PDO drivers => mysql
pdo_mysql
PDO Driver for MySQL, client library version => 5.1.37




Someone suggested that I might be using a reserved keyword as a table name. These are my table names:

mysql> show tables;

+------------------------------------------------------------------+
| Tables_in_msc_wine |
+------------------------------------------------------------------+
| appellation |
| bottle_size |
| color |
| contact |
| container |
| country |
| grape |
| importer |
| importers |
| many_to_many_map_of_content_to_content |
| many_to_many_map_of_messages_for_outside_organization_to_content |
| many_to_many_map_of_restrictions_to_content |
| many_to_many_map_of_to_do_to_content |
| many_to_many_map_wine_to_importer |
| media |
| messages_for_outside_organization |
| note |
| note_version |
| publishing_history |
| region |
| restrictions_on_use |
| sf_guard_forgot_password |
| sf_guard_group |
| sf_guard_group_permission |
| sf_guard_permission |
| sf_guard_remember_key |
| sf_guard_user |
| sf_guard_user_group |
| sf_guard_user_permission |
| sub_type |
| tag |
| tagging |
| taster_coverage |
| tasting_group |
| tastingnotes |
| to_do |
| type |
| wine |
| winery |
+------------------------------------------------------------------+
39 rows in set (0.05 sec)



[UPDATE]

Interesting. I deleted every table in the database and then recreated just the first 2 tables:


SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';


-- -----------------------------------------------------
-- Table `country`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `country` ;

CREATE TABLE IF NOT EXISTS `country` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT ,
`name` VARCHAR(255) NULL DEFAULT NULL ,
PRIMARY KEY (`id`) ,
UNIQUE KEY (`id`)
)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;


-- -----------------------------------------------------
-- Table `sf_guard_user`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `sf_guard_user` ;

CREATE TABLE IF NOT EXISTS `sf_guard_user` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT ,
`first_name` VARCHAR(255) NOT NULL ,
`last_name` VARCHAR(255) NOT NULL ,
`email_address` VARCHAR(255) NOT NULL ,
`username` VARCHAR(128) NOT NULL ,
`algorithm` VARCHAR(128) NOT NULL DEFAULT 'sha1' ,
`salt` VARCHAR(128) NOT NULL ,
`password` VARCHAR(128) NOT NULL ,
`is_active` TINYINT(1) NULL DEFAULT '1' ,
`is_super_admin` TINYINT(1) NULL DEFAULT '0' ,
`last_login` DATETIME NOT NULL ,
`created_at` DATETIME NOT NULL ,
`updated_at` DATETIME NOT NULL ,
PRIMARY KEY (`id`) ,
UNIQUE KEY (`id`),
UNIQUE INDEX `email_address` (`email_address` ASC) ,
UNIQUE INDEX `username` (`username` ASC) ,
INDEX `is_active_idx_idx` (`is_active` ASC) )
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;


Then I run:

./symfony doctrine:build-schema


and I get the error:

Couldn't find class Content 


I wonder if this has something to do with running in the sandbox?

This is the first page that comes up on Google for this error:

http://melikedev.com/2009/12/09/symfony-w-doctrine-saving-many-to-many-mm-relationships/


[UPDATE]

I've uploaded the entire schema. Can anyone load this into a database and then run doctrine:build-schema?


[UPDATE]

Maybe this problem has a solution, but I do not want to spend any more time looking for it. I will remove the foreign key constraints from the MySql schema. I will try to enforce the foreign keys from the Symfony schema.

This question has been answered.

attachment image View Attachment

Lawrence Krubner | 11/17/10 at 5:09pm Edit

Previous versions of this question: 11/18/10 at 11:52am | 11/18/10 at 11:53am | 11/18/10 at 2:29pm | 11/18/10 at 2:30pm | 11/18/10 at 3:20pm | 11/19/10 at 6:11pm | 11/20/10 at 7:43pm

(5) Possible Answers Submitted...

See a chronological view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    11/17/10
    5:32pm
    Nate Flink says:

    Anything that ends with "schema.yml" as in "whatever_schema.yml" can be picked up by the build tasks.

    Also, sometimes schema.xml files are created that it might be useful to delete/clean.

    Also, ./symfony cc is always worth a college try

    • 11/18/10 11:59am

      Nate Flink says:

      Also, you might want to try to re-adding the schema.yml, with a single table called "foo" with an id field, to rule out that it has something to do with the schema.yml stuff.

    • 11/18/10 12:13pm

      Lawrence Krubner says:

      You mean to see if Symfony is able to over write the file?

    • 11/18/10 2:51pm

      Nate Flink says:

      try renaming the "type" table. Some symfony code might be choking on that one.

    • 11/18/10 3:01pm

      Lawrence Krubner says:

      Nate,

      Good thought, but that didn't work. I changed the name of 'type' but I still get the "Missing class name" error. Here are the new table names:


      mysql> show tables;
      +------------------------------------------------------------------+
      | appellation |
      | bottle_size |
      | color |
      | contact |
      | container |
      | country |
      | grape |
      | importer |
      | importers |
      | many_to_many_map_of_content_to_content |
      | many_to_many_map_of_messages_for_outside_organization_to_content |
      | many_to_many_map_of_restrictions_to_content |
      | many_to_many_map_of_to_do_to_content |
      | many_to_many_map_wine_to_importer |
      | media |
      | messages_for_outside_organization |
      | note |
      | note_version |
      | publishing_history |
      | region |
      | restrictions_on_use |
      | sf_guard_forgot_password |
      | sf_guard_group |
      | sf_guard_group_permission |
      | sf_guard_permission |
      | sf_guard_remember_key |
      | sf_guard_user |
      | sf_guard_user_group |
      | sf_guard_user_permission |
      | sub_type |
      | tag |
      | tagging |
      | taster_coverage |
      | tasting_group |
      | tastingnotes |
      | to_do |
      | type_of_wine |
      | wine |
      | winery |
      +------------------------------------------------------------------+
      39 rows in set (0.00 sec)

    • 11/18/10 3:23pm

      Nate Flink says:

      Can you run other tasks? Is it possible that you have another task somewhere that has some incomplete code fragments?

      Is it possible that one of the names of one of the indices is wonky?

      Can you run build model without error?

      Can you take the exact same schema, dump it in a vanilla project and build it?

      If so, can you systematically add tables to the schema until you find the failure point?

    • 11/18/10 3:41pm

      Lawrence Krubner says:

      Nate,

      I just updated the question above. I deleted all tables and then added 2 back into the database. Then I ran the command again and got a different error.

      To answer your questions:

      Is it possible that one of the names of one of the indices is wonky?

      Do you mean foreign key indexes? Yes, possible, though I have checked them a dozen times already.


      Can you run build model without error?

      The model needs a schema.yml, which I do not have.


      Can you take the exact same schema, dump it in a vanilla project and build it?

      I would need a schema.yml, wouldn't I? And I can't get one. That is the problem.

  • avatar
    Last edited:
    11/17/10
    5:51pm
    Aleksandr Nosov says:

    doctrine:build-schema create a new schema.yml file in config/doctrine/ from existing database. So check your database config.

    • 11/17/10 7:18pm

      Lawrence Krubner says:

      Interesting thought. But the database connection was working yesterday, and I have not changed the configuration. I have since deleted all tables and recreated them, but the name of the database has not changed, nor has the username or password.

  • avatar
    Last edited:
    11/20/10
    7:44pm
    Loban Rahman says:

    Make sure your /config/doctrine folder is empty of all yml files.

    Please post the following things, it will help debug:

    (1) A sql dump of your database structure (just structure, no data)
    (2) Your database.yml file
    (3) The output when you run "symfony --trace doctrine:build-schema"

    • 11/18/10 12:15pm

      Lawrence Krubner says:

      Interesting. This is what I get:

      ./symfony --trace doctrine:build-schema

      >> doctrine generating yaml schema from database
      >> Doctrine_Connection_Mysql exec : SET NAMES 'UTF8' - ()
      >> Doctrine_Connection_Mysql query : SHOW TABLES - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE appellation - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'appellation' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE bottle_size - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'bottle_size' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE color - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'color' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE contact - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'contact' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE container - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'container' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE country - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'country' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE grape - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'grape' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE importer - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'importer' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE importers - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'importers' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE many_to_many_map_of_content_to_content - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'many_to_many_map_of_content_to_content' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE many_to_many_map_of_messages_for_outside_organization_to_content - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'many_to_many_map_of_messages_for_outside_organization_to_content' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE many_to_many_map_of_restrictions_to_content - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'many_to_many_map_of_restrictions_to_content' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE many_to_many_map_of_to_do_to_content - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'many_to_many_map_of_to_do_to_content' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE many_to_many_map_wine_to_importer - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'many_to_many_map_wine_to_importer' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE media - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'media' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE messages_for_outside_organization - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'messages_for_outside_organization' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE note - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'note' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE note_version - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'note_version' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE publishing_history - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'publishing_history' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE region - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'region' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE restrictions_on_use - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'restrictions_on_use' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE sf_guard_forgot_password - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'sf_guard_forgot_password' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE sf_guard_group - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'sf_guard_group' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE sf_guard_group_permission - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'sf_guard_group_permission' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE sf_guard_permission - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'sf_guard_permission' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE sf_guard_remember_key - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'sf_guard_remember_key' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE sf_guard_user - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'sf_guard_user' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE sf_guard_user_group - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'sf_guard_user_group' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE sf_guard_user_permission - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'sf_guard_user_permission' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE sub_type - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'sub_type' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE tag - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'tag' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE tagging - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'tagging' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE taster_coverage - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'taster_coverage' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE tasting_group - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'tasting_group' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE tastingnotes - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'tastingnotes' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE to_do - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'to_do' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE type - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'type' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE wine - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'wine' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()
      >> Doctrine_Connection_Mysql query : DESCRIBE winery - ()
      >> Doctrine_Connection_Mysql query : SELECT DATABASE() - ()
      >> Doctrine_Connection_Mysql query : SELECT column_name, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM information_schema.key_column_usage WHERE table_name = 'winery' AND table_schema = 'msc_wine' and REFERENCED_COLUMN_NAME is not NULL - ()

    • 11/18/10 2:55pm

      Lawrence Krubner says:

      Looking at the above output, it seems correct. Those are all of the tables.

    • 11/19/10 1:46am

      Loban Rahman says:

      ??? Where's the "missing class name" error message? Did you paste the entire output of the "symfony --trace doctrine:build-schema" command?

    • 11/19/10 1:54am

      Loban Rahman says:

      Your last UPDATE made my think of something. Follow these steps please:

      (1) Remove any schema file in config/doctrine
      (2) ./symfony cc
      (3) ./symfony doctrine:clean-model-files
      (4) ./symfony cc
      (5) ./symfony doctrine:build-schema

      I've found that having old model files lying around always causes issues. Even after doing step #3, please check your lib/*/doctrine folders to make sure no spurious files are lying around and being auto-loaded.

    • 11/19/10 4:47am

      Loban Rahman says:

      I see that you are using the sandbox. Doesn't it come with a default schema and tables? It all the more makes me think you have stale model files lying around.

    • 11/19/10 1:10pm

      Lawrence Krubner says:

      Loban,

      Thanks. Your 5 step program fixed the error I was having with "Couldn't find class Content".

      That was the error I got with half schema loaded.

      However, when I went back to testing against the entire schema, the original error, " Missing class name" returned.

  • avatar
    Last edited:
    11/19/10
    3:55am
    szemian says:

    I vaguely recall that I have had this problem before.

    If not mistaken, mine was triggered when I had a tablename in the db that is a reserved word of MySQL, and it was solved by setting the doctrine attribute ATTR_QUOTE_IDENTIFIER to true in the ProjectConfiguration:


    public function configureDoctrine(Doctrine_Manager $manager)
    {
    $manager->setAttribute(Doctrine::ATTR_QUOTE_IDENTIFIER, true);
    }


    UPDATE:

    I am unable to find the link to answer the question you asked me, so I just edit it here. It is a bad practice to name a table with reserved word, but is possible with you quote it as stated on the MySQL reference:


    CREATE TABLE `interval` (begin INT, end INT);


    http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html

    Previous versions of this answer: 11/19/10 at 3:55am

    • 11/18/10 2:25pm

      Lawrence Krubner says:

      Szemian,

      Why would MySql create a table with a name that is a reserved keyword? Would that throw an error? I mean, MySql would throw an error, yes?

  • avatar
    Last edited:
    11/20/10
    7:44pm
    Tejaswi Sharma says:

    Some one wrote in this forum http://oldforum.symfony-project.org/index.php/t/22732/


    Hi,

    I have same problem, but in my case, the problem was in the relationship references.It because, after create DER in MySql Workbench, I change the name of tables manually in sql script, but don't change de relationship references, and run it with this error, MySQL don't complained. Then I have this error from symfony:doctrine:build-schema task. The solution was alter tables relationships references.

    Hope it helps.


    Is this the case with you?

    • 11/18/10 2:48pm

      Lawrence Krubner says:

      That could be. I created the schema with MySql WorkBench, then made some changes by hand.

    • 11/18/10 2:54pm

      Tejaswi Sharma says:

      If that could be the case, could you also give the dump of your database structure(no data) so that I could test it on my machine too.

    • 11/18/10 3:42pm

      Lawrence Krubner says:

      I deleted all the tables and added 2 back in. Now I am getting a different error. I updated the question, up above, with the schema of the 2 tables that I recreated.

    • 11/18/10 3:58pm

      Tejaswi Sharma says:

      Lawrence , One thing I could tell you for sure that there is no problem in your db structure because in my machine the build command ran just fine.


      tejaswi@tejaswi-Compaq-510:~/BrijjSetup_upgraded$ /usr/local/php5_3/bin/php ./symfony doctrine:build-schema>> doctrine generating yaml schema from database
      >> doctrine Generate YAML schema successfully from database


      You may have issue with the sandbox itself. Why don't you create a normal setup other than sandbox and then try

    • 11/18/10 4:01pm

      Tejaswi Sharma says:

      The generated schema.yml is here

    • 11/18/10 4:03pm

      Tejaswi Sharma says:

      Sorry it denied to accept yml files so I renamed it to txt

      Attached Image

    • 11/18/10 4:48pm

      Lawrence Krubner says:

      Interesting that it worked for you. I am now getting a fatal error, and the path points to the sandbox:

      ./symfony doctrine:build-schema
      >> doctrine generating yaml schema from database


      Couldn't find class Content



      Fatal error: Call to a member function evictAll() on a non-object in /home/lkrubner/dev/tastingnotes/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 1239



      I have to use a sandbox for this project. The server has Symfony 1.0 installed, and several websites depend on that. I'm trying to build my new project with Symfony 1.4, but I need to use a sandbox version.

    • 11/18/10 4:51pm

      Lawrence Krubner says:

      Now I'm using this much of the schema:



      SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
      SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
      SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';


      -- -----------------------------------------------------
      -- Table `country`
      -- -----------------------------------------------------
      DROP TABLE IF EXISTS `country` ;

      CREATE TABLE IF NOT EXISTS `country` (
      `id` BIGINT(20) NOT NULL AUTO_INCREMENT ,
      `name` VARCHAR(255) NULL DEFAULT NULL ,
      PRIMARY KEY (`id`) ,
      UNIQUE KEY (`id`)
      )
      ENGINE = InnoDB
      DEFAULT CHARACTER SET = utf8;


      -- -----------------------------------------------------
      -- Table `sf_guard_user`
      -- -----------------------------------------------------
      DROP TABLE IF EXISTS `sf_guard_user` ;

      CREATE TABLE IF NOT EXISTS `sf_guard_user` (
      `id` BIGINT(20) NOT NULL AUTO_INCREMENT ,
      `first_name` VARCHAR(255) NOT NULL ,
      `last_name` VARCHAR(255) NOT NULL ,
      `email_address` VARCHAR(255) NOT NULL ,
      `username` VARCHAR(128) NOT NULL ,
      `algorithm` VARCHAR(128) NOT NULL DEFAULT 'sha1' ,
      `salt` VARCHAR(128) NOT NULL ,
      `password` VARCHAR(128) NOT NULL ,
      `is_active` TINYINT(1) NULL DEFAULT '1' ,
      `is_super_admin` TINYINT(1) NULL DEFAULT '0' ,
      `last_login` DATETIME NOT NULL ,
      `created_at` DATETIME NOT NULL ,
      `updated_at` DATETIME NOT NULL ,
      PRIMARY KEY (`id`) ,
      UNIQUE KEY (`id`),
      UNIQUE INDEX `email_address` (`email_address` ASC) ,
      UNIQUE INDEX `username` (`username` ASC) ,
      INDEX `is_active_idx_idx` (`is_active` ASC) )
      ENGINE = InnoDB
      DEFAULT CHARACTER SET = utf8;


      -- -----------------------------------------------------
      -- Table `to_do`
      -- -----------------------------------------------------
      DROP TABLE IF EXISTS `to_do` ;

      CREATE TABLE IF NOT EXISTS `to_do` (
      `id` BIGINT(20) NOT NULL AUTO_INCREMENT ,
      `created_at` DATETIME NOT NULL ,
      `updated_at` DATETIME NOT NULL ,
      `created_by` BIGINT(20) NOT NULL ,
      `updated_by` BIGINT(20) NOT NULL ,
      `note` TEXT NOT NULL ,
      `who_is_responsible` BIGINT(20) NOT NULL ,
      `deadline` DATETIME NOT NULL ,
      `subject` VARCHAR(255) NULL DEFAULT NULL ,
      PRIMARY KEY (`id`) ,
      UNIQUE KEY (`id`),
      INDEX `to_do_created_by` (`created_by` ASC) ,
      INDEX `to_do_updated_by` (`updated_by` ASC) ,
      INDEX `to_do_who_is_responsible` (`who_is_responsible` ASC) ,
      CONSTRAINT `to_do_created_by`
      FOREIGN KEY (`created_by` )
      REFERENCES `sf_guard_user` (`id` ),
      CONSTRAINT `to_do_updated_by`
      FOREIGN KEY (`updated_by` )
      REFERENCES `sf_guard_user` (`id` ),
      CONSTRAINT `to_do_who_is_responsible`
      FOREIGN KEY (`who_is_responsible` )
      REFERENCES `sf_guard_user` (`id` )
      )
      ENGINE = InnoDB
      DEFAULT CHARACTER SET = utf8;



      -- -----------------------------------------------------
      -- Table `messages_for_outside_organization`
      -- -----------------------------------------------------
      DROP TABLE IF EXISTS `messages_for_outside_organization` ;

      CREATE TABLE IF NOT EXISTS `messages_for_outside_organization` (
      `id` BIGINT(20) NOT NULL AUTO_INCREMENT ,
      `created_by` INT(11) NOT NULL ,
      `updated_by` INT(11) NOT NULL ,
      `created_at` DATETIME NOT NULL ,
      `updated_at` DATETIME NOT NULL ,
      `note` TEXT NOT NULL ,
      PRIMARY KEY (`id`) )
      ENGINE = InnoDB
      DEFAULT CHARACTER SET = utf8;



      -- -----------------------------------------------------
      -- Table `importer`
      -- -----------------------------------------------------
      DROP TABLE IF EXISTS `importer` ;

      CREATE TABLE IF NOT EXISTS `importer` (
      `id` BIGINT(20) NOT NULL AUTO_INCREMENT ,
      `found_count_from_tastings` VARCHAR(255) NOT NULL ,
      `address` VARCHAR(255) NOT NULL ,
      `address2` VARCHAR(255) NOT NULL ,
      `address2and` VARCHAR(255) NOT NULL ,
      `address2more` VARCHAR(255) NOT NULL ,
      `addressand` VARCHAR(255) NOT NULL ,
      `addressmore` VARCHAR(255) NOT NULL ,
      `alsace` tinyint(1) NOT NULL ,
      `argentina` tinyint(1) NOT NULL ,
      `australia` tinyint(1) NOT NULL ,
      `austria` tinyint(1) NOT NULL ,
      `bordeaux` tinyint(1) NOT NULL ,
      `burgundy` tinyint(1) NOT NULL ,
      `champagne` tinyint(1) NOT NULL ,
      `chile` tinyint(1) NOT NULL ,
      `city` VARCHAR(255) NOT NULL ,
      `country` VARCHAR(255) NOT NULL ,
      `germany` tinyint(1) NOT NULL ,
      `name` VARCHAR(255) NOT NULL ,
      `name2` VARCHAR(255) NOT NULL ,
      `languedoc` tinyint(1) NOT NULL ,
      `loire` tinyint(1) NOT NULL ,
      `new_zealand` tinyint(1) NOT NULL ,
      `notes` TEXT NOT NULL ,
      `other_france` tinyint(1) NOT NULL ,
      `other_italy` tinyint(1) NOT NULL ,
      `phone` VARCHAR(255) NOT NULL ,
      `phone2` VARCHAR(255) NOT NULL ,
      `piedmont` tinyint(1) NOT NULL ,
      `portugal` tinyint(1) NOT NULL ,
      `rhone` tinyint(1) NOT NULL ,
      `south_africa` tinyint(1) NOT NULL ,
      `spain` tinyint(1) NOT NULL ,
      `state` VARCHAR(255) NOT NULL ,
      `state2` VARCHAR(255) NOT NULL ,
      `tuscany` tinyint(1) NOT NULL ,
      `venetone` tinyint(1) NOT NULL ,
      `website` VARCHAR(255) NOT NULL ,
      `winery` VARCHAR(255) NOT NULL ,
      `wineryimporter` VARCHAR(255) NOT NULL ,
      `zip` VARCHAR(255) NOT NULL ,
      `zip2` VARCHAR(255) NOT NULL ,
      `areacode` VARCHAR(255) NOT NULL ,
      `areacode2` VARCHAR(255) NOT NULL ,
      `france` tinyint(1) NOT NULL ,
      `impcode` VARCHAR(255) NOT NULL ,
      `italy` tinyint(1) NOT NULL ,
      `record_id` VARCHAR(255) NOT NULL ,
      `wineryimporter_check` VARCHAR(255) NOT NULL ,
      `wineryimporter_name` VARCHAR(255) NOT NULL ,
      `export_record_id` VARCHAR(255) NOT NULL ,
      `created_at` DATETIME NOT NULL ,
      `updated_at` DATETIME NOT NULL ,
      `country_id` BIGINT(20) NOT NULL ,
      `created_by` BIGINT(20) NOT NULL ,
      `updated_by` BIGINT(20) NOT NULL ,
      PRIMARY KEY (`id`) ,
      UNIQUE KEY (`id`),
      INDEX `importer_country_id` (`country_id` ASC) ,
      INDEX `importer_created_by` (`created_by` ASC) ,
      INDEX `importer_updated_by` (`updated_by` ASC) ,
      CONSTRAINT `importer_constraint_country_id`
      FOREIGN KEY (`country_id` )
      REFERENCES `country` (`id` )
      ,
      CONSTRAINT `importer_constraint_created_by`
      FOREIGN KEY (`created_by` )
      REFERENCES `sf_guard_user` (`id` )
      ,
      CONSTRAINT `importer_constraint_updated_by`
      FOREIGN KEY (`updated_by` )
      REFERENCES `sf_guard_user` (`id` )
      )
      ENGINE = InnoDB
      DEFAULT CHARACTER SET = utf8;


      -- -----------------------------------------------------
      -- Table `sf_guard_forgot_password`
      -- -----------------------------------------------------
      DROP TABLE IF EXISTS `sf_guard_forgot_password` ;

      CREATE TABLE IF NOT EXISTS `sf_guard_forgot_password` (
      `id` BIGINT(20) NOT NULL AUTO_INCREMENT ,
      `user_id` BIGINT(20) NOT NULL ,
      `unique_key` VARCHAR(255) NOT NULL ,
      `expires_at` DATETIME NOT NULL ,
      `created_at` DATETIME NOT NULL ,
      `updated_at` DATETIME NOT NULL ,
      PRIMARY KEY (`id`) ,
      UNIQUE KEY (`id`),
      INDEX `user_id_idx` (`user_id` ASC) ,
      CONSTRAINT `sf_guard_forgot_password_user_id_sf_guard_user_id`
      FOREIGN KEY (`user_id` )
      REFERENCES `sf_guard_user` (`id` )
      ON DELETE CASCADE)
      ENGINE = InnoDB
      DEFAULT CHARACTER SET = utf8;


      -- -----------------------------------------------------
      -- Table `sf_guard_group`
      -- -----------------------------------------------------
      DROP TABLE IF EXISTS `sf_guard_group` ;

      CREATE TABLE IF NOT EXISTS `sf_guard_group` (
      `id` BIGINT(20) NOT NULL AUTO_INCREMENT ,
      `name` VARCHAR(255) NOT NULL ,
      `description` TEXT NOT NULL ,
      `created_at` DATETIME NOT NULL ,
      `updated_at` DATETIME NOT NULL ,
      PRIMARY KEY (`id`) ,
      UNIQUE KEY (`id`),
      UNIQUE INDEX `name` (`name` ASC) )
      ENGINE = InnoDB
      DEFAULT CHARACTER SET = utf8;


      -- -----------------------------------------------------
      -- Table `sf_guard_permission`
      -- -----------------------------------------------------
      DROP TABLE IF EXISTS `sf_guard_permission` ;

      CREATE TABLE IF NOT EXISTS `sf_guard_permission` (
      `id` BIGINT(20) NOT NULL AUTO_INCREMENT ,
      `name` VARCHAR(255) NOT NULL ,
      `description` TEXT NOT NULL ,
      `created_at` DATETIME NOT NULL ,
      `updated_at` DATETIME NOT NULL ,
      PRIMARY KEY (`id`) ,
      UNIQUE KEY (`id`),
      UNIQUE INDEX `name` (`name` ASC) )
      ENGINE = InnoDB
      DEFAULT CHARACTER SET = utf8;


      -- -----------------------------------------------------
      -- Table `sf_guard_group_permission`
      -- -----------------------------------------------------
      DROP TABLE IF EXISTS `sf_guard_group_permission` ;

      CREATE TABLE IF NOT EXISTS `sf_guard_group_permission` (
      `group_id` BIGINT(20) NOT NULL DEFAULT '0' ,
      `permission_id` BIGINT(20) NOT NULL DEFAULT '0' ,
      `created_at` DATETIME NOT NULL ,
      `updated_at` DATETIME NOT NULL ,
      PRIMARY KEY (`group_id`, `permission_id`) ,
      INDEX `sf_guard_group_permission_permission_id_sf_guard_permission_id` (`permission_id` ASC) ,
      CONSTRAINT `sf_guard_group_permission_group_id_sf_guard_group_id`
      FOREIGN KEY (`group_id` )
      REFERENCES `sf_guard_group` (`id` )
      ON DELETE CASCADE,
      CONSTRAINT `sf_guard_group_permission_permission_id_sf_guard_permission_id`
      FOREIGN KEY (`permission_id` )
      REFERENCES `sf_guard_permission` (`id` )
      ON DELETE CASCADE)
      ENGINE = InnoDB
      DEFAULT CHARACTER SET = utf8;


      -- -----------------------------------------------------
      -- Table `sf_guard_remember_key`
      -- -----------------------------------------------------
      DROP TABLE IF EXISTS `sf_guard_remember_key` ;

      CREATE TABLE IF NOT EXISTS `sf_guard_remember_key` (
      `id` BIGINT(20) NOT NULL AUTO_INCREMENT ,
      `user_id` BIGINT(20) NOT NULL ,
      `remember_key` VARCHAR(32) NOT NULL ,
      `ip_address` VARCHAR(50) NOT NULL ,
      `created_at` DATETIME NOT NULL ,
      `updated_at` DATETIME NOT NULL ,
      PRIMARY KEY (`id`) ,
      UNIQUE KEY (`id`),
      INDEX `user_id_idx` (`user_id` ASC) ,
      CONSTRAINT `sf_guard_remember_key_user_id_sf_guard_user_id`
      FOREIGN KEY (`user_id` )
      REFERENCES `sf_guard_user` (`id` )
      ON DELETE CASCADE)
      ENGINE = InnoDB
      DEFAULT CHARACTER SET = utf8;


      -- -----------------------------------------------------
      -- Table `sf_guard_user_group`
      -- -----------------------------------------------------
      DROP TABLE IF EXISTS `sf_guard_user_group` ;

      CREATE TABLE IF NOT EXISTS `sf_guard_user_group` (
      `user_id` BIGINT(20) NOT NULL DEFAULT '0' ,
      `group_id` BIGINT(20) NOT NULL DEFAULT '0' ,
      `created_at` DATETIME NOT NULL ,
      `updated_at` DATETIME NOT NULL ,
      PRIMARY KEY (`user_id`, `group_id`) ,
      INDEX `sf_guard_user_group_group_id_sf_guard_group_id` (`group_id` ASC) ,
      CONSTRAINT `sf_guard_user_group_group_id_sf_guard_group_id`
      FOREIGN KEY (`group_id` )
      REFERENCES `sf_guard_group` (`id` )
      ON DELETE CASCADE,
      CONSTRAINT `sf_guard_user_group_user_id_sf_guard_user_id`
      FOREIGN KEY (`user_id` )
      REFERENCES `sf_guard_user` (`id` )
      ON DELETE CASCADE)
      ENGINE = InnoDB
      DEFAULT CHARACTER SET = utf8;


      -- -----------------------------------------------------
      -- Table `sf_guard_user_permission`
      -- -----------------------------------------------------
      DROP TABLE IF EXISTS `sf_guard_user_permission` ;

      CREATE TABLE IF NOT EXISTS `sf_guard_user_permission` (
      `user_id` BIGINT(20) NOT NULL DEFAULT '0' ,
      `permission_id` BIGINT(20) NOT NULL DEFAULT '0' ,
      `created_at` DATETIME NOT NULL ,
      `updated_at` DATETIME NOT NULL ,
      PRIMARY KEY (`user_id`, `permission_id`) ,
      INDEX `sf_guard_user_permission_permission_id_sf_guard_permission_id` (`permission_id` ASC) ,
      CONSTRAINT `sf_guard_user_permission_permission_id_sf_guard_permission_id`
      FOREIGN KEY (`permission_id` )
      REFERENCES `sf_guard_permission` (`id` )
      ON DELETE CASCADE,
      CONSTRAINT `sf_guard_user_permission_user_id_sf_guard_user_id`
      FOREIGN KEY (`user_id` )
      REFERENCES `sf_guard_user` (`id` )
      ON DELETE CASCADE)
      ENGINE = InnoDB
      DEFAULT CHARACTER SET = utf8;


      -- -----------------------------------------------------
      -- Table `tag`
      -- -----------------------------------------------------
      DROP TABLE IF EXISTS `tag` ;

      CREATE TABLE IF NOT EXISTS `tag` (
      `id` BIGINT(20) NOT NULL AUTO_INCREMENT ,
      `name` VARCHAR(100) NOT NULL ,
      `is_triple` TINYINT(1) NOT NULL ,
      `triple_namespace` VARCHAR(100) NOT NULL ,
      `triple_key` VARCHAR(100) NOT NULL ,
      `triple_value` VARCHAR(100) NOT NULL ,
      PRIMARY KEY (`id`) ,
      UNIQUE KEY (`id`),
      INDEX `name_idx` (`name` ASC) ,
      INDEX `triple1_idx` (`triple_namespace` ASC) ,
      INDEX `triple2_idx` (`triple_key` ASC) ,
      INDEX `triple3_idx` (`triple_value` ASC) )
      ENGINE = InnoDB
      DEFAULT CHARACTER SET = utf8;


      -- -----------------------------------------------------
      -- Table `tagging`
      -- -----------------------------------------------------
      DROP TABLE IF EXISTS `tagging` ;

      CREATE TABLE IF NOT EXISTS `tagging` (
      `id` BIGINT(20) NOT NULL AUTO_INCREMENT ,
      `tag_id` BIGINT(20) NOT NULL ,
      `taggable_model` VARCHAR(30) NOT NULL ,
      `taggable_id` BIGINT(20) NOT NULL ,
      PRIMARY KEY (`id`) ,
      UNIQUE KEY (`id`),
      INDEX `tag_idx` (`tag_id` ASC) ,
      INDEX `taggable_idx` (`taggable_model` ASC, `taggable_id` ASC) )
      ENGINE = InnoDB
      DEFAULT CHARACTER SET = utf8;


      I still get the same fatal error:


      Fatal error: Call to a member function evictAll() on a non-object in /home/lkrubner/dev/tastingnotes/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 1239


      Does this happen to you?

    • 11/18/10 5:12pm

      Tejaswi Sharma says:

      This db schema also worked fine for me


      tejaswi@tejaswi-Compaq-510:~/BrijjSetup_upgraded$ /usr/local/php5_3/bin/php ./symfony doctrine:build-schema
      >> doctrine generating yaml schema from database
      >> doctrine Generate YAML schema successfully from database

      Its very easy to setup symfony for a single project also apart from what version of symfony is installed on your server. Follow these simple steps.

      1. Create a projecr dir eg myproject.
      2. Create a lib/vendor dir into myproject folder
      3. Exract symfony source into folder myproject/lib/vendor/symfony
      4. Create your project by running this command
      php lib/vendor/symfony/data/bin/symfony generate:project <PROJECT_NAME>
      5. Setup your database by running this command
      php symfony configure:database "mysql:host=localhost;dbname=dbname" <username> <password>
      6. Now you can build your schema by command ./symfony doctrine:build-schema


      This symfony version will be local to your project like in the sandbox you are using

    • 11/18/10 5:18pm

      Tejaswi Sharma says:

      Get your symfony source from here
      http://www.symfony-project.org/get/symfony-1.4.8.tgz

    • 11/18/10 5:24pm

      Tejaswi Sharma says:

      I am going off to bed because its 4 o' clock in the morning now. I will see you tomorrow but please let know about the updates.

    • 11/18/10 5:29pm

      Lawrence Krubner says:

      I think what you outline above is pretty much what I did to set up my Symfony project to run as 1.4 locally. I can not think of what step I might have done wrong.

    • 11/19/10 12:18am

      Tejaswi Sharma says:

      Lawrence, If its not overwhelming I would like to have a temporary ssh connection to your machine. I cannot thing of a situation that why this particular setup should not work.

This question has expired.





Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.