We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

About metadata

Hello. I read https://olddocs.phalcon.io/en/3.0.0/reference/models-metadata.html multiple times and I still have no idea what is this for. Also it talks about caching. Is it different from : https://olddocs.phalcon.io/en/3.0.0/reference/models-cache.html ?

Edit: What is metadata useful for ?

edited Feb '18

Metadata is basically the schema of your database. You can define models with the absolute bare minimum (columns & source), but keys, relations, nullability, etc are still important info, so phalcon retreives it from the information_schema (which you can also cache).

For example, non-null cells will throw a PresenceOf validation exception, while nullable cells will not.