Skip to content

feat(entity): support json clob blob content type#32638

Open
yuliuyi717-ux wants to merge 4 commits intojhipster:mainfrom
yuliuyi717-ux:codex/issue-14526-0311-0058
Open

feat(entity): support json clob blob content type#32638
yuliuyi717-ux wants to merge 4 commits intojhipster:mainfrom
yuliuyi717-ux:codex/issue-14526-0311-0058

Conversation

@yuliuyi717-ux
Copy link
Contributor

Summary

This PR adds explicit generator support for JSON-oriented CLOB fields by introducing a new blob content type: json.

What is included

  • Added json as a valid fieldTypeBlobContent value.
  • Added a CLI prompt option: A CLOB (JSON field) when selecting blob content for byte[] fields.
  • Mapped fieldTypeBlobContent=json to TextBlob while preserving the json marker for template logic.
  • Treated json as text-like (same as CLOB text) for:
    • faker/sample data generation,
    • content-type companion column generation,
    • liquibase column/load type generation,
    • DTO java type selection,
    • client-side content-type field generation.
  • Added targeted tests for conversion and field preparation behavior.

Why

TextBlob can store JSON payloads, but generation logic currently only distinguishes text / binary-oriented blob content.
This change makes JSON-CLOB usage explicit and consistent across generation paths while keeping existing TextBlob storage behavior.

Refs #14526

Validation

npx -y node@22 ./node_modules/.bin/tsc -p tsconfig.spec.json --noEmit
npx -y node@22 ./node_modules/.bin/esmocha generators/base-application/support/prepare-field.spec.ts generators/entity/single-entity.spec.ts generators/liquibase/generator.spec.ts --no-insight --forbid-only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant