This is a follow-up to
this post, especially nordborg's explanation about one-to-one
Problem is as follows:
Start a->b , a->c , c->d are all mapped one-to-one
Code:
ClassA
<one-to-one name="bees" class="ClassB" />
<one-to-one name="cees" class="ClassC" property-ref="a_id"/>
<one-to-one name="dees" class="ClassD" property-ref="c_id"/>
Result on refreshing a:
select ... from a_table
select ... from b_table, c_table, d_table
Then i changed it to a->b and c->d both constrained and lazy:
Code:
ClassA
<one-to-one name="bees" class="ClassB" constrained="true" lazy="proxy" />
<one-to-one name="cees" class="ClassC" property-ref="a_id"/>
<one-to-one name="dees" class="ClassD" property-ref="c_id" constrained="true" lazy="proxy" />
Result on refreshing a:
select ... from a_table
select ... from c_table
But what didn't fit in was when i changed it to a->c being constrained and lazy
Code:
ClassA
<one-to-one name="bees" class="ClassB" constrained="true" lazy="proxy" />
<one-to-one name="cees" class="ClassC" property-ref="a_id" constrained="true" lazy="proxy" />
<one-to-one name="dees" class="ClassD" property-ref="c_id" constrained="true" lazy="proxy" />
Result on refreshing a:
select ... from a_table
select ... from c_table
So data from c_table is always loaded, any thoughts why this happens and how to prevent it?
I know it's doable with many-to-one but i just want to know whis this happens with one-to-one.
Thanks in advance
Patrik