I have OrderMain table and OrderItems tables with @OneToMany relationship in them. I set table schema to be generated automatically.
It generates a third reference table named OrderMain_OrderItems containing id from the OrderMain and OrderItems.
I wanted to have the Foreign Key to be there in OrderItems table referring OrderMain table id (PK).
Is there any setting to avoid the third referencing table and have the FK on the target side of the relationship.
Usually when I create a @OneToMany relationship, it is bi-directional. This would mean Order_Items would point to Order_Main.
The TopLink documentation says "configure the details of the join table used by TopLink JPA for uni-directional one-to-many relationships". Maybe the join table is being created in your example because Order_Main isn't being told which table Order_Items is in?