Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Foreign key not set in row of target table of target-one-to-one mapping

Hi All

I have a unidirectional one-to-one mapping from T1 to T2. The foreign key is in T2, so I am using target foreign keys.
Now when I add a new entity of T2 and link it to the source entity of T1 using the following method, the foreign key is not being populated in the new row of T2.

t1.set("joinattr", t2);

The logs show just two SQL statements being executed - one to delete the orphan row (the relationship is private owned) and one to insert a new row. the insertion shows the binding for the direct mapped fields but since this mapping is unidirectional, I was expecting t1.set("joinattr", t2) to populate the foreign key in the target entity. But that does not happen.

Am I missing something here?

Thanks in Advance!
Rohit
Oracle Server Technologies


Back to the top