A revolutionary ORM framework for both java and kotlin.
English | 中文
This section has undergone a major upgrade, and the documentation is actively being restructured. Please refer to the
save-command
examples in the accompanying examples.
The core concept of Jimmer is to read and write data structures of arbitrary shapes as a whole, rather than simply processing entity objects.
Jimmer entity objects are not POJOs, and can easily express data structures of arbitrary shapes.
Data structures of any shape can be processed as a whole for:
Since Jimmer’s design philosophy is to read and write data structures of arbitrary shapes rather than processing simple objects, how does it differ from technologies with similar capabilities?
Comparison | Description |
---|---|
GraphQL | GraphQL only focuses on querying data structures of arbitrary shapes; Jimmer not only does this but also focuses on how to write data structures of arbitrary shapes |
GraphQL does not support recursive queries based on self-referencing properties, Jimmer does | |
JPA | In JPA, to control the shape of the data structure being saved, properties must be configured with insertable, updatable, or cascade (for associated properties). Regardless of the configuration, the saved data structure is fixed; Jimmer entities are not POJOs, their data structure shapes are ever-changing, no prior planning and design is needed, any business scenario can construct the data structure it needs and save it directly |
For queries, JPA’s |
|
In JPA, if you need to use a DTO object to query only part of the properties, the DTO must be a simple object without any associations. That is, it loses the most valuable capability of ORM, degrading from |
|
In JPA, updating an object results in all updatable columns being modified. For simplicity, developers rarely use |
|
JPA’s |
|
MongoDB | In MongoDB, each document structure is a data island. Although MongoDB's data structure is weakly typed, from a business perspective, which data islands exist and the internal hierarchical structure of each data island need to be designed and agreed upon in advance. Once the design and agreement are completed, the format of the entire data view is fixed and must be processed from a fixed perspective; In Jimmer, the shape of the data structure does not need to be designed in advance, any business scenario can freely plan a data structure format, and read and write the corresponding data structure as a whole. |
Based on this core concept, Jimmer will bring you convenience that was previously unattainable in any technology stack,
freeing you from dealing with tedious details and allowing you to focus on quickly implementing complex business logic.
Since Jimmer is a compile-time framework, and considering that not all users are familiar with apt
and ksp
, it’s necessary to mention an important detail.
Apt/Ksp
are standard technologies in the industry, and Java IDEs provide support for them.
In most cases, your modifications will include changes to Java or Kotlin code, such as changes in entity types or Web Controller*(Jimmer has its own implementations for OpenAPI and TypeScript generation)*. In this case, you only need to click the IDE’s Run
or Debug
button once, without requiring a full compilation, to trigger all pre-compilation behaviors, the automatically generated source code and resource files will update automatically.
In rare cases, if you only modify DTO files, meaning there are no Java or Kotlin source code changes within the same project except for the DTO files, you have three options:
Rebuild
button, which can achieve this purposeRun
or Debug
button`