lewestopher / cakephp-monga Goto Github PK
View Code? Open in Web Editor NEWA CakePHP 3.x plugin for accessing MongoDB NoSQL data stores
License: MIT License
A CakePHP 3.x plugin for accessing MongoDB NoSQL data stores
License: MIT License
After bootstrap & app.php configuration, i tried below code
$mongoAdapter = ConnectionManager::get('mongo_db');
$mongodb = $mongoAdapter->connect();
It says Exception: Class 'MongoClient' not found in [/mnt/d/www/html/cronRevamp/vendor/league/monga/src/League/Monga/Connection.php, line 54]
Cakephp : 3.5.12
Mongod -version : db version v3.2.19
Ubuntu : ubuntu1604
Is this project still active ?
Hello, I'm getting a Fatal error: Class 'App\Model\MongoCollection\UsersCollection' not found in ..cake3test/vendor/lewestopher/cakephp-monga/src/MongoCollection/CollectionRegistry.php on line 85
i've changed the Namespace to test as CollectionRegistry::setNamespace('App\Model\AlternativeCollectionLocation\');
and i got the same error
Upon installation, this is the error I get which seems to be triggered from this code:
$mongodb = $cake_monga->connect();
This is the full error message:
Error: Call to undefined method DebugKit\Database\Log\DebugLog::getContext()
File /vendor/lewestopher/cakephp-monga/src/Database/MongoConnection.php
Line: 296
Thanks!
Error: Call to undefined method DebugKit\Database\Log\DebugLog::getContext()
File D:\xampp5.6\htdocs\mutation\emutation\lisf\mutation\vendor\lewestopher\cakephp-monga\src\Database\MongoConnection.php
Line: 296
$cake_monga = ConnectionManager::get('datasource');
I want to log query in file like mysql.
and how can i use MongoDB conenction? instead of MongoClient() because MongoClient is deprecated.
Hi,
I have cakePHP 3, MongoDB 3, PHP 5.6.
In my code I have
$start_date = new MongoDate\BSON\UTCDateTime(strtotime($start));
But it gives me the following error:
Error: Class 'App\Controller\MongoDate' not found
File /var/www/caketest/src/Controller/ReportsController.php
Line: 53
Can you please tell whether I need to include or use any files in the controller or anything is missing..
Thanks in advance :)
However:
'Datasources' => [
'mongo_db' => [
'className' => 'CakeMonga\Database\MongoConnection',
'dns' => env('MONGODB_URL', 'mongodb://localhost:27017/app')
],
'default' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false,
'host' => 'localhost',
...
]
];
I have GroupsCollection extended BaseCollection
and i have to select data by using aggregate function
like in BaseCollection
$this->aggregate([]); //getting all record
$this->aggregate(['group'=>['name']]); //getting error
please help me
that will Pecl MongoDB extension ? please help me out
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.