[chore] update bun + extras v1.1.16 -> v1.1.17 (#2534)

This commit is contained in:
tobi 2024-01-15 14:08:07 +01:00 committed by GitHub
commit 6433a50582
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 1426 additions and 294 deletions

View file

@ -30,6 +30,12 @@ type Relation struct {
M2MJoinFields []*Field
}
// References returns true if the table to which the Relation belongs needs to declare a foreign key constraint to create the relation.
// For other relations, the constraint is created in either the referencing table (1:N, 'has-many' relations) or a mapping table (N:N, 'm2m' relations).
func (r *Relation) References() bool {
return r.Type == HasOneRelation || r.Type == BelongsToRelation
}
func (r *Relation) String() string {
return fmt.Sprintf("relation=%s", r.Field.GoName)
}