Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
fix: Upgraded to showcase auto-generated ids
Browse files Browse the repository at this point in the history
  • Loading branch information
JigarJoshi committed Jun 2, 2022
1 parent ffaf279 commit 9708713
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.tigrisdata</groupId>
<artifactId>tigris-example-java</artifactId>
<version>1.0.0-alpha.15</version>
<version>1.0.0-alpha.16</version>

<dependencies>
<dependency>
Expand All @@ -26,7 +26,7 @@
</dependencies>
<properties>
<!-- we are still pre-release -->
<tigris.client.java.version>1.0.0-alpha.15</tigris.client.java.version>
<tigris.client.java.version>1.0.0-alpha.16</tigris.client.java.version>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ public ResponseEntity<Order> read(@PathVariable("id") int id) throws TigrisExcep
}
return ResponseEntity.notFound().build();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public UserController(TigrisDatabase tigrisDatabase) {

@PostMapping("/create")
public ResponseEntity<String> create(@RequestBody User user) throws TigrisException {
InsertResponse insertResponse = userTigrisCollection.insert(user);
InsertResponse<User> insertResponse = userTigrisCollection.insert(user);
return ResponseEntity.status(HttpStatus.CREATED).body("User created with id = "+insertResponse.getGeneratedKeys()[0].get("id"));
}

Expand Down

0 comments on commit 9708713

Please sign in to comment.