aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Entity beans which map two tables with foreign key pointing to alternate key (not primary key) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Entity beans which map two tables with foreign key pointing to alternate key (not primary key)" Watch "Entity beans which map two tables with foreign key pointing to alternate key (not primary key)" New topic
Author

Entity beans which map two tables with foreign key pointing to alternate key (not primary key)

Ravi Danum
Ranch Hand

Joined: Jan 13, 2009
Posts: 104
Hello,

I am using Toplink and have 2 entity beans: Logger and LuAppList. There is a many-to-one relationship from Logger to LuAppList. The Logger table has a foreign key reference to an alternate key in LuAppList (not the primary key). I get they error:

TOPLINK-45 Missing mapping for field [LU_APP_LIST.app_id]

It works when its mapped to a primary key. But the database table design has changed and the foreign key is now an alternate key.

Does anyone know if this should work, or how to fix it?

Thanks.

Paula



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Entity beans which map two tables with foreign key pointing to alternate key (not primary key)
 
Similar Threads
Multiple Tables In the Database -- Use Multiple Entity Beans?
can i use one entity bean to access more than one tables
I need a bit of explanation about bidirectional relation between two entity beans.
EJB Using the Oracle Database
CMP maping - one to many unidirection in wl7.0