The JSON properties plugin allows you to easily add structured data to a single database table field. You can easily store arrays and structures without the need for extra tables in your model.
The JSON properties plugin has a single initialization method that you must call in your models
- property - the model property the serialize and deserialize when interacting with the database.
- type - possible values include array or struct.
How to Use
Simply add structure data to your JSON property. That's it!
The JSON proerties plugin works by adding callbacks to the initialized model to transparently serialize/deserialize complex data types into strings that can be stored in a database.
- $deserializeJSONProperties is called on AferFind and AfterSave
- $serializeJSONProperties is called on BeforeValidation and BeforeDelete
To uninstall this plugin simply delete the /plugins/AssetBundler-0.9.zip file.
This plugin was created by James Gibson.