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

  • Home
  • SEARCH
  • 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 8699715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:01:05+00:00 2026-06-13T02:01:05+00:00

This is driving me crazy — I’m pretty sure that Hibernate can determine mapping

  • 0

This is driving me crazy — I’m pretty sure that Hibernate can determine mapping
relationships between tables and thus reflect this in the POJO’s generated.

Except it’s not.

I am using MySQL with STS & Hibernate Tools 4.0.0 and I have a one-to-many and a one-to-one table relationship, between Person <–> Phone and Phone <–> PhoneType and I am able to generate using the ‘Hibernate Code Generation Configuration’ the ‘Domain Code’ and the ‘DAO Code’, however neither of the files have any mappings between the tables.

Now here is a possible issue:

In order to get any annotations at all, I have switched on the option ‘Generate EJB3 annotations’. Now I am using plain old Hibernate here, and not JPA.

So my questions are:

  1. Can Hibernate Tools generate Annotations for plain old Hibernate?
  2. Can it generate mapping information in the POJO’s (i.e. @manytomany / @manytoone) ?

Thanks a lot for your help,

Bob

  • 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-13T02:01:07+00:00Added an answer on June 13, 2026 at 2:01 am

    OK, I got it work at last!

    The problem was, as with all things of a technical nature both simple and profound.

    In a word: CaseSensitive

    I had created my tables with capitaliZatioN (i.e. Person, Phone) and I used the MySQL Workbench to create the foreign keys and they looked like this:

    CONSTRAINT FK_Phone_Person FOREIGN KEY (person_id) REFERENCES Person (person_id)

    instead of

    CONSTRAINT FK_Phone_Person FOREIGN KEY (person_id) REFERENCES person (person_id)

    Notice the capitalization.

    SOO happy after spending a lot of blood, sweat and tears trying to get that damn thing to work when all along the case was the problem!

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

Sidebar

Related Questions

This is driving me crazy. Is there someone out there that can help? Traceback
This is driving me crazy. I have a PHP script that gets some data
This is driving me crazy and I can't find the answer anywhere. I have
This is driving me crazy, I just can't find out the problem: I have
This is driving me crazy. Just testing a site on IE9 and discovered that
This is driving me crazy. I am under the impression that awakeFromNib Method is
I'm sure I'm doing something silly, but this is driving me crazy. I'm trying
This is driving me crazy. Can anyone tell me what I am missing here.
This is driving me crazy, at the moment I can't get what seems a
This is driving me crazy and I'm shocked that official documentation is absolutely useles.

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.