为什么我在一对一里设置延迟加载属性为true时编辑器会报错???急!!!
这是主表设置一对关关系:
<one-to-one name= "hardwareTask " class= "HardwareTask " cascade= "all " lazy= "true "> </one-to-one>
只要把lazy设置为true,编辑器就会报以下错误,怎么回事呢??
Attribute "lazy " with value "true " must have a value from the list
"false proxy no-proxy ".
------解决方案--------------------one-to-one, many-to-one的lazy只能设置为false proxy no-proxy中的其中一个
------解决方案--------------------one-to-one, many-to-one,one-to-many
我都是false 用lazy容易出错
------解决方案--------------------lazy=false,看看是不是没有问题了,hibernate3以后lazy=true是默认的,所以你再设置关系的时候要把它设置为false