The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects / classes and a relational database. Lightweight JPA here means the implementation of the API can run in an environment which has significant resource constraints such as a mobile device. The motivation for the Java developer is to take advantage of the ease with which of application objects can be persisted to a database without the hassle of having to write boilerplate database code.
The OrmLite Foreign Collection sample is reworked as the Jpalite foreign-collection project. The original sample appears in the ormlite-jdbc test sources in the com.j256.ormlite.jdbc.examples.foreignCollection package. The readme text explains: "ORMLite supports what it calls "foreign" objects. These are fields that are other objects stored in the database." The Jpalite entity classes are adorned with Java Persistence annotations such as @Id, @Column, @OneToOne and @OneToMany. Jpalite simplifies working with foreign collections by hiding the details of the Ormlite Foreign Collection implementation.
The OrmLite ManyToMany sample is reworked as the Jpalite many2many-example project. The original sample appears in the ormlite-jdbc test sources in the com.j256.ormlite.jdbc.examples.manytomany package. The readme text explains: "This shows how you can use a join table to implement many-to-many type of object layout." The Jpalite sample modifies the original by archetecting 2 back-to-back one-to-many table associations with the join table.
People and pets presents an example of using 2 different persistence units (PUs)in a single database. The following points about Jpalite persistence:
People and pets V2 introduces a new "quote" column to both database tables. The necessary changes for going from V1 to V2 happen automatically when the V2 application detects it is connected to a V1 database.