Strange behavior with deepcopy

Ok. Thanks @odow!
There is any workaround? If I remove internamModel, for example?

Copy isn’t working for me either in JuMP 0.18.5, there is an issue with matrix constraints:

using JuMP
using CPLEX

m = Model(solver = CplexSolver())
@variable(m, 0 <= x <= 2 )
@variable(m, 0 <= y <= 30 )

@objective(m, Max, 5x + 3*y )
@constraint(m, 1x + 5y <= 3.0 )
@constraint(m, cons[i = 1:2, j=1:2], i*x + j*y <= 3.0 )
copy(m)
MethodError: no method matching copy(::Array{JuMP.ConstraintRef,2}, ::JuMP.Model)e[0m
Closest candidates are:
  copy(e[91m::JuMP.Variablee[39m, ::JuMP.Model) at /home/tas/.julia/v0.6/JuMP/src/JuMP.jl:502
  copy(e[91m::Voide[39m, ::JuMP.Model) at /home/tas/.julia/v0.6/JuMP/src/JuMP.jl:503
  copy(e[91m::JuMP.GenericAffExpr{Float64,JuMP.Variable}e[39m, ::JuMP.Model) at /home/tas/.julia/v0.6/JuMP/src/affexpr.jl:119
  ...
copy(::JuMP.Model) at JuMP.jl:300
include_string(::String, ::String) at loading.jl:522
include_string(::String, ::String, ::Int64) at eval.jl:30
include_string(::Module, ::String, ::String, ::Int64, ::Vararg{Int64,N} where N) at eval.jl:34
(::Atom.##102#107{String,Int64,String})() at eval.jl:82
withpath(::Atom.##102#107{String,Int64,String}, ::Void) at utils.jl:30
withpath(::Function, ::String) at eval.jl:38
hideprompt(::Atom.##101#106{String,Int64,String}) at repl.jl:62
macro expansion at eval.jl:80 [inlined]
(::Atom.##100#105{Dict{String,Any}})() at task.jl:80