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 924753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:24:38+00:00 2026-05-15T19:24:38+00:00

In table class Ouders I do the following query: $q = $this->createQuery(‘o’) ->where(‘o.ouderid IN

  • 0

In table class Ouders I do the following query:

$q = $this->createQuery('o')
    ->where('o.ouderid IN (SELECT DISTINCT k.parentid FROM Kinderen k WHERE k.schoolid = ?)', $schoolcode)
    ->orderBy('o.achternaam');

As you can see it has a subquery to the table class Kinderen.

Why does it give the error?:

An error occurred
Application error
Exception information:

Message: Couldn't find class Kinderen
Stack trace:

#0 /var/www/bredeschool/app/library/Doctrine/Table.php(256): Doctrine_Table->initDefinition()
#1 /var/www/bredeschool/app/library/Doctrine/Connection.php(1126): Doctrine_Table->__construct('Kinderen', Object(Doctrine_Connection_Mysql), true)
#2 /var/www/bredeschool/app/library/Doctrine/Query.php(1934): Doctrine_Connection->getTable('Kinderen')
#3 /var/www/bredeschool/app/library/Doctrine/Query.php(1732): Doctrine_Query->loadRoot('Kinderen', 'k')
#4 /var/www/bredeschool/app/library/Doctrine/Query/From.php(88): Doctrine_Query->load('Kinderen k')
#5 /var/www/bredeschool/app/library/Doctrine/Query/Abstract.php(2077): Doctrine_Query_From->parse('Kinderen k')
#6 /var/www/bredeschool/app/library/Doctrine/Query.php(1160): Doctrine_Query_Abstract->_processDqlQueryPart('from', Array)
#7 /var/www/bredeschool/app/library/Doctrine/Query.php(1126): Doctrine_Query->buildSqlQuery(true)
#8 /var/www/bredeschool/app/library/Doctrine/Query.php(843): Doctrine_Query->getSqlQuery()
#9 /var/www/bredeschool/app/library/Doctrine/Query.php(813): Doctrine_Query->parseSubquery('(SELECT DISTINC...')
#10 /var/www/bredeschool/app/library/Doctrine/Query.php(697): Doctrine_Query->parseFunctionExpression('(SELECT DISTINC...')
#11 /var/www/bredeschool/app/library/Doctrine/Query/Where.php(121): Doctrine_Query->parseClause('(SELECT DISTINC...')
#12 /var/www/bredeschool/app/library/Doctrine/Query/Where.php(81): Doctrine_Query_Where->_buildSql('o.ouderid', 'IN', '(SELECT DISTINC...')
#13 /var/www/bredeschool/app/library/Doctrine/Query/Condition.php(92): Doctrine_Query_Where->load('o.ouderid IN (S...')
#14 /var/www/bredeschool/app/library/Doctrine/Query/Abstract.php(2077): Doctrine_Query_Condition->parse('o.ouderid IN (S...')
#15 /var/www/bredeschool/app/library/Doctrine/Query.php(1160): Doctrine_Query_Abstract->_processDqlQueryPart('where', Array)
#16 /var/www/bredeschool/app/library/Doctrine/Query.php(1126): Doctrine_Query->buildSqlQuery(true)
#17 /var/www/bredeschool/app/library/Doctrine/Query/Abstract.php(958): Doctrine_Query->getSqlQuery(Array)
#18 /var/www/bredeschool/app/library/Doctrine/Query/Abstract.php(1026): Doctrine_Query_Abstract->_execute(Array)
#19 /var/www/bredeschool/app/application/models/OudersTable.php(34): Doctrine_Query_Abstract->execute()
#20 /var/www/bredeschool/app/application/controllers/OudersController.php(44): Model_OudersTable->getView('111')
#21 /var/www/bredeschool/app/library/Zend/Controller/Action.php(513): OudersController->listAction()
#22 /var/www/bredeschool/app/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('listAction')
#23 /var/www/bredeschool/app/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#24 /var/www/bredeschool/app/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#25 /var/www/bredeschool/app/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#26 /var/www/bredeschool/bredeschoolzuidoost.nl/app/index.php(28): Zend_Application->run()
#27 {main}  

Request Parameters:

array (
  'controller' => 'ouders',
  'action' => 'list',
  'module' => 'default',
)  

Kinderen model

// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('Model_Kinderen', 'doctrine');

/**
 * Model_Base_Kinderen
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $kindid
 * @property integer $parentid
 * @property string $naamouder
 * @property string $naambov1
 * @property string $telefoonbov1
 * @property string $relatiebov1
 * @property string $naambov2
 * @property string $telefoonbov2
 * @property string $relatiebov2
 * @property string $voornaam
 * @property string $tussenvoegsel
 * @property string $achternaam
 * @property date $geboortedatum
 * @property string $jomei
 * @property integer $schoolid
 * @property string $jufmeester
 * @property integer $groep
 * @property string $bijzonderheden
 * @property string $zelfstandigheid
 * @property string $opvang
 * @property string $dagvdweek
 * @property string $overig
 * @property string $bso
 * @property string $zwemdiploma
 * @property timestamp $aanmaakdatum
 * @property string $aanmeldwijze
 * 
 * @package    ##PACKAGE##
 * @subpackage ##SUBPACKAGE##
 * @author     ##NAME## <##EMAIL##>
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class Model_Base_Kinderen extends Doctrine_Record
{
    public function setTableDefinition()
    {
        $this->setTableName('kinderen');
        $this->hasColumn('kindid', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'autoincrement' => true,
             'length' => '4',
             ));
        $this->hasColumn('parentid', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => '4',
             ));
        $this->hasColumn('naamouder', 'string', 100, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '100',
             ));
        $this->hasColumn('naambov1', 'string', 100, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '100',
             ));
        $this->hasColumn('telefoonbov1', 'string', 20, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '20',
             ));
        $this->hasColumn('relatiebov1', 'string', 100, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '100',
             ));
        $this->hasColumn('naambov2', 'string', 100, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '100',
             ));
        $this->hasColumn('telefoonbov2', 'string', 20, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '20',
             ));
        $this->hasColumn('relatiebov2', 'string', 100, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '100',
             ));
        $this->hasColumn('voornaam', 'string', 100, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '100',
             ));
        $this->hasColumn('tussenvoegsel', 'string', 50, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '50',
             ));
        $this->hasColumn('achternaam', 'string', 100, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '100',
             ));
        $this->hasColumn('geboortedatum', 'date', 25, array(
             'type' => 'date',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '25',
             ));
        $this->hasColumn('jomei', 'string', 10, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '10',
             ));
        $this->hasColumn('schoolid', 'integer', 2, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '2',
             ));
        $this->hasColumn('jufmeester', 'string', 50, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '50',
             ));
        $this->hasColumn('groep', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '1',
             ));
        $this->hasColumn('bijzonderheden', 'string', 500, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '500',
             ));
        $this->hasColumn('zelfstandigheid', 'string', 75, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '75',
             ));
        $this->hasColumn('opvang', 'string', 100, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '100',
             ));
        $this->hasColumn('dagvdweek', 'string', 100, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '100',
             ));
        $this->hasColumn('overig', 'string', 400, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '400',
             ));
        $this->hasColumn('bso', 'string', 50, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '50',
             ));
        $this->hasColumn('zwemdiploma', 'string', 5, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '5',
             ));
        $this->hasColumn('aanmaakdatum', 'timestamp', 25, array(
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '25',
             ));
        $this->hasColumn('aanmeldwijze', 'string', 20, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => '20',
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $timestampable0 = new Doctrine_Template_Timestampable(array(
             'created' => 
             array(
              'name' => 'aanmaakdatum',
             ),
             'updated' => 
             array(
              'disabled' => true,
             ),
             ));
        $this->actAs($timestampable0);
    }
}

Ouders model

// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('Model_Ouders', 'doctrine');

/**
 * Model_Base_Ouders
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $ouderid
 * @property integer $userid
 * @property integer $clusterid
 * @property string $voornaam
 * @property string $tussenvoegsel
 * @property string $achternaam
 * @property string $straat
 * @property string $huisnummer
 * @property string $postcode
 * @property string $woonplaats
 * @property string $telefoonvast
 * @property string $telefoonmobiel
 * @property string $telefoonwerk
 * @property string $emailadres
 * @property string $stadspas
 * @property integer $inkomensniveau
 * @property timestamp $aanmaakdatum
 * 
 * @package    ##PACKAGE##
 * @subpackage ##SUBPACKAGE##
 * @author     ##NAME## <##EMAIL##>
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class Model_Base_Ouders extends Doctrine_Record
{
    public function setTableDefinition()
    {
        $this->setTableName('ouders');
        $this->hasColumn('ouderid', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'autoincrement' => true,
             'length' => '4',
             ));
        $this->hasColumn('userid', 'integer', 2, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => '2',
             ));
        $this->hasColumn('clusterid', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '4',
             ));
        $this->hasColumn('voornaam', 'string', 100, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '100',
             ));
        $this->hasColumn('tussenvoegsel', 'string', 50, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '50',
             ));
        $this->hasColumn('achternaam', 'string', 100, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '100',
             ));
        $this->hasColumn('straat', 'string', 100, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '100',
             ));
        $this->hasColumn('huisnummer', 'string', 20, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '20',
             ));
        $this->hasColumn('postcode', 'string', 7, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '7',
             ));
        $this->hasColumn('woonplaats', 'string', 100, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '100',
             ));
        $this->hasColumn('telefoonvast', 'string', 20, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '20',
             ));
        $this->hasColumn('telefoonmobiel', 'string', 20, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '20',
             ));
        $this->hasColumn('telefoonwerk', 'string', 20, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '20',
             ));
        $this->hasColumn('stadspas', 'string', 20, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '20',
             ));
        $this->hasColumn('inkomensniveau', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '1',
             ));
        $this->hasColumn('aanmaakdatum', 'timestamp', 25, array(
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => '25',
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $timestampable0 = new Doctrine_Template_Timestampable(array(
             'created' => 
             array(
              'name' => 'aanmaakdatum',
             ),
             'updated' => 
             array(
              'disabled' => true,
             ),
             ));
        $this->actAs($timestampable0);
    }
}

Thanks a lot!

Chris

  • 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-15T19:24:39+00:00Added an answer on May 15, 2026 at 7:24 pm

    As far as I noticed your model classes are named Model_Kinderen and Model_Ouders but in DQL subquery you use Kinderen. Kinderen is your database table name.

    DQL is not SQL. You should work with objects and not tables.

    I’m sorry if I missed something. I’m not really familiar with Zend as a framework.

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

Sidebar

Related Questions

I'm using the table class that auto-generates a table for me from an array
I have this class called Table: class Table { public string Name { get
I have the following code in my context, and no explicit table-class mapping, yet
Assume the following mapping entries: < class name=Customer table=customer> <id name=InternalId column=uintCustomerId type=long> <generator
I just wanted to share this Query class and get your thoughts on it.
Suppose I have an Orders table in my database and a corresponding model class
I had a simple table: class test(Base): __tablename__ = 'test' id = Column(Integer, primary_key=True)
If role is an STI table: class Role< ActiveRecord::Base self.inheritance_column= :role_type end And Student
I'm trying to include a simple hash table class in some files with a
i have a t_class table in mySql, in this table there are 3 columns,

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.