Open fabl3ss opened 1 year ago
Can confirm this issue exists. Following snippet from docs generated SQL query with the UUID fields as '3189cd28-d404-4b9c-87c6-9a4d6577959d'::BYTEA
.
Workaround: Just add type:uuid to struct fields. The same goes for custom database types (e.g. enums).
import (
"github.com/google/uuid"
// some more imports
)
type Refund struct {
bun.BaseModel `bun:"table:notification.refunds"`
TransactionId uuid.UUID `bun:",pk,type:uuid"`
OrderId uuid.UUID `bun:",type:uuid"`
IsNotified bool
CreatedAt time.Time
}
Hi!
When attempting to perform a bulk update on my entities, I encountered an error from PostgreSQL. I would appreciate any guidance or suggestions on how to resolve this issue.
The specific error message I'm encountering is:
DDL:
Struct:
Usage:
Resulting SQL query: