Hi,
I have 2 below schemas.
schema-a
- id
- name
- product-id
- order-product-key
order
- id
- name
- order-product-id
- product-key
product-id
in schema-a is not a reference field to order-product-id
in order and vice versa.
My use case is, on creation of content of schema-a I want to update the order-product-key
value with the value of product-key
of schema order based on condition where product-id = order-product-id
.
So what I am looking for is, how can I search the content of order by order-product-id
field in create scripts of schema-a and use the returned order content to update the order-product-key
.