Hi,
We are using Hebernate 3.6, JPA 2.0, Weblogic 10.3.4 (Oracle DB). We encountered in a situation in our application when we get lazy proxy for ToOne reference which is marked as eager. We also have set <property name="hibernate.max_fetch_depth" value="5"/> in peristence.xml (we set it on pupose to 5 to check a high limit).
The reference is fetched using paymentOperation.getParentTransaction().getDstUser() What is strange is that paymentOperation.getParentTransaction().getSrcUser() which is mapped the same - is fetched not lazily
The mapping of the relevant entities and references is shown below:
@Entity @Table(name="PAYMENT_OPERATIONS") @RootEntity(PaymentOperation.class) public abstract class PaymentOperation extends BaseTransaction { @ManyToOne private PaymentTransaction parentTransaction; }
@Entity @Table(name="PAYMENT_TRANSACTIONS") @RootEntity(PaymentTransaction.class) public abstract class PaymentTransaction extends Transaction {
@ManyToOne private BaseUser dstUser; }
Can you please assist me understand this issue?
Thanks, Tovi
|