Implementing conversations (Hibernate)

  You’ve tried the examples in previous topics and stored and loaded objects inside transactions. Very likely you’ve noticed that code examples of five lines are excellent to help you understand a particular issue and learn an API and how objects change their state. If you take the next step and try to apply what […]

Modifying objects efficiently (Hibernate)

  This topic shows you how to make data manipulations more efficient. We optimize and reduce the amount of code that is necessary to store objects and discuss the most efficient processing options. You should be familiar with the basic object states and the persistence interfaces; the previous topics are required reading to understand this […]

Optimizing fetching and caching (Hibernate)

  In this topic, we’ll show you how to retrieve objects from the database and how you can optimize the loading of object networks when you navigate from object to object in your application. We then enable caching; you’ll learn how to speed up data retrieval in local and distributed applications. Defining the global fetch […]

Querying with HQL and JPA QL (Hibernate)

  Queries are the most interesting part of writing good data access code. A complex query may require a long time to get right, and its impact on the performance of the application can be tremendous. On the other hand, writing queries becomes much easier with more experience, and what seemed difficult at first is […]

Advanced query options (Hibernate)

  This topic explains all query options that you may consider optional or advanced. You’ll need the first subject of this topic, the Criteria query interface, whenever you create more complex queries programmatically. This API is much more convenient and elegant than programmatic generation of query strings for HQL and JPA QL. Unfortunately, it’s also […]

Creating and testing layered applications (Hibernate)

  Hibernate is intended to be used in just about any architectural scenario imaginable. Hibernate may run inside a servlet container; you can use it with web application framework like Struts, WebWork, or Tapestry, or inside an EJB container, or to manage persistent data in a Java Swing application. Even—perhaps especially—with all these options, it’s […]

Introducing JBoss Seam (Hibernate)

Mapping quick reference (Hibernate)

  Many Hibernate topics list all possible XML mapping elements and mapping annotations in a topic. The usefulness of doing so is questionable. First, this information is already available in a convenient form; you only need to know how to get it. Second, any reference we might add here would be outdated in a matter […]

SQL fundamentals (Hibernate)

  A table, with its rows and columns, is a familiar sight to anyone who has worked with an SQL database. Sometimes you’ll see tables referred to as relations, rows as tuples, and columns as attributes. This is the language of the relational data model, the mathematical model that SQL databases (imperfectly) implement. The relational […]