Re:Django EAV 2 – Entity-Attribute-Value Storage for Django
by alexandernst on Friday July 27, 2018 @06:18PM
(#17629914)
Or just use JSONField, because that’s exactly the reason why it exists.
[ Parent
| on HN ]
Re:Django EAV 2 – Entity-Attribute-Value Storage for Django
by ivan_ah on Friday July 27, 2018 @07:00PM
(#17630167)
Yep, it's essentially the same thing. I guess EAV approach was the old way from before JSONField days.
In both cases the cost of this flexibility and migration-less data model extensibility is extra code paths and guards to check if these "optional" attributes are present or not. Spaghetti code anyone?
Re:Django EAV 2 – Entity-Attribute-Value Storage for Django
by Zodd on Saturday July 28, 2018 @10:26AM
(#17633297)
JSONField is not always available and is not equivalent to EAV.
Re:Django EAV 2 – Entity-Attribute-Value Storage for Django
by dplgk on Saturday July 28, 2018 @10:48AM
(#17633383)
In what situation is JSONField not available but other third-party modules are?
Re:Django EAV 2 – Entity-Attribute-Value Storage for Django
by Zodd on Saturday July 28, 2018 @11:13AM
(#17633492)
JSONField is specific to PostgreSQL [1]. If you're working in Django and are bound to some other vendor, RDMS-agnostic solution is handy.
[1] https://docs.djangoproject.com/en/2.0/ref/contrib/postgres/f...