跳至内容
菜单
此问题已终结
1 回复
2985 查看

I checked the base_sparse_field module and the fields and models py files from that module and understands the basic definition of it. But does anyone has the usage of the sparse field serialisations ? Or where we can use it ?

Thanks in advance

形象
丢弃
最佳答案

Hi,
 
Sparse, or serialized fields do not live as a column in the database table. Instead, their values are stored in JSON arrays in a separate field. As a result, these fields cannot be searched or sorted by. If such a sparse field is created as 'manual', this module can unserialize the field.
 
fields.serialized: Serialized field is used to store data in a field in a json dump

fields.sparse: Sparse field uses a serialized field to store a field in the json dump instead of a normal database column.

Regards

形象
丢弃
相关帖文 回复 查看 活动
3
5月 25
2601
1
4月 25
1956
3
9月 24
15267
2
2月 24
2982
1
7月 23
3126