jbchurn wrote:
By the way, can you try to change to following?
<many-to-one name="p" column="p_id" class="example.model.P"
lazy="true">
Quote:
Rate me if you find this userful.
Thanks for your answer.
The value of lazy can only be one of "false,proxy,no-proxy" when it is used in <many-to-one>
When execute
"from C"
What i want is only the instance list of C not the P instance that the each C instance related.
in Hibernate2.x
What i have to do is just add
lazy="true" in P.hbm.xml
<class ......... lazy="true">
.......
</class>
when excute
"from C"
the sql statements shown in console is:
select c.id.......from c_tab
but in Hibernate3.x, as you said lazy="true" is the default behaviour in
<class....... >
</class>
when i excute
"from C"
the exception that i have posted will be presented.
why?
i really really don't understand.