Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3241118
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:09:44+00:00 2026-05-17T18:09:44+00:00

I’m following the documentation almost word for word, except for two adjustments which I

  • 0

I’m following the documentation almost word for word, except for two adjustments which I believe are corrections.

First adjustment: I eliminate the redundant DIRECTORY_SEPARATOR in system/application/doctrine.php:

//this produces "...system/application//fixtures"
$config = array('data_fixtures_path'  =>  dirname(__FILE__) . DIRECTORY_SEPARATOR . '/fixtures',

//Replaced with:
$config = array('data_fixtures_path'  =>  dirname(__FILE__) . DIRECTORY_SEPARATOR . 'fixtures',

The resulting paths appear correct.

Second adjustment: The generated models (e.g. models/User.php) don’t seem to load the base models that extend Doctrine_Record, so I add an explicit require() call to each model like so:

require('generated/BaseUser.php');

class User extends BaseUser { ... }

So, my current problem: When it comes time to build the tables for the first time:

$ ./doctrine build-all-reload
build-all-reload - Are you sure you wish to drop your databases? (y/n)
y
build-all-reload - Successfully dropped database for connection named 'mydb'
build-all-reload - Successfully created database for connection named 'mydb'
build-all-reload - Created tables successfully
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydb.user' doesn't exist

Doctrine seems to happily empty tables, drop tables, drop databases, and create databases, but I can’t figure out why it won’t create tables. It clearly says Created tables successfully, but SHOW TABLES; returns “No tables found in database.”

Doctrine is using the same MySQL user that I am, which has ALL PRIVILEGES.

Any ideas why Doctrine can’t create tables? Hopefully I’m just blind and/or dumb.

Alternatively, is there I way I can just produce a file of SQL CREATE statements based on my yaml schema or models that I can run on my own to debug this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:09:45+00:00Added an answer on May 17, 2026 at 6:09 pm

    Maybe you have already done it but not mentioning it but you MAY be missing all the required “loading” commands. Using require is not the best solution here.

    Doctrine_Core::loadModels(realpath(dirname(__FILE__) . '/..') . DIRECTORY_SEPARATOR . 'models');
    

    This needs to be done for each directory that holds Doctrine related model files (models, basemodels, tables,…) since it does not work recursively. I had the very same problem and defining loadModels for each of my directories did the trick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.