New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mongo sync guide #528
Mongo sync guide #528
Conversation
.../micronaut-mongodb-synchronous/java/src/test/java/example/micronaut/FruitControllerTest.java
Outdated
Show resolved
Hide resolved
...cronaut-mongodb-synchronous/java/src/main/java/example/micronaut/MongoDbFruitRepository.java
Outdated
Show resolved
Hide resolved
...cronaut-mongodb-synchronous/java/src/main/java/example/micronaut/MongoDbFruitRepository.java
Outdated
Show resolved
Hide resolved
...cronaut-mongodb-synchronous/java/src/main/java/example/micronaut/MongoDbFruitRepository.java
Outdated
Show resolved
Hide resolved
guides/micronaut-mongodb-synchronous/java/src/main/java/example/micronaut/Fruit.java
Outdated
Show resolved
Hide resolved
guides/micronaut-mongodb-synchronous/java/src/main/java/example/micronaut/FruitController.java
Outdated
Show resolved
Hide resolved
guides/micronaut-mongodb-synchronous/micronaut-mongodb-synchronous.adoc
Outdated
Show resolved
Hide resolved
guides/micronaut-mongodb-synchronous/micronaut-mongodb-synchronous.adoc
Outdated
Show resolved
Hide resolved
public void save(@NonNull @NotNull @Valid Fruit fruit){ | ||
getCollection().insertOne(fruit); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is possible or not but I think it would be better if you add an id
field to Fruit
(probably an UUID
) and configure the POJO (or Mongo) to assign it automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to have different POJOs. I would like to use the same POJO for the controller layer and the persistence layer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could do this as an improvement after the guide is published.
@kroegerk could you do a proofread ? |
Just a couple of minor changes.
No description provided.