-
Notifications
You must be signed in to change notification settings - Fork 269
Support for JSONField #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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 :) |
i try this: class MyType(DocType):
content_json = fields.ObjectField()
def prepare_content_json(self, instance):
return instance.content_json |
so, part of it is in master: |
it works this solution? |
? yes? did you try it? people are giving a thumbs up |
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. |
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": [ { }, { } ],
You package has saved me so much time, thanks.
The text was updated successfully, but these errors were encountered: