Mansart targets the standard (Jakarta Data 1.0 + Jakarta Persistence 3.2), not proprietary extensions. Migrating from Spring Data is trivial — the Jakarta Data spec explicitly took Spring Data conventions on board. Hibernate / EclipseLink takes more effort if the application uses out-of-spec features (custom dialects, listeners, events).
From Spring Data JPA
| Spring Data | Mansart Jakarta Data | Note |
|---|---|---|
|
|
Standardized API — very close signatures. |
|
|
Different semantics: Jakarta Data scope = bean repository, not exception translator. |
Derived methods ( |
Identical |
Convention adopted by Jakarta Data. |
|
|
JDQL is simpler than JPQL — the leading SELECT is implicit. |
|
|
Identical semantics. |
|
|
Six standard TxType values. No |
|
|
No |
|
Migrating from Spring Data is the shortest path. Derived method names and |
From Hibernate ORM 6/7
| Hibernate | Mansart | Note |
|---|---|---|
|
|
For everyday needs, switch to |
HQL |
JPQL (M7) or JDQL (delivered) |
Mansart targets the spec, not proprietary HQL extensions. |
|
Identical |
Standard JPA annotations recognized as-is. |
|
Out of scope v1 |
Deferred to |
Hibernate Reactive |
|
Blocking JDBC under Loom — no Vert.x, no callback. |
JPA listeners ( |
Out of scope v1 |
Covered by M7. |
Criteria API |
Out of scope v1 |
Covered by M7. |
Schema generation ( |
External (Flyway / Liquibase recommended) |
Mansart does not handle DDL migrations. |
From EclipseLink / OpenJPA
Less common case; transposition similar to Hibernate. Standard JPA 3.2 annotations are recognized as-is; proprietary extensions (@CustomConverter, @Cache(…)) must be rewritten as standard equivalents or deferred to mansart-persistence (M7).
From HikariCP (pool)
| HikariCP | mansart-pool | Note |
|---|---|---|
|
|
Implements standard |
|
|
Similar API — |
|
|
Same. |
|
|
Same. |
|
|
Same. |
|
|
Same. |
|
|
Same. |
|
|
Mansart prefers |
Micrometer / Prometheus metrics |
|
Micrometer bridge on the |
Performance comparison: see lien:https://codeberg.org/Vidocq/mansart/src/branch/main/mansart-pool/BENCH.md[mansart-pool BENCH.md]. mansart-pool is virtual-thread-native and avoids the pinning cost under Loom load.
Known pitfalls
-
No entity proxy — Mansart materializes entities directly. Lazy loading is not magical:
@ManyToOne(fetch=LAZY)loads the attribute on next access through a getter intercepted by APT-generated bytecode (M5). -
No implicit auto-flush — the user calls
flush()explicitly or ends the transaction. Different from Hibernate which flushes on query. -
No runtime entity scan — the APT registers entities at compile time. Adding an
@Entitywithout recompiling is a classic mistake when migrating from Hibernate. -
No
@OneToManyin v1 — model explicitly via the owning@ManyToOneand afindByOwner(…)in the target’s repository.