February 2014
Beginner
1248 pages
62h 25m
English
The next example demonstrates two named queries that were autogenerated when you created the books database’s persistence unit in Section 29.3.5. For discussion purposes we split the program into Figs. 29.2 and 29.3, each showing the corresponding portion of the program’s output. Once again, we use Java 8’s lambdas and streams capabilities to display the results. As you’ll see, we use the relationships between the Authors and Titles entities to display information from both database tables. Reminder: Before you run this example, ensure that the Java DB database server is running; otherwise, you’ll get runtime exceptions indicating that the app cannot connect to the database server. For ...
Read now
Unlock full access