O'Reilly logo

Hibernate: A J2EE™ Developer's Guide by Will Iverson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Starting from an Existing Schema

In many enterprise environments, applications will be based on an existing database schema, not the other way around. Hibernate, in conjunction with a tool called Middlegen, supports this development model. In this chapter, persistent objects will be derived from an existing MySQL schema, using Middlegen to generate the Hibernate mapping files; these will in turn be used to generate Java source files.

The example in this chapter should be familiar to anyone who has ever at tended school. The database schema models a set of courses and students, tracking exams and exam results for each student. Many books on relational database design include this example—especially some of the more academic texts.

Initial ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required