-
-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
Describe the feature
For MySQL databases the DSN option parseTime
needs to be True
for any gorm.Model
based model to work.
This should be by default on and only be disabled in special cases.
Or at least stated clearly that this option is required for gorm.Model
to work properly.
Motivation
Any fetch on the resulting database structures fails with:
Fetch returns empty structure
2025/07/24 06:15:30 /home/runner/work/playground/playground/main_test.go:24 sql: Scan error on column index 1, name "created_at": unsupported Scan, storing driver.Value type []uint8 into type *time.Time
[0.791ms] [rows:1] SELECT * FROM `users` WHERE `users`.`id` = 1 AND `users`.`deleted_at` IS NULL ORDER BY `users`.`id` LIMIT 1
main_test.go:25: Failed, got error: sql: Scan error on column index 1, name "created_at": unsupported Scan, storing driver.Value type []uint8 into type *time.Time
User (1): User (1) was fetched
Related Issues
Metadata
Metadata
Assignees
Labels
No labels