- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestMany2ManyWithDefaultValueUUID (0.21 sec)
-
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 {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Oct 08 09:16:32 GMT 2022 - 6.4K bytes - Viewed (3)