Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 13 of 13 for owner_id (0.16 sec)

  1. docs/em/docs/how-to/sql-databases-peewee.md

    {!../../../docs_src/sql_databases_peewee/sql_app/models.py!}
    ```
    
    !!! tip
        🏒 ✍ 📚 🎱 🔢.
    
        ⚫️ 🔜 🔁 🚮 `id` 🔢 🔢 👑 🔑.
    
        ⚫️ 🔜 ⚒ 📛 🏓 ⚓️ 🔛 🎓 📛.
    
         `Item`, ⚫️ 🔜 ✍ 🔢 `owner_id` ⏮️ 🔢 🆔 `User`. ✋️ 👥 🚫 📣 ⚫️ 🙆.
    
    ## ✍ Pydantic 🏷
    
    🔜 ➡️ ✅ 📁 `sql_app/schemas.py`.
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 19.2K bytes
    - Viewed (0)
  2. tests/helper_test.go

    		}
    	}
    
    	AssertObjEqual(t, pet, expect, "ID", "CreatedAt", "UpdatedAt", "DeletedAt", "UserID", "Name")
    
    	AssertObjEqual(t, pet.Toy, expect.Toy, "ID", "CreatedAt", "UpdatedAt", "DeletedAt", "Name", "OwnerID", "OwnerType")
    
    	if expect.Toy.Name != "" && expect.Toy.OwnerType != "pets" {
    		t.Errorf("toys's OwnerType, expect: %v, got %v", "pets", expect.Toy.OwnerType)
    	}
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 8K bytes
    - Viewed (0)
  3. 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{
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
Back to top