myfavs-orm-helper

Explains MyFavs ORM architecture, annotations, CRUD APIs, and dialect system for Java developers.

10|3|Updated Jul 18, 2019
One-click install
npx skills add https://github.com/tanqimin/MyFavsORM --skill myfavs-orm-helper-tanqimin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: myfavs-orm-helper
Source: https://github.com/tanqimin/MyFavsORM/tree/main/.agents/skills/myfavs-orm-helper
Command: npx skills add https://github.com/tanqimin/MyFavsORM --skill myfavs-orm-helper-tanqimin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Navigating the MyFavs ORM codebase is difficult because its CRUD logic is split across seven internal components, six database dialects, and multiple annotation-driven conventions. This Skill helps developers understand the framework's architecture, locate the right source files, and apply correct usage patterns without reading the entire codebase. ## Core Features & Use Cases - Architecture Navigation: Maps the AbstractOrm composition pattern (OrmExecutor, OrmInserter, OrmUpdater, OrmDeleter, OrmSelector, OrmPager, OrmSqlBuilder) and explains which component to modify for a given change. - Annotation & API Reference: Documents @Table, @Column, @PrimaryKey, @LogicDelete, @Criterion behavior, Cond condition builders, Orm CRUD methods, and pagination models (Page/PageLite). - Dialect & Spring Integration Guidance: Covers SqlDialect implementations for MySQL, PostgreSQL, Oracle, SQL Server, and H2, plus Spring Boot starter usage with SpringConnFactory and Repository patterns. - Use Case: When asked "where do I change UPSERT behavior for SQL Server", the Skill directs you to SqlServerDialect.getUpsertSql() rather than the Orm subclass, and explains the isIdentity parameter behavior. ## Quick Start Ask the assistant to explain how MyFavs ORM implements pagination across different database dialects and which source files contain the relevant logic.

Frequently Asked Questions about myfavs-orm-helper

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add support for a new database in MyFavs ORM?

Create a new SqlDialect implementation defining pagination and UPSERT SQL generation, then create an AbstractOrm subclass that injects that dialect via its constructor. Register the mapping in OrmFactory so createOrm() resolves your new DbType.

How does MyFavs ORM compare to MyBatis for Java database access?

MyFavs ORM targets developers who prefer handwritten SQL, offering a lightweight Query class over raw JDBC plus an Orm class with annotation-driven entity mapping and automatic CRUD. It avoids MyBatis XML configuration and depends only optionally on slf4j-api and Druid.

Does MyFavs ORM support Spring Boot declarative transactions?

Yes, through SpringConnFactory, which delegates connection acquisition and release to Spring's DataSourceUtils. This lets ORM operations join the connection managed by @Transactional, and the starter provides Repository and BaseService classes for CRUD and programmatic transactions.

Why is my @Table annotation not recognized on a subclass entity?

@Table lacks the @Inherited meta-annotation, so subclasses must declare @Table independently to be recognized as entities. In contrast, @Column, @PrimaryKey, and @LogicDelete are inherited by subclasses automatically.

How does logical delete work in MyFavs ORM?

Fields marked @LogicDelete turn DELETE operations into UPDATE statements that set the logic-delete column to the primary key value, not a boolean flag. The logic-delete field type must therefore match the primary key field type.

What are the limitations of PageLite pagination?

PageLite queries pageSize + 1 rows to infer hasNext without a COUNT query, so it cannot report total records or total pages. When the final page is exactly full, hasNext may be incorrectly true.