nguyenducduy / phalcon-jumpstart

[Deprecated] Fast development web apps with CRUD code generator
GNU General Public License v2.0
6 stars 4 forks source link

The meta-data is invalid or is corrupt problem. #6

Open zikezhang opened 8 years ago

zikezhang commented 8 years ago

Hi , May I know how did you work it out ?

https://forum.phalconphp.com/discussion/7335/phalcon-203-the-metadata-is-invalid-or-is-corrupt

nguyenducduy commented 8 years ago

it problem occured when running out of phalcon version updated, i was update source for lastest version.

zikezhang commented 8 years ago

Yes, I used the latest version of Phalcon, but this problem is still occured.

nguyenducduy commented 8 years ago

@@ it occured because i did not defined default value of meta data annotations, add this code to fix it. /Files AnnotationsMetaDataInitializer.php/

public function getMetaData(ModelInterface $model, DiInterface $di) { ... // Default values for columns PhalconMetadata::MODELS_DEFAULT_VALUES => [],

        // Fields that allow empty strings
        PhalconMetadata::MODELS_EMPTY_STRING_VALUES => []

}