From 5af7d8315db0117b1fc2359a4ca450e9a1233898 Mon Sep 17 00:00:00 2001 From: Livio Amstutz Date: Fri, 21 Jan 2022 11:30:43 +0100 Subject: [PATCH] fix: metadata query (#3084) --- internal/query/user_metadata.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/query/user_metadata.go b/internal/query/user_metadata.go index 9fa546bb36..ad68c05ac1 100644 --- a/internal/query/user_metadata.go +++ b/internal/query/user_metadata.go @@ -102,7 +102,7 @@ func (q *Queries) SearchUserMetadata(ctx context.Context, userID string, queries if err != nil { return nil, err } - metadata.LatestSequence, err = q.latestSequence(ctx, userTable) + metadata.LatestSequence, err = q.latestSequence(ctx, userMetadataTable) return metadata, err } @@ -173,7 +173,6 @@ func prepareUserMetadataListQuery() (sq.SelectBuilder, func(*sql.Rows) (*UserMet UserMetadataValueCol.identifier(), countColumn.identifier()). From(userMetadataTable.identifier()). - LeftJoin(join(HumanUserIDCol, UserIDCol)). PlaceholderFormat(sq.Dollar), func(rows *sql.Rows) (*UserMetadataList, error) { metadata := make([]*UserMetadata, 0)