A Java database access framework with compile-time code generation, type-safe SQL, and entity associations.
Doma is a database access framework for Java that provides compile-time code generation and type-safe SQL query building. It solves the problem of runtime SQL errors by validating queries and generating code during compilation, offering a clean alternative to traditional ORMs.
Java developers building applications that require type-safe database interactions, especially those who prefer SQL control over full ORM abstraction.
Developers choose Doma for its compile-time safety, zero runtime dependencies, and the ability to write SQL directly while maintaining type safety through its Criteria API and SQL templates.
DAO oriented database mapping framework for Java
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses annotation processing to generate and validate code at compile time, catching SQL errors early and reducing runtime failures, as emphasized in its philosophy.
Enables building SQL queries with compile-time type checking, shown in examples that prevent common runtime errors like mismatched columns or types.
Supports two-way SQL in external files with conditional logic (e.g., /*%if*/), keeping SQL readable and maintainable while integrating with Java code.
Runs independently without other libraries, ensuring lightweight deployments and avoiding dependency conflicts, as highlighted in the key features.
Requires explicit configuration in build tools like Gradle or Maven, which can be complex, especially in IDEs like Eclipse as noted in the Maven setup instructions.
Demands familiarity with writing and managing external SQL files, which might be a barrier for developers used to ORM abstractions or fluent query builders.
Has fewer integrations and community resources compared to mainstream options like JPA, though projects like doma-spring-boot exist but may lack extensive support.