- Sort Score
- Num 10 results
- Language All
Results 1 - 1 of 1 for TestMany2ManyWithDefaultValueUUID (0.22 seconds)
-
tests/postgres_test.go
} type Category struct { ID uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4();"` Title string Posts []*Post `gorm:"Many2Many:post_categories"` } func TestMany2ManyWithDefaultValueUUID(t *testing.T) { if DB.Dialector.Name() != "postgres" { t.Skip() } if err := DB.Exec(`create extension if not exists "uuid-ossp"`).Error; err != nil {Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Sat Oct 08 09:16:32 GMT 2022 - 6.4K bytes - Click Count (0)