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

  • SEARCH
  • Home
  • 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 8110169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:39:21+00:00 2026-06-06T01:39:21+00:00

Executing in method checkUnique the line $res=$select->fetchArray(); in the following class I get an

  • 0

Executing in method checkUnique the line $res=$select->fetchArray(); in the following class I get an error which I cannot solve.

I think it is due to the naming conventions zend autoloader

class Twit_Model_Owners extends Twit_Model_BaseOwners {

    function checkUnique($username) {
        $con = Doctrine_Manager::getInstance()->connection();
        $select = $con->createQuery();
        $select->from($this->getTable()->getTableName(), array('loginName'))
                ->where('loginName=?', $username);
        $res=$select->fetchArray();

        if (empty($res)) {
            return true;
        }
        return false;
    }
}

The exception:

Application error

Exception information:

Message: Couldn't find class Owners
Stack trace:

#0 /usr/share/php/Doctrine/lib/Doctrine/Table.php(256): Doctrine_Table->initDefinition()
#1 /usr/share/php/Doctrine/lib/Doctrine/Connection.php(1126): Doctrine_Table->__construct('Owners', Object(Doctrine_Connection_Mysql), true)
#2 /usr/share/php/Doctrine/lib/Doctrine/Query.php(1942): Doctrine_Connection->getTable('Owners')
#3 /usr/share/php/Doctrine/lib/Doctrine/Query.php(1740): Doctrine_Query->loadRoot('Owners', 'Owners')
#4 /usr/share/php/Doctrine/lib/Doctrine/Query/From.php(88): Doctrine_Query->load('Owners')
#5 /usr/share/php/Doctrine/lib/Doctrine/Query/Abstract.php(2077): Doctrine_Query_From->parse('Owners')
#6 /usr/share/php/Doctrine/lib/Doctrine/Query.php(1167): Doctrine_Query_Abstract->_processDqlQueryPart('from', Array)
#7 /usr/share/php/Doctrine/lib/Doctrine/Query.php(1133): Doctrine_Query->buildSqlQuery(true)
#8 /usr/share/php/Doctrine/lib/Doctrine/Query/Abstract.php(958): Doctrine_Query->getSqlQuery(Array)
#9 /usr/share/php/Doctrine/lib/Doctrine/Query/Abstract.php(1026): Doctrine_Query_Abstract->_execute(Array)
#10 /usr/share/php/Doctrine/lib/Doctrine/Query.php(267): Doctrine_Query_Abstract->execute(Array, 3)
#11 /var/www/twit/application/models/Owners.php(20): Doctrine_Query->fetchArray()
#12 /var/www/twit/application/controllers/AuthController.php(62): Twit_Model_Owners->checkUnique('a')
#13 /usr/share/php/libzend-framework-php/Zend/Controller/Action.php(516): AuthController->signupAction()
#14 /usr/share/php/libzend-framework-php/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('signupAction')
#15 /usr/share/php/libzend-framework-php/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#16 /usr/share/php/libzend-framework-php/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#17 /usr/share/php/libzend-framework-php/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#18 /var/www/twit/public/index.php(30): Zend_Application->run()
#19 {main}  

Request Parameters:

array (
  'module' => 'default',
  'controller' => 'auth',
  'action' => 'signup',
  'username' => 'a',
  'password' => 'x',
  'confirmPassword' => 'x',
  'captcha' => 
  array (
    'id' => 'ae5e3ce58bcf69e25ccdbba601029325',
    'input' => 'hen753',
  ),
  'register' => 'Sign up',
)  

I can instantiate models without problem. This is the code i use to generate models:

  Doctrine::generateModelsFromDb('/var/www/twit/application/models', array('zenddb'), array(
            'baseClassesDirectory' => '',
            'classPrefix' => 'Twit_Model_',
            'classPrefixFiles' => false
            ));

Furthermore, if you want, you can visit the sample page here and get the error by yourself here.

http://94.94.19.135/twit/public/index.php/signup
  • 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-06-06T01:39:23+00:00Added an answer on June 6, 2026 at 1:39 am

    It seems that Doctrine does not want the name of the table, as returned by $this->getTable()->getTableName()
    but the name of the object (in my case Twit_Model_Owners)
    personally I cannot understand such choice (to abstract is ok but at least the name of the tables in the query builder should be mantained), but I complain.

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

Sidebar

Related Questions

after executing post method on the server i get this error: HTTP/1.1 302 Found,
What is the most elegant way to get the currently executing method as a
Is there a way to get the name of the currently executing method in
I am executing a method of a SOAP web service which receives 3 string
I've created an extension method for SqlCommand that allows some additional work before executing
I need a component/class that throttles execution of some method to maximum M calls
In one of my aspects i have the following method: @Before(execution (* org.xx.xx.xx..*.*(@Standardized (*),..)))
I have written a thread which I've started using the start method but I'm
While executing this method: public static List<T> ToList<T>(DataTable dataTable) { Type type = typeof(T);
Im currently using C# to pass some objects to powershell and executing a method

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.