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 7766413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:24:37+00:00 2026-06-01T15:24:37+00:00

I am working on a project with MySQL,Hibernate,Java,GWT I am making an entity class

  • 0

I am working on a project with MySQL,Hibernate,Java,GWT

I am making an entity class where i am making each and every field as per the fields in mysql
like there is a table UserInfo with fields ,id,name,password,and many other fields in MySQL

now when i am making an entity class in java/hibernate
I have to create each field i.e id,name,password and others with my hand

I was just wondering if there’s a way with which my entity class automatically detects all fields which are in my Database table and make all the fields in java itself and link them with the database fields.

thanks

  • 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-01T15:24:38+00:00Added an answer on June 1, 2026 at 3:24 pm

    hibernate has a property called “hibernate.hbm2ddl.auto”.

    hibernate.hbm2ddl.auto

    Automatically validates or exports schema DDL
    to the database when the SessionFactory is created. With create-drop,
    the database schema will be dropped when the SessionFactory is closed
    explicitly.

    e.g. validate | update | create | create-drop

    you can set the proper value when you start creating your sessionfactory. then you will see the tables were created in your datastore, of course, the table creation was based on your entity classes.

    if you want to generate java classes (entities) from your database table. you may want to check hibernate reverse engineering out:

    http://docs.jboss.org/tools/3.3.0.M5/en/hibernatetools/html/reverseengineering.html

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

Sidebar

Related Questions

I am working on a project which uses Java,MySql,Struts2 MVC and Hibernate. I tried
I'm working on a java project full of Hibernate (3.3.1) mapping files that have
I'm currently working on a project that makes use of Seam/Hibernate (JPA) on MySQL.
I'm working on a project that worksa with java and MySQL. My question is
I'm working on a project with Hibernate and MySQL. In one of my model
I'm working on a project that uses Hibernate and MySQL. I intend to use
I'm currently using Spring+Hibernate+MySQL for a project I'm working on. I realized that a
I'm working on a SaaS project and mysql is our main database. Our applications
I'm working on a project that requires me to programmatically create MySQL users from
I am using MySQL and PHP for a project I am working. I have

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.