-
Notifications
You must be signed in to change notification settings - Fork 270
Open
Labels
Description
Hi
I am trying to use the Django models JSONField but because its structure can be changed I am not sure of its properties. Is there anyway I can avoid setting them when using a ObjectField? Or can you think of any other solutions?
Without setting properties like below the following happens
attributes = fields.ObjectField()
"attributes": [
{
},
{
}
],
You package has saved me so much time, thanks.
mikejarrett, JanBednarik, aztrock, kyrollos-saad, Allan-Nava and 6 more
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
boccheciampe commentedon Nov 21, 2017
Hello,
I recently ran into the same issue. A (dirty ?) workaround is to use the prepare_foo function, something like this (in this example, "yourfield" is a relationship object with regular fields and a 'data' jsonfield):
Hope this helps :)
cocoakekeyu commentedon Apr 8, 2018
i try this:
andreasnuesslein commentedon Nov 28, 2019
so, part of it is in master:
#220
Allan-Nava commentedon Feb 12, 2020
it works this solution?
andreasnuesslein commentedon Feb 12, 2020
? yes? did you try it? people are giving a thumbs up
debnet commentedon Jul 15, 2024
It works, but for few records only. I want to index about 10 millions records and refresh command takes all my memory and finally crashes. I hope for a real fix because JSONField are ratherly common now in PostgreSQL.