- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for owner_ids (0.08 sec)
-
schema/schema_test.go
{Name: "OwnerID", DBName: "company_owner_id", BindNames: []string{"Base", "OwnerID"}, DataType: schema.Int, Size: 64, TagSettings: map[string]string{"EMBEDDED": "EMBEDDED", "EMBEDDEDPREFIX": "company_"}}, {Name: "OwnerID", DBName: "owner_id", BindNames: []string{"CorpBase", "OwnerID"}, DataType: schema.String}, } for _, f := range fields {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jun 20 12:19:31 UTC 2024 - 13.3K bytes - Viewed (0) -
schema/relationship_test.go
FieldSchema: "Toy", Polymorphic: Polymorphic{ID: "owner_id", Type: "Type", Value: "users"}, References: []Reference{ {ForeignKey: "Type", ForeignSchema: "Toy", PrimaryValue: "users"}, }, }, }, }, }) }) t.Run("has many", func(t *testing.T) { type Toy struct { ID int Name string OwnerID int OwnerType string }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Apr 15 03:20:20 UTC 2024 - 25.5K bytes - Viewed (0) -
docs/em/docs/tutorial/sql-databases.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 25K bytes - Viewed (0) -
tests/joins_test.go
func TestJoinsPreload_Issue7013_RelationEmpty(t *testing.T) { type ( Furniture struct { gorm.Model OwnerID *uint } Owner struct { gorm.Model Furnitures []Furniture CompanyID *uint Company Company } Building struct { gorm.Model Name string OwnerID *uint Owner Owner } ) DB.Migrator().DropTable(&Building{}, &Owner{}, &Furniture{})
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:58:13 UTC 2024 - 15K bytes - Viewed (0) -
docs/zh/docs/tutorial/sql-databases.md
这里不是将每个关键字参数传递给Item并从Pydantic模型中读取每个参数,而是先生成一个字典,其中包含Pydantic模型的数据: `item.dict()` 然后我们将dict的键值对 作为关键字参数传递给 SQLAlchemy `Item`: `Item(**item.dict())` 然后我们传递 Pydantic模型未提供的额外关键字参数`owner_id`: `Item(**item.dict(), owner_id=user_id)` /// ## 主**FastAPI**应用程序 现在在`sql_app/main.py`文件中 让我们集成和使用我们之前创建的所有其他部分。 ### 创建数据库表 以非常简单的方式创建数据库表: //// tab | Python 3.9+
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 27.1K bytes - Viewed (0) -
schema/relationship.go
// // type User struct { // Toys []Toy `gorm:"polymorphic:Owner;"` // } // type Pet struct { // Toy Toy `gorm:"polymorphic:Owner;"` // } // type Toy struct { // OwnerID int // OwnerType string // } func (schema *Schema) buildPolymorphicRelation(relation *Relationship, field *Field) { polymorphic := field.TagSettings["POLYMORPHIC"] relation.Polymorphic = &Polymorphic{
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 22.7K bytes - Viewed (0)