Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
agrgr committed Dec 12, 2023
1 parent 3cf9f2a commit b159963
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public void readLongId() {
List<User> users = template.findAll(User.class).toList();
User user;
if (template.getAerospikeConverter().getAerospikeDataSettings().isKeepOriginalKeyTypes()) {
// the matching key is calculated if isKeepOriginalKeyTypes == true, otherwise returns null
// we need isKeepOriginalKeyTypes == true because id is of type long, otherwise findById() returns null
// isKeepOriginalKeyTypes parameter would be unimportant if id were of type String
user = template.findById(longId, User.class);
assertThat(users.get(0).getId() == (user.getId())).isTrue();
assertThat(users.get(0).getName().equals(user.getName())).isTrue();
Expand Down

0 comments on commit b159963

Please sign in to comment.