jpa
This is the archive for jpa.
Dive into the archives.
- Specifying Different Databases for Unit and System Testing
Quality software requires thorough testing. Most applications today also utilize databases for persistent storage. As such, being able to test your application against your target database is important, be it unit testing, functional testing, or system testing.
One of the key points in unit testing code that performs database operations is that the database must always […]
- Reusing JPA models using embedded entities and composition
We’ve all heard of the debate regarding inheritance vs composition. Composition is certainly favored more over inheritance unless there is an “is-a” relationship between two classes.
In the ORM world, specifically in JPA, composition is achieved using join-relationships (i.e. One-To-One, One-To-Many, Many-To-One, Many-To-Many), often overlooked is the functionality to embed a class in your models using […]

