Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8076109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:11:39+00:00 2026-06-05T15:11:39+00:00

I am using Hibernate 3 . Hi , I am attending a session on

  • 0

I am using Hibernate 3 .
Hi ,

I am attending a session on Hibernate . I was confused about one of the discussion he had when working with Hibernate and Primary key in Tables under Database .

What he mentioned is that ,When working with Hibernate , its not compulsary for a Database column to have a primary key , but its mandatory to mention a Primary Key hbm file representing that Table .

Please let me know if this is true ??

Thanks in advance .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:11:40+00:00Added an answer on June 5, 2026 at 3:11 pm

    Hibernate needs a unique, immutable ID for each entity. Whereas this ID is declared as primary key or not in the database table mapped by this entity doesn’t matter. But I don’t see what you would gain by not declaring it as a primary key.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Hibernate in an Eclipse RAP application. I have database tables mapped
when using hibernate with spring, can someone explain how the session unit of work
I'm using Hibernate's JPA impl to model some tables. I'm having trouble mapping a
Using hibernate with annotations, i want a one-many relationship to be sorted by the
I am using Hibernate's @OrderColumn annotation to order a list in my database. It
I am using hibernate search with solr in my project and one of my
I am using Hibernate 4.1.3 (JPA) on the Play! framework. The database is PostgreSQL
I am using hibernate. i have read some where about Example.create. what is it
Using Hibernate, I am trying to implement a one-to-one relationship between one fixed domain
I am using Hibernate 3.0 in my application with Postgres database. It is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.