Skip to content

Instantly share code, notes, and snippets.

@makamo
Created March 18, 2015 18:10
Show Gist options
  • Save makamo/61ca59d4ca3a2459d607 to your computer and use it in GitHub Desktop.
Save makamo/61ca59d4ca3a2459d607 to your computer and use it in GitHub Desktop.
2015-03-18 14:06:24 Notice (8): Undefined index: contrat_id in [/var/www/timesheets/vendor/cakephp/cakephp/src/ORM/Association/BelongsToMany.php, line 330]
Trace: Cake\Error\BaseErrorHandler::handleError()
- CORE/src/Error/BaseErrorHandler.php, line 138 Cake\ORM\Association\BelongsToMany::_buildResultMap()
- CORE/src/ORM/Association/BelongsToMany.php, line 330 Cake\ORM\Association\BelongsToMany::eagerLoader()
- CORE/src/ORM/Association/SelectableAssociationTrait.php, line 57 Cake\ORM\EagerLoader::loadExternal()
- CORE/src/ORM/EagerLoader.php, line 538 Cake\ORM\Query::_execute()
- CORE/src/ORM/Query.php, line 644 Cake\ORM\Query::_all()
- CORE/src/Datasource/QueryTrait.php, line 218 Cake\ORM\Query::all()
- CORE/src/ORM/Query.php, line 595 Cake\ORM\Query::first()
- CORE/src/Datasource/QueryTrait.php, line 340 Cake\ORM\Query::firstOrFail()
- CORE/src/Datasource/QueryTrait.php, line 351 Cake\ORM\Table::get()
- CORE/src/ORM/Table.php, line 1097 App\Controller\ContratsController::view()
- APP/Controller/ContratsController.php, line 55 Cake\Controller\Controller::invokeAction()
- CORE/src/Controller/Controller.php, line 405 Cake\Routing\Dispatcher::_invoke()
- CORE/src/Routing/Dispatcher.php, line 114 Cake\Routing\Dispatcher::dispatch()
- CORE/src/Routing/Dispatcher.php, line 87 [main]
- ROOT/webroot/index.php, line 37
@makamo
Copy link
Author

makamo commented Mar 18, 2015

debug $result

/src/ORM/Association/BelongsToMany.php (line 328)
object(App\Model\Entity\Employee) {

    'new' => false,
    'accessible' => [
        '*' => true
    ],
    'properties' => [
        'id' => (int) 11,
        'first_name' => 'Denis',
        'last_name' => 'Béchard',
        'adresse' => '',
        'tel' => '',
        'tel_bureau' => '',
        'numero_poste' => '',
        'courriel' => '',
        'begin' => null,
        'end' => null,
        'code_ceridian' => '',
        'memo' => '',
        'activated' => true,
        '_joinData' => [
            (int) 0 => object(App\Model\Entity\ContratsEmployee) {

                'new' => false,
                'accessible' => [
                    '*' => true
                ],
                'properties' => [
                    'id' => (int) 15,
                    'contrat_id' => (int) 3,
                    'employee_id' => (int) 11,
                    'fonction_id' => (int) 4,
                    'begin' => object(Cake\I18n\Time) {

                        'time' => '-0001-11-30T00:00:00-0500',
                        'timezone' => 'America/Montreal',
                        'fixedNowTime' => false

                    },
                    'end' => object(Cake\I18n\Time) {

                        'time' => '-0001-11-30T00:00:00-0500',
                        'timezone' => 'America/Montreal',
                        'fixedNowTime' => false

                    },
                    'fonction' => object(App\Model\Entity\Fonction) {

                        'new' => false,
                        'accessible' => [
                            '*' => true
                        ],
                        'properties' => [
                            'id' => (int) 4,
                            'name' => 'Surintendant',
                            'created' => object(Cake\I18n\Time) {

                                'time' => '2014-05-27T12:50:13-0400',
                                'timezone' => 'America/Montreal',
                                'fixedNowTime' => false

                            }
                        ],
                        'dirty' => [],
                        'original' => [],
                        'virtual' => [],
                        'errors' => [],
                        'repository' => 'Fonctions'

                    }
                ],
                'dirty' => [],
                'original' => [],
                'virtual' => [],
                'errors' => [],
                'repository' => 'ContratsEmployees'

            }
        ]
    ],
    'dirty' => [],
    'original' => [],
    'virtual' => [
        (int) 0 => 'name'
    ],
    'errors' => [],
    'repository' => 'Employees'

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment