Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getMetaData error #14

Open
deepjyoti941 opened this issue Oct 28, 2015 · 1 comment
Open

getMetaData error #14

deepjyoti941 opened this issue Oct 28, 2015 · 1 comment

Comments

@deepjyoti941
Copy link

Hi got the following error

PHP Fatal error: Uncaught exception 'Phalcon\Mvc\Model\Exception' with message 'A dependency injector container is required to obtain the services related to the ORM' in phalcon/mvc/model/manager.zep:406\nStack trace:\n#0 [internal function]: Phalcon\Mvc\Model\Manager->_getConnection(Object(Library\App\Models\Product), NULL)\n#1 [internal function]: Phalcon\Mvc\Model\Manager->getReadConnection(Object(Library\App\Models\Product))\n#2 [internal function]: Phalcon\Mvc\Model->getReadConnection()\n#3 [internal function]: Phalcon\Mvc\Model\MetaData\Strategy\Introspection->getMetaData(Object(Library\App\Models\Product), Object(Phalcon\Di\FactoryDefault))\n#4 [internal function]: Phalcon\Mvc\Model\MetaData->_initialize(Object(Library\App\Models\Product), 'library\app\mod...', 'product', '')\n#5 [internal function]: Phalcon\Mvc\Model\MetaData->readMetaDataIndex(Object(Library\App\Models\Product), 0)\n#6 /var/www/html/anaohApi/vendor/stanislav-web/phalcon-searcher/src/Searcher/Validator.php(325): Phalcon\Mvc\Model\MetaData->getAttributes(Objec in phalcon/mvc/model/manager.zep on line 406, referer: http://192.168.43.148:3000/

my function

$query = $this->request->getQuery('q', 'string');
// create object instance
$searcher = new Searcher();

$searcher->setFields([
    'Library\App\Models\Product'    =>    [
        'title',
        'summary',
    ],
    'Library\App\Models\Jobs'    =>    [
        'title',
        'description'
    ]
])
->setQuery($query);

$result = $searcher->run();
@Elenthar
Copy link

Elenthar commented Dec 9, 2015

I'm also having this problem. Maybe because of using Phalcon 2.0.x?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants