- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 41 for primarykey (0.08 sec)
-
tests/preload_test.go
if err != nil { t.Errorf("failed to find value, got err: %v", err) } AssertEqual(t, find1, value) } 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 }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K bytes - Viewed (0) -
tests/upsert_test.go
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Jul 29 11:06:13 UTC 2025 - 13.1K 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 {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Jul 22 06:21:04 UTC 2025 - 51K bytes - Viewed (0) -
tests/postgres_test.go
t.Fatalf("failed to found column log_id") } } type Post struct { ID uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4();"` Title string Categories []*Category `gorm:"Many2Many:post_categories"` } type Category struct { ID uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4();"` Title string Posts []*Post `gorm:"Many2Many:post_categories"` }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sat Oct 08 09:16:32 UTC 2022 - 6.4K bytes - Viewed (0) -
tests/preload_suits_test.go
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Jun 05 11:34:13 UTC 2025 - 30.4K bytes - Viewed (0) -
docs/ru/docs/tutorial/sql-databases.md
* `table=True` для SQLModel означает, что это *модель-таблица*, которая должна представлять **таблицу** в реляционной базе данных. Это не просто *модель данных* (в отличие от обычного класса в Pydantic). * `Field(primary_key=True)` для SQLModel означает, что поле `id` является первичным ключом в таблице базы данных (вы можете подробнее узнать о первичных ключах баз данных в документации по SQLModel).
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Tue Dec 17 21:20:20 UTC 2024 - 25.7K bytes - Viewed (0) -
docs/pt/docs/tutorial/sql-databases.md
* `table=True` informa ao SQLModel que este é um *modelo de tabela*, ele deve representar uma **tabela** no banco de dados SQL, não é apenas um *modelo de dados* (como seria qualquer outra classe Pydantic comum). * `Field(primary_key=True)` informa ao SQLModel que o `id` é a **chave primária** no banco de dados SQL (você pode aprender mais sobre chaves primárias SQL na documentação do SQLModel).
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Oct 27 15:25:29 UTC 2024 - 15.8K bytes - Viewed (0) -
docs/es/docs/tutorial/sql-databases.md
* `table=True` le dice a SQLModel que este es un *modelo de tabla*, que debe representar una **tabla** en la base de datos SQL, no es solo un *modelo de datos* (como lo sería cualquier otra clase regular de Pydantic). * `Field(primary_key=True)` le dice a SQLModel que `id` es la **clave primaria** en la base de datos SQL (puedes aprender más sobre claves primarias de SQL en la documentación de SQLModel).
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Mon Dec 30 18:26:57 UTC 2024 - 15.8K bytes - Viewed (0) -
docs/en/docs/tutorial/sql-databases.md
There are a few differences: * `table=True` tells SQLModel that this is a *table model*, it should represent a **table** in the SQL database, it's not just a *data model* (as would be any other regular Pydantic class). * `Field(primary_key=True)` tells SQLModel that the `id` is the **primary key** in the SQL database (you can learn more about SQL primary keys in the SQLModel docs).
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 15.4K bytes - Viewed (0) -
docs/ko/docs/tutorial/sql-databases.md
몇 가지 차이점이 있습니다: * `table=True`는 SQLModel에 이 모델이 *테이블 모델*이며, 단순한 데이터 모델이 아니라 SQL 데이터베이스의 **테이블**을 나타낸다는 것을 알려줍니다. (다른 일반적인 Pydantic 클래스처럼) 단순한 *데이터 모델*이 아닙니다. * `Field(primary_key=True)`는 SQLModel에 `id`가 SQL 데이터베이스의 **기본 키**임을 알려줍니다 (SQL 기본 키에 대한 자세한 내용은 SQLModel 문서를 참고하세요). `int | None` 유형으로 설정하면, SQLModel은 해당 열이 SQL 데이터베이스에서 `INTEGER` 유형이며 `NULLABLE` 값이어야 한다는 것을 알 수 있습니다.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Tue Dec 24 16:14:29 UTC 2024 - 18K bytes - Viewed (0)