JPA : Can't create persistence class from table

143 views Asked by At

There is a table_a which has primary key Id which is referenced to Table_b as foreign key and i want to create another table_c which foreign key reference should be a column of Table_b. While i created the table somehow and wanted to create a Persistence class via JPA Eclipse wizard. But i am failed to do so, any idea ?

Table_A
id int not null primary,----------------------------
name varchar(20)                                   | 
                                                   |
Table_B
id int not null,                                   | 
a_id int not null,                                 |
dept varchar(20),
Primary Key(id),                                   | 
Foreigns key(a_id) References Table_A (id)-------->|

                                                   | 
Table_C                                            |
id int not null,
c_id int not null,                                 | 
desc varchar(25),
Primary Key (id),                                  |
Foreigns key (c_id) References Table_B (a_id)----->|

I have doubt over SQL creating of table_c but i have received the DB design document in which mention as above, can anybody help me please.

0

There are 0 answers