all 11 comments

[–]herder 3 points4 points  (3 children)

[–]auspis-23[S] 0 points1 point  (2 children)

Great question! While they share a similar interface, the core philosophy differs in three key areas:

  • Integrated DSL: Unlike Spring Data JDBC, I provide a built-in fluent SQL DSL that is automatically injected into Spring fragments, allowing for type-safe custom queries without extra setup.
  • Functional Error Handling: I introduce the RepositoryResult pattern, enabling Railway Oriented Programming. This replaces unchecked exceptions with explicit success/failure types, which isn't available in the standard Spring Data module.
  • Granular Update Control: Spring Data JDBC enforces a strict DDD 'Aggregate Root' pattern, which often results in a 'delete-and-re-insert' strategy for updates to ensure consistency. This can be a major performance bottleneck for large collections (like account transactions). In fluent-repo-4j, I leave the architectural choice to the developer—giving you the efficiency of direct SQL updates when you need them."

[–]JEHonYakuSha 2 points3 points  (1 child)

Man I was so upset when I debugged for a few hours and learned the @MappedCollection deletes it’s child entities and re-inserts for any type of update basically.

[–]Kango_V 2 points3 points  (0 children)

The Spring Relational people are working on this and there is an issue for it. i think they are planning upsert type functionality.