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

Composite Material Property is not writeable #109

Open
miketynes opened this issue Apr 19, 2021 · 0 comments
Open

Composite Material Property is not writeable #109

miketynes opened this issue Apr 19, 2021 · 0 comments

Comments

@miketynes
Copy link
Collaborator

So here's the problem:

I can't POST a property that belongs to a component of a composite through the API

This is currently accomplished in the SQL scripts (e.g.:
link) by inserting directly into vw_material_property. We can't do the same with api/materialproperty since it expects elements of material, not material_property.

This relates to #108

vw_composite_material_property has no upsert, so one would need to be written to make api/compositematerialproperty writeable.

insert into vw_material_property (material_uuid, property_def_uuid, -- note that this actually inserts a row in vw_material_composite_property
	property_value, property_actor_uuid, property_status_uuid ) values (
	(select material_composite_uuid from vw_material_composite where composite_description = 'Am-243 Stock' and component_description = 'Hydrochloric acid'),
	(select property_def_uuid from vw_property_def where short_description = 'molar'),
	'.1',
	(select actor_uuid from vw_actor where description = 'Mike Tynes'),
	(select status_uuid from vw_status where description = 'dev_test'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant