- Sort Score
- Result 10 results
- Languages All
Results 31 - 33 of 33 for PrimaryKey (0.49 sec)
-
tests/preload_test.go
t.Fatalf("Expected first query to preload manager tools, got: %s", query[0]) } } func TestEmbedPreload(t *testing.T) { type Country struct { ID int `gorm:"primaryKey"` Name string } type EmbeddedAddress struct { ID int Name string CountryID *int Country *Country } type NestedAddress struct { EmbeddedAddress }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:21:03 GMT 2024 - 14.9K bytes - Viewed (0) -
statement.go
if v.Table != "" { if v.Table == clause.CurrentTable { write(v.Raw, stmt.Table) } else { write(v.Raw, v.Table) } writer.WriteByte('.') } if v.Name == clause.PrimaryKey { if stmt.Schema == nil { stmt.DB.AddError(ErrModelValueRequired) } else if stmt.Schema.PrioritizedPrimaryField != nil { write(v.Raw, stmt.Schema.PrioritizedPrimaryField.DBName)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 19.8K bytes - Viewed (0) -
tests/query_test.go
AssertEqual(t, err, gorm.ErrModelAccessibleFieldsRequired) var p2 interface{} err = DB.Table("ps").Clauses(clause.Eq{Column: clause.Column{ Table: clause.CurrentTable, Name: clause.PrimaryKey, }, Value: 1}).Scan(&p2).Error AssertEqual(t, err, gorm.ErrModelValueRequired) } func TestQueryScanToArray(t *testing.T) { err := DB.Create(&User{Name: "testname1", Age: 10}).Error if err != nil {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:22:53 GMT 2024 - 49.8K bytes - Viewed (0)