Skip to content
Discussion options

You must be logged in to vote

I'm not sure what magic UI does to make the above work. Here is how you should write the complete query instead:

WITH
  insert4 := insert default::SensorBrand {
    name := <std::str>"Cool Sensor"
  }

insert default::SensorType {
  name := <std::str>"Data Logger",
  brand := insert4
}

I.e you should use WITH to declare variables (views) before the query, and after the with block some query should happen. In my example it's the last insert, but you could use SELECT (insert4, insert3) instead.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@adehadd-aimgroup
Comment options

Answer selected by adehadd-aimgroup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants