You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the AbstractSynchronisedDatastore, it's possible to create datasets simply by querying models that inherit from that.
But what about when we want to create a dataset by virtue of relating to one of those stores?
We'd need to store an M2M relation (which *Datastore objects are in the dataset) AND some JSON data (what tags etc are on the dataset, what's the dataset called, etc).
Current state
Currently, we're manually using an M2M relation then botching the dataset metadata together.
Proposed solution 1
To store both an m2m and a json dataset requires two tightly-coupled fields on the model.
It would be good to do that in one field to make the declaration of such a relation elegant in django; we can do so by dynamically adding a field within a field definition, like shown here:
Create an AbstractDatasetRelation model that serves as a through-model for the M2M relation but has a manager attached that allows mangement of dataset metadata. Not quite sure if this'll work but might be interesting.
The text was updated successfully, but these errors were encountered:
Feature request
Use Case
Using the
AbstractSynchronisedDatastore
, it's possible to create datasets simply by querying models that inherit from that.But what about when we want to create a dataset by virtue of relating to one of those stores?
We'd need to store an M2M relation (which *Datastore objects are in the dataset) AND some JSON data (what tags etc are on the dataset, what's the dataset called, etc).
Current state
Currently, we're manually using an M2M relation then botching the dataset metadata together.
Proposed solution 1
To store both an m2m and a json dataset requires two tightly-coupled fields on the model.
It would be good to do that in one field to make the declaration of such a relation elegant in django; we can do so by dynamically adding a field within a field definition, like shown here:
https://blog.elsdoerfer.name/2008/01/08/fuzzydates-or-one-django-model-field-multiple-database-columns/
Proposed solution 2
Create an
AbstractDatasetRelation
model that serves as a through-model for the M2M relation but has a manager attached that allows mangement of dataset metadata. Not quite sure if this'll work but might be interesting.The text was updated successfully, but these errors were encountered: