| Author |
Problem in many to one relation.
|
chaitanya karthikk
Ranch Hand
Joined: Sep 15, 2009
Posts: 779
|
|
Hi all, I am facing a problem while trying to insert a record with foreign key.
There are two tables. "Surname" and "Family".
The hibernate files areUsing this code I am trying to insert the recordWhile executing the program I am getting errors like
The table family is created successfully, but error is occurring while insertion.
Can anyone tell me how to fix it? Thank you all in advance.
|
Love all, trust a few, do wrong to none.
|
 |
chaitanya karthikk
Ranch Hand
Joined: Sep 15, 2009
Posts: 779
|
|
|
Can anyone help me fix the problem.
|
 |
Stanley Walker
Ranch Hand
Joined: Sep 23, 2009
Posts: 72
|
|
Can you please post the code for the two entity classes which you are using. THere would be more clarity then.
thank you.
|
 |
chaitanya karthikk
Ranch Hand
Joined: Sep 15, 2009
Posts: 779
|
|
chaitanya karthikk wrote:Hi all, I am facing a problem while trying to insert a record with foreign key.
There are two tables. "Surname" and "Family".
The hibernate files areUsing this code I am trying to insert the recordSurname.javaFamily.javaWhile executing the program I am getting errors like
The table family is created successfully, but error is occurring while insertion.
Can anyone tell me how to fix it? Thank you all in advance.
|
 |
chaitanya karthikk
Ranch Hand
Joined: Sep 15, 2009
Posts: 779
|
|
|
anyone there to help me
|
 |
chaitanya karthikk
Ranch Hand
Joined: Sep 15, 2009
Posts: 779
|
|
|
Anyone there who can help me, I provided with all the necessary files.
|
 |
chaitanya karthikk
Ranch Hand
Joined: Sep 15, 2009
Posts: 779
|
|
|
The issue has been solved, the POJO class is wrong and the family.hbm file is also wrong. I fixed it.
|
 |
 |
|
|
subject: Problem in many to one relation.
|
|
|