[Feature request] Go 1.27: add support for stdlib `uuid`
Author: ilovelinuxCreated Sep 15, 2026Updated Sep 15, 2026
- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior
Stdlib uuid.UUID is supported by database/sql:
- https://go-review.googlesource.com/c/go/+/725602
- https://github.com/golang/go/commit/ea06a67c692491e8f7e80d2a3ff300750157886d
However uuid.UUID is not a Valuer:
Because it's directly supported by databases/sql/driver:
- src/database/sql/driver/types.go#L262-L263
- https://github.com/golang/go/issues/62026#issuecomment-4040732347
- https://github.com/golang/go/issues/62026#issuecomment-4041442046
However, ent's UUID requires a driver.Valuer:
Expected Behavior
I'd like to see Go 1.27 uuid.UUID being supported.
Steps to Reproduce
// Go 1.27
package schema
import (
"uuid"
"entgo.io/ent"
"entgo.io/ent/schema/field"
)
type MyTable struct {
ent.Schema
}
func (MyTable) Fields() []ent.Field {
return []ent.Field{
field.UUID("user_id", uuid.UUID{}).Immutable(), // <- Not supported
}
}Your Environment
| Tech | Version |
|---|---|
| Go | 1.27.1 |
| Ent | 0.14.6 |
| Database | --- |
| Driver | --- |
Source: ent/ent