File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
src/main/java/org/soujava/samples/mongodb/products Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import jakarta .json .bind .annotation .JsonbVisibility ;
4
4
import jakarta .nosql .Column ;
5
+ import jakarta .nosql .Convert ;
5
6
import jakarta .nosql .Entity ;
6
7
import jakarta .nosql .Id ;
8
+ import org .eclipse .jnosql .databases .mongodb .mapping .ObjectIdConverter ;
7
9
import org .soujava .samples .mongodb .products .infra .FieldVisibilityStrategy ;
8
10
9
11
import java .util .List ;
14
16
public class Product {
15
17
16
18
@ Id
19
+ @ Convert (ObjectIdConverter .class )
17
20
private String id ;
18
21
19
22
@ Column
Original file line number Diff line number Diff line change
1
+ package org .soujava .samples .mongodb .products ;
2
+
3
+ import jakarta .data .repository .BasicRepository ;
4
+ import jakarta .data .repository .Repository ;
5
+
6
+ @ Repository
7
+ public interface ProductRepository extends BasicRepository <Product , String > {
8
+ }
You can’t perform that action at this time.
0 commit comments