Skip to content

Generate correct imports in frontend format#3037

Merged
tyt2y3 merged 5 commits intoSeaQL:masterfrom
DexterHill0:fix-frontend-datetime
Apr 22, 2026
Merged

Generate correct imports in frontend format#3037
tyt2y3 merged 5 commits intoSeaQL:masterfrom
DexterHill0:fix-frontend-datetime

Conversation

@DexterHill0
Copy link
Copy Markdown
Contributor

PR Info

Bug Fixes

  • When using the --frontend-format argument, if any model column types use external types from libraries like Uuid or any datetime types, for example, the generated code does not include the correct imports; it assumes there's a prelude import, but that is excluded in the frontend format, so the types just error.

Breaking Changes

Should not be a breaking change.

Notes

I added tests for this, following the existing format as best as I can.

@Huliiiiii Huliiiiii requested a review from tyt2y3 April 3, 2026 15:01
@DexterHill0
Copy link
Copy Markdown
Contributor Author

Forgot to run the whole test suite, so I missed those failing tests. Hopefully they're fixed now

@DexterHill0
Copy link
Copy Markdown
Contributor Author

Any update on this?

@tyt2y3
Copy link
Copy Markdown
Member

tyt2y3 commented Apr 21, 2026

sorry for the late reply, I'll take a look

Comment thread sea-orm-codegen/src/entity/writer/frontend.rs Outdated
Comment thread sea-orm-codegen/src/entity/writer.rs Outdated
@DexterHill0 DexterHill0 force-pushed the fix-frontend-datetime branch from bbdef96 to 384a928 Compare April 22, 2026 07:47
@tyt2y3 tyt2y3 merged commit f0ec2b2 into SeaQL:master Apr 22, 2026
37 of 39 checks passed
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.

Frontend format uses TimeDateTimeWithTimeZone, which is sea-orm specific.

2 participants