What is the rationale behind throwing an error in this?

```
using JuMP
m1 = Model()
@variable(m1, x >= 0)
m2 = Model()
@variable(m2, x >= 0)
@objective(m1, Min, x) # this will error w/ variable not owned
```

gives

```
ERROR: LoadError: VariableNotOwned{VariableRef}(x)
```

I am telling `@objective`

that the model I want it to operate on is `m1`

. So shouldn’t it know that the `x`

I am referring to is the one that is in `m1`

?

I know the workaround:

```
using JuMP
m1 = Model()
@variable(m1, x >= 0)
m2 = Model()
@variable(m2, x >= 0)
# @objective(m1, Min, x) # this will error w/ variable not owned
x = m1[:x]
@objective(m1, Min, x)
print(m1)
```

gives

```
Min x
Subject to
x ≥ 0.0
```

But I don’t get why the workaround is necessary. I am interested just so I have a better idea of how JuMP is working under the hood.