# mybatis-flex/mybatis-flex

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/mybatis-flex-mybatis-flex).**

2,554 stars · 249 forks · Java · apache-2.0

## Links

- GitHub: https://github.com/mybatis-flex/mybatis-flex
- Homepage: https://mybatis-flex.com
- awesome-repositories: https://awesome-repositories.com/repository/mybatis-flex-mybatis-flex.md

## Topics

`java` `mybatis` `mysql` `orm` `sql`

## Description

MyBatis-Flex is an object-relational mapping framework for Java that extends MyBatis with a fluent API and automated CRUD operations. It provides a data access suite featuring an automatic CRUD data mapper, a type-safe SQL query builder, and a row-based query engine for manipulating records without predefined entity classes.

The framework includes a multi-dialect SQL translator that converts generated syntax across different database engines, such as MySQL, PostgreSQL, and Oracle. It further distinguishes itself by offering annotation-free entity mapping using runtime reflection and naming conventions, alongside configurable strategies for automatic primary key generation.

The library covers broad capability areas including type-safe query construction with support for joins and subqueries, dynamic database result paging, and lightweight data access abstractions to reduce boilerplate code.

## Tags

### Data & Databases

- [Fluent Query Construction](https://awesome-repositories.com/f/data-databases/expression-based-data-querying/fluent-query-apis/sql-syntax-tree-construction/fluent-query-construction.md) — Offers a chainable, object-oriented fluent API for the programmatic construction of SQL statements.
- [ORM Frameworks](https://awesome-repositories.com/f/data-databases/type-mapping-frameworks/script-to-native-type-mappings/entity-mappings/orm-frameworks.md) — Extends MyBatis with a fluent API and automated CRUD operations for object-relational mapping.
- [Object-to-Row Mapping](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage/data-persistence-management/object-to-row-mapping.md) — Simplifies data access by mapping database rows directly to Java objects for retrieval and modification. ([source](https://cdn.jsdelivr.net/gh/mybatis-flex/mybatis-flex@main/README.md))
- [Database Dialect Adapters](https://awesome-repositories.com/f/data-databases/database-dialect-adapters.md) — Translates generic database logic into engine-specific syntax for MySQL, PostgreSQL, and Oracle.
- [Entity CRUD Management](https://awesome-repositories.com/f/data-databases/entity-relationships/entity-crud-management.md) — Provides a data access layer for standard CRUD operations on entity classes with automatic key generation.
- [Type-Safe Query Construction](https://awesome-repositories.com/f/data-databases/expression-based-data-querying/fluent-query-apis/sql-syntax-tree-construction/fluent-query-construction/type-safe-query-construction.md) — Ships a type-safe SQL builder providing compile-time autocompletion for complex joins, grouping, and subqueries. ([source](https://cdn.jsdelivr.net/gh/mybatis-flex/mybatis-flex@main/README.md))
- [Fluent Query Builders](https://awesome-repositories.com/f/data-databases/fluent-query-builders.md) — Offers a type-safe, chainable API for constructing complex SQL queries.
- [Query Condition Builders](https://awesome-repositories.com/f/data-databases/query-condition-builders.md) — Provides a fluent API for constructing complex SQL WHERE clauses and dynamic filtering criteria. ([source](https://mybatis-flex.com))
- [SQL CRUD Operations](https://awesome-repositories.com/f/data-databases/relational-database-storage/sql-crud-operations.md) — Simplifies standard create, read, update, and delete operations on relational tables. ([source](https://cdn.jsdelivr.net/gh/mybatis-flex/mybatis-flex@main/README.md))
- [SQL Dialect Adapters](https://awesome-repositories.com/f/data-databases/sql-dialect-adapters.md) — Translates generated SQL into engine-specific syntax using pluggable dialect adapters at runtime.
- [Reflection-Based Mappings](https://awesome-repositories.com/f/data-databases/type-mapping-frameworks/script-to-native-type-mappings/entity-mappings/reflection-based-mappings.md) — Implements annotation-free entity mapping by using runtime reflection and naming conventions to link Java objects to database tables.
- [Type-Safe Query Builders](https://awesome-repositories.com/f/data-databases/type-safe-query-builders.md) — Ensures SQL validity and provides compile-time autocompletion for joins and filters.
- [Database Pagination Adapters](https://awesome-repositories.com/f/data-databases/database-pagination-adapters.md) — Implementing offset and limit logic for large datasets using a standardized adapter that works across different database systems.
- [Row-Based Query Interfaces](https://awesome-repositories.com/f/data-databases/database-query-engines/row-based-query-interfaces.md) — Provides a flexible interface to query and manipulate records using key-value mappings instead of entity classes.
- [Dynamic Row Mapping](https://awesome-repositories.com/f/data-databases/database-schema-mapping/row-mapping-logic/dynamic-row-mapping.md) — Enables database operations using a flexible Row object instead of predefined entity classes.
- [Automatic Primary Key Injection](https://awesome-repositories.com/f/data-databases/entity-modeling/primary-keys/automatic-primary-key-injection.md) — Provides automatic generation and insertion of primary keys using configurable strategies like auto-increment or sequences.
- [Key Generation Strategies](https://awesome-repositories.com/f/data-databases/entity-modeling/primary-keys/key-generation-strategies.md) — Implements configurable strategies for automatic primary key generation.
- [Entity-Free Querying](https://awesome-repositories.com/f/data-databases/entity-relationships/active-record-entities/entity-free-querying.md) — Allows manipulating database records via flexible row mapping when entity classes are not desired.
- [Pagination](https://awesome-repositories.com/f/data-databases/pagination.md) — Wraps query results with metadata and rewrites SQL to include dialect-specific pagination.
- [Raw Query Interfaces](https://awesome-repositories.com/f/data-databases/raw-query-interfaces.md) — Provides a row-based query engine to manipulate database records without requiring predefined entity classes. ([source](https://cdn.jsdelivr.net/gh/mybatis-flex/mybatis-flex@main/README.md))
- [Dialect Transformers](https://awesome-repositories.com/f/data-databases/sql-dialect-adapters/dialect-transformers.md) — Rewrites SQL queries to apply database-specific pagination syntax based on the active dialect.

### Part of an Awesome List

- [SQL Query Builders](https://awesome-repositories.com/f/awesome-lists/data/sql-query-builders.md) — Provides a programmatic way to build complex SQL queries with joins and subqueries.

### Programming Languages & Runtimes

- [Object Mapping](https://awesome-repositories.com/f/programming-languages-runtimes/reflection-based-object-manipulation/object-mapping.md) — Maps database tables to Java objects using runtime reflection and naming conventions.
