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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:41:14+00:00 2026-05-13T14:41:14+00:00

I am preparing a Hibernate training. The training will be two days long and

  • 0

I am preparing a Hibernate training. The training will be two days long and targeted at somewhat experienced Java developers with no Hibernate experience.

So what things would you cover / leave out in such a training?

  • 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-05-13T14:41:14+00:00Added an answer on May 13, 2026 at 2:41 pm

    I would break it up as follows:

    Day 1 – Introduction

    What is Hibernate and what problem does it solve? ORM, JDBC complexities, database neutrality blah blah blah

    What’s the quickest way to see it working? Annotation driven (no scooting about to fiddle with XML), and Spring (for all it’s wonderful helpers).

    Show ’em a project with a Main class launching a Spring context with log4j installed. Configure the context to read transaction annotations and DTO annotations. Configure the Hibernate properties to create-drop the schema against MySQL or Postgres or whatever is handy on your system and to show SQL in the console log.

    Explain that this is just some boilerplate infrastructure work and that they don’t need to worry about it at this stage.

    Explain how the @Column annotation works then create a DTO to map an Order.

    Run up the application and demonstrate the newly created schema

    Explain how the @OneToMany annotation works (owner and inverse etc)

    Create a new DTO for OrderItem and link it to the Order so that Order 1-* OrderItem.

    Run up the application and demonstrate the extra table and relationship.

    Inform them that so far no SQL has been written, it’s all just meta data.

    Explain the concept of the Hibernate Session.

    Explain transient, detached and persistent objects with regard to Sessions.

    Build a DAO, based on the Spring HibernateTemplate that will allow a transient Order DTO containing a collection of OrderItem DTOs to be persisted. Then create the transient Order DTO, populate it and send it to the DAO.

    Explain that it only takes a single line of code to persist an entire object graph.

    Run up the application and show them the result in the database.

    Distribute the code and get them to write a unit test to verify the operation of the DAO (look for transient objects becoming persistent through the ID field)

    Ask them to add new DTOs for Customer so that Customer 1-* Order 1-* OrderItem

    Day 2 – Queries and Transactions

    Explain that queries are expressed through the Query or the Criteria API depending on the nature of consuming code (a static Query or a build Criteria).

    Explain conjunction and disjunction and joins and map to inner and outer joins.

    Explain that HQL is concerned with object relationships and then delegates creation of SQL.
    Add a method to the DAO to perform a Query based on each API.

    Run up the application and demonstrate the query working and what SQL is created.

    Explain that transactions are commonly placed away from DAOs and tend to live in services.

    Create a service that has the Order DAO injected and give it a @Transaction annotation. Turn on debugging in log4j to observe the transaction messages.

    Distribute the code and get them to update the unit test to verify the operation of the DAO to include the results of the query and pre-populating the database with Customers, Orders and OrderItems.

    Come up with a variety of queries that need to be implemented.

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

Sidebar

Related Questions

I am developing my first Java web application (Spring/Hibernate/Freemarker) and my only concern is
Im preparing API methods for one of the system. Api will be available for
I am preparing a registration page using JSF/Spring webflow&mvc application. I have added two
I am preparing for OCJP . I found a question in dump import java.util.*;
I am new to hibernate world and preparing a demo sample. I tried with
The JPA 2.0 Provider Hibernate is throwing exception while preparing configuration for entity manager
I am preparing to use continuous integration for the first time. I will be
I am preparing some application with usage of JPA 2.0, Hibernate as provider, MySQL
I spent few days on an spring-hibernate-transaction issue. I create a simple webservice with
I am preparing for a units quiz and there are two kinds of conversions

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.