Relationship is not created in the hibernate entity when creating foreign key based on the unique key in another table.

I have  question related to hibernate (JPA Annotations).
I have two tables,first table contains two column,one is primary and other is unique and not null.
Second table contains the foreign key on the basis of unique key in the database.
When i create bean through jpa(plugin in eclipse),there is no relationship is shown and no relationship exists between the two tables in the generated entities.
If i create foreign key on the basis of primary key,relationship is shown in the entities.
Please help me out.
RockingAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mrjoltcolaCommented:
This is likely a Hibernate question more than an Oracle question.

First I would check to see whether an actual unique constraint exists on the column in the parent table (not just a unique index, but an actual constraint), because I have found by experience some tools don't don't properly handle "unique" indexes the same as constraints. But since you said you've created a foreign key, it should still honor the foreign key constraint, which leads me to believe it is a Hibernate question. Hence, it needs to be moved to the Hibernate zone.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.