We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

mongodb - Phalcon\Mvc\Model\MetaData::getAttributes() ??

Greetings,

Can you suggest me how do I get all the metadata for a collection in my mongodb ?

I am getting an below error,

" PHP Catchable fatal error: Argument 1 passed to Phalcon\Mvc\Model\MetaData::getAttributes() must implement interface Phalcon\Mvc\ModelInterface, instance of PhalconRest\Models\User given in /var/www/html/thistle/face/api/controllers/UserController.php"

It would be nice if there would be a separate documentation for Mongodb .

MongoDb collections have a dynamic schema so Phalcon\Mvc\Model\MetaData does not work with mongo collections only relational based models