Skip to content
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

Inserting vs updating models from share data (or initSources) #5023

Open
nf-s opened this issue Nov 26, 2020 · 0 comments
Open

Inserting vs updating models from share data (or initSources) #5023

nf-s opened this issue Nov 26, 2020 · 0 comments

Comments

@nf-s
Copy link
Contributor

nf-s commented Nov 26, 2020

Related to #4975

@steve9164

If share data contains a model which isn't in the catalog - it will result in a new incomplete model being created.

Does serialisation save enough attributes that upsertModelFromJson thinks it can create a new model?
upsertModelFromJson should really be replaced with update + insert functions
But is it always easy to work out when share data should use update and when it should insert?
E.g. user added models should be inserted when deserialised, not updated

Nick:

One issue here is with how I create new models in CatalogFunctions (eg for WPS results) - the entire model is dumped into user stratum so it can be shared.

So it might be difficult to determine if share data should be updated or inserted - unless we add a catalogModel flag or something if it exists outside user stratum

Might be worth making a nicer error message:

image

@nf-s nf-s changed the title Inserting vs updating models from share data Inserting vs updating models from share data (or initSources) Nov 26, 2020
@nf-s nf-s mentioned this issue Nov 26, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants