Skip to content
Branch: master
Find file History

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.


This shows how to persist a Order class which has a foreign Account object as one of its fields.

ORMLite supports what it calls "foreign" objects.  These are fields that are other objects
stored in the database.  For example, if you have Account and Order objects in your database,
the Order objects may have an associated Account so would have an foreign Account field.  See
the documentation for more information:

You may also want to learn about Foreign Collections which use foreign fields:

Also, the many-to-many example also foreign objects in combination with a join table.

This example depends on the H2 database which is a native Java SQL implementation.  You can
download the latest jar from the website:

For more examples see:
You can’t perform that action at this time.