This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Select command problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Select command problem" Watch "Select command problem" New topic

Select command problem

Punya Pratap Singh
Ranch Hand

Joined: Nov 23, 2010
Posts: 81
I have created ManyToMany mapping in hibernate. like below -

Test class -

It runs perfectly and creates Vehicle, UserDetails, UserDetails_Vehicle and Vehicle_UserDetails tables.
when I issue select command, all tables except UserDetails_Vehicle shows the table data.
But when I issue select command for UserDetails_Vehicle it says - "UserDetails_Vehicle" table data is not editable because there is no primary key..

Please help me understand why is this happening.
I am using MySql data base and issuing select command in query browser of it to see the table contents.

Thanks a lot.
It is sorta covered in the JavaRanch Style Guide.
subject: Select command problem
It's not a secret anymore!