Skip to Content
Menú
This question has been flagged
1 Respondre
2964 Vistes

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

Avatar
Descartar
Best Answer

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

Avatar
Descartar
Related Posts Respostes Vistes Activitat
3
de maig 25
2594
1
d’abr. 25
1949
3
de set. 24
15257
2
de febr. 24
2980
1
de jul. 23
3122