- 100k jar
- 439 unit tests
- 96% code coverage
- 11 supported dbs
- 0 dependencies
Welcome
Persism is a light weight, auto-discovery, auto-configuration, and convention over configuration ORM (Object Relational Mapping) library for Java.
“Coding by convention, kind of like Apache Wicket… I guess it has its place, yes. jOOQ also does auto-mapping of column names. But not of table names. Nice thinking” lukaseder - Author of JOOQ
For Java 8 developers go here
Simple
The API for Persism is small. Mostly you just need a Connection and a Persism Session object, and you’re good to go. Your POJOs can have optional annotations for table and column names and can optionally implement a Persistable interface for where you need to track changes to properties for UPDATE statements.
Auto-Discovery
Create a table, write a JavaBean, run a query. Persism uses simple mapping rules to find your table and column names and only requires an annotation where something is outside convention.
Convention over configuration
Persism requires no special configuration. Drop the JAR into your project and go.
Persism has annotations though they are only needed where something is outside the conventions. In many cases you probably don’t even need them.
Persism can usually detect the table and column mappings for you including primary/generated keys and columns with defaults.
Persism will do the correct thing by default. Persism understands that your class is called “Customer” and your table is called “CUSTOMERS”. It understands that your table column is “CUSTOMER_ID” and your property is “customerId”. Persism works fine even when your class is called Category and your table is called CATEGORIES. No problem. Persism uses annotations as a fall back – annotate only when something is outside the conventions.
Tiny
Persism is about 100k and has zero dependencies however it will utilize logging based on whatever is available at runtime - SLF4J, LOG4J2, LOG4J or JUL.
SBOM Report - No vulnerable components found! :)
Javadoc For Version 2.x - Javadoc For Version 1.x
Code Coverage For Version 2.x - Code Coverage For Version 1.x
Other documentation
Cookbook: Implementing Persistable interface
How to use the new @Join Annotation
Supported Databases