Chapter 24Creating Advanced Mappings and Custom Data Types
- Why convert nonstandard data types?
- How to embed POJOs inside entities
- How to define relationships between entities
- Using revisions and timestamps to version entities
- How to define common entity ancestors
- How to map
Collections andMaps of basic and embedded values - Using multiple tables to store entities
- Constructing programmatic triggers
- Using load time weaving to lazy load simple properties
WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
You can find the wrox.com code downloads for this chapter at http://www.wrox.com/go/projavaforwebapps on the Download Code tab. The code for this chapter is divided into the following major examples:
- Advanced-Mappings Project
- Customer-Support-v18 Project
NEW MAVEN DEPENDENCIES FOR THIS CHAPTER
There are no new Maven dependencies for this chapter. Continue to use the Maven dependencies introduced in all previous chapters.
WHAT’S LEFT?
So far you’ve done some cool things with JPA. From simple lookups to complex queries to advanced searching, you’ve thoroughly explored the Java Persistence API and its CRUD capabilities.
So what’s left? Well, you’ve only touched the surface on the ways you can map objects to database tables. So far your entities have been very straightforward, containing only basic types that the JPA provider can directly and unambiguously convert to and from relational database field types. In reality, your entities will not be so trivial. You have already ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access