Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Plan
Issues
27
Issue boards
Milestones
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
ARSnova Backend
Commits
a8f6f444
Commit
a8f6f444
authored
7 years ago
by
Daniel Gerhardt
Browse files
Options
Downloads
Patches
Plain Diff
Fix counting of Answers for Rooms
parent
5b4decb5
1 merge request
!89
Foundation for development of version 3.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/persistance/couchdb/CouchDbAnswerRepository.java
+3
-1
3 additions, 1 deletion
.../arsnova/persistance/couchdb/CouchDbAnswerRepository.java
with
3 additions
and
1 deletion
src/main/java/de/thm/arsnova/persistance/couchdb/CouchDbAnswerRepository.java
+
3
−
1
View file @
a8f6f444
...
...
@@ -170,7 +170,9 @@ public class CouchDbAnswerRepository extends CouchDbCrudRepository<Answer> imple
@Override
public
int
countByRoomId
(
final
String
roomId
)
{
final
ViewResult
result
=
db
.
queryView
(
createQuery
(
"by_roomid_variant"
).
key
(
roomId
));
final
ViewResult
result
=
db
.
queryView
(
createQuery
(
"by_roomid"
)
.
key
(
roomId
)
.
reduce
(
true
));
return
result
.
isEmpty
()
?
0
:
result
.
getRows
().
get
(
0
).
getValueAsInt
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment