Skip to content

Commit

Permalink
Fix MongoDbPersistence method in GetListByFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
levichevdmitry committed Jan 19, 2022
1 parent 7d71a50 commit 55e2fc2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# <img src="https://uploads-ssl.webflow.com/5ea5d3315186cf5ec60c3ee4/5edf1c94ce4c859f2b188094_logo.svg" alt="Pip.Services Logo" width="200"> <br/> MongoDB components for Golang Changelog

## <a name="1.1.1"></a> 1.1.1 (2022-01-19)
### Bug Fixes
- Fix MongoDbPersistence method in GetListByFilter.

## <a name="1.1.0"></a> 1.1.0 (2021-04-03)

### Breaking changes
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pip-services3-mongodb-go",
"registry": "github.com/pip-services3-go",
"version": "1.1.0",
"version": "1.1.1",
"build": 0
}
7 changes: 2 additions & 5 deletions docker/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ ENV GO111MODULE=on \
WORKDIR /app

# Copy the package files
COPY go.mod ./
COPY . .

# Install all go_modules
RUN go mod download

# Copy the package files
COPY . .
RUN go mod tidy

# Build the project
RUN go build -o /go/bin/run .
9 changes: 3 additions & 6 deletions docker/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ ENV GO111MODULE=on \
# Set a working directory
WORKDIR /app

# Copy the package files
COPY go.mod ./

# Install all go_modules
RUN go mod download

# Copy the entire project
COPY . .

# Install all go_modules
RUN go mod tidy

# Specify the command from running tests
CMD go test -v ./test/...
2 changes: 2 additions & 0 deletions persistence/MongoDbPersistence.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,8 @@ func (c *MongoDbPersistence) GetListByFilter(correlationId string, filter interf
return nil, ferr
}

items = make([]interface{}, 0)

for cursor.Next(c.Connection.Ctx) {
docPointer := c.NewObjectByPrototype()
curErr := cursor.Decode(docPointer.Interface())
Expand Down

0 comments on commit 55e2fc2

Please sign in to comment.