Skip to content

Ormc v3 — Field v3 Migration + Permitted in Schema#21

Merged
cdvelop merged 2 commits intomainfrom
orm-field-v3-migration-10026323555067253950
Mar 26, 2026
Merged

Ormc v3 — Field v3 Migration + Permitted in Schema#21
cdvelop merged 2 commits intomainfrom
orm-field-v3-migration-10026323555067253950

Conversation

@cdvelop
Copy link
Copy Markdown
Collaborator

@cdvelop cdvelop commented Mar 23, 2026

The implementation follows the plan described in docs/PLAN.md. It migrates the ORM to github.com/tinywasm/fmt v0.19.0 (Field v3), introducing a new validation system.

Key changes:

  1. ormc.go: Updated FieldInfo and ParseStruct to parse validate tags and omitempty from json tags. Removed form tag support.
  2. Code Generation: ormc now generates a structured Schema() with Permitted and OmitEmpty fields. It also generates a composite Validate() method for each model that calls fmt.ValidateFielder(m) and format-specific validators from github.com/tinywasm/form.
  3. db.go: Create and Update methods now call the model's Validate() method if it implements fmt.Validator.
  4. Documentation: Updated docs/SKILL.md and docs/ARQUITECTURE.md to reflect the new validation and tag system.
  5. Tests: Updated existing tests and added new test cases to verify the generation and execution of the new validation logic.

Verified with gotest (coverage: 90.4% of github.com/tinywasm/orm).


PR created automatically by Jules for task 10026323555067253950 started by @cdvelop

…s, remove Input/JSON/form tags

- Update FieldInfo to include Permitted and OmitEmpty fields.
- Remove Input and JSON metadata fields.
- Update ormc tag parsing to handle validate:"..." and json:",omitempty".
- Implement composite Validate() method generation in ormc.
- Add pre-operation validation in db.go.
- Update documentation (docs/SKILL.md, docs/ARQUITECTURE.md).
- Update and add tests for the new validation system.

Co-authored-by: cdvelop <44058491+cdvelop@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@cdvelop cdvelop merged commit 6fa2520 into main Mar 26, 2026
@cdvelop cdvelop deleted the orm-field-v3-migration-10026323555067253950 branch March 26, 2026 13:45
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