Skip to content

feat(orm): MyBatis XML mapper scanning#1607

Open
hongtewu-dotcom wants to merge 2 commits into
abhigyanpatwari:mainfrom
hongtewu-dotcom:feat/mybatis-orm-scanning
Open

feat(orm): MyBatis XML mapper scanning#1607
hongtewu-dotcom wants to merge 2 commits into
abhigyanpatwari:mainfrom
hongtewu-dotcom:feat/mybatis-orm-scanning

Conversation

@hongtewu-dotcom

Copy link
Copy Markdown

Adds MyBatis XML mapper support to the ORM phase. Scans XML files, extracts table names from SQL, and creates QUERIES edges from Mapper methods to table nodes. No schema changes needed.

Key behaviors:

  • Namespace to Java file path resolution (dot-to-slash)
  • Table extraction handles FROM/INTO/UPDATE/JOIN, CDATA, XML comments
  • Method-level edges via pre-built index; strips #N overload suffix
  • Inherited methods (e.g. MybatisBaseMapper) fall back to file-level
  • XML-only orphan statements skipped (no edge)

Tests: test/integration/orm-dataflow.test.ts, 6 pass.

Summary

Motivation / context

Areas touched

  • gitnexus/ (CLI / core / MCP server)
  • gitnexus-web/ (Vite / React UI)
  • .github/ (workflows, actions)
  • eval/ or other tooling
  • Docs / agent config only (AGENTS.md, CLAUDE.md, .cursor/, llms.txt, etc.)

Scope & constraints

In scope

Explicitly out of scope / not done here

Implementation notes

Testing & verification

  • cd gitnexus && npm test
  • cd gitnexus && npm run test:integration (if core/indexing/MCP paths changed)
  • cd gitnexus && npx tsc --noEmit
  • cd gitnexus-web && npm test (if web changed)
  • cd gitnexus-web && npx tsc -b --noEmit (if web changed)
  • Manual / Playwright E2E (note environment — see gitnexus-web/e2e/)

Risk & rollout

Checklist

  • PR body meets repo minimum length (workflow may label short descriptions)
  • If AGENTS.md / overlays changed: headers, scope block, and changelog updated per project conventions
  • No secrets, tokens, or machine-specific paths committed

Adds MyBatis XML mapper support to the ORM phase. Scans <mapper> XML
files, extracts table names from SQL, and creates QUERIES edges from
Mapper methods to table nodes. No schema changes needed.

Key behaviors:
- Namespace to Java file path resolution (dot-to-slash)
- Table extraction handles FROM/INTO/UPDATE/JOIN, CDATA, XML comments
- Method-level edges via pre-built index; strips #N overload suffix
- Inherited methods (e.g. MybatisBaseMapper) fall back to file-level
- XML-only orphan statements skipped (no edge)

Tests: test/integration/orm-dataflow.test.ts, 6 pass.
@vercel

vercel Bot commented May 15, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the NexusCore Team on Vercel.

A member of the Team first needs to authorize it.

P0: strip inner-class suffix from namespace before path resolution
P1: support Dao/DAO/Repository.java naming in addition to Mapper.java
Tests: CDATA extraction, XML comment exclusion, namespace fallback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant