added players
This commit is contained in:
@@ -37,6 +37,10 @@ func (g *fieldgetter[T]) Get(ctx context.Context) (*T, error) {
|
||||
return g.get(ctx)
|
||||
}
|
||||
|
||||
func (g *fieldgetter[T]) String() string {
|
||||
return g.q.String()
|
||||
}
|
||||
|
||||
func (g *fieldgetter[T]) Relation(name string, apply ...func(*bun.SelectQuery) *bun.SelectQuery) *fieldgetter[T] {
|
||||
g.q = g.q.Relation(name, apply...)
|
||||
return g
|
||||
@@ -66,5 +70,6 @@ func GetByID[T any](
|
||||
tx bun.Tx,
|
||||
id int,
|
||||
) *fieldgetter[T] {
|
||||
return GetByField[T](tx, "id", id)
|
||||
prefix := extractTableAlias[T]()
|
||||
return GetByField[T](tx, prefix+".id", id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user