Closed AdamBien closed 4 years ago
Hi @AdamBien, this looks pretty good.
For some reason 'getmultiple' only returns one article. I'll look into it asap.
Hi @AdamBien, I've looked into your PR some more. Everything works like a charm, when I use JPA against a SQL database. However the in-memory path doesn't work anymore since every article gets the id "0" assigned: https://github.com/AdamBien/cloud-native-starter/blob/master/articles-java-jee/src/main/java/com/ibm/cns/articles/entity/Article.java#L22 As result only one article is returned when invoking "getmultiple".
You know certainly better how to fix this. Just as an idea, does it make sense to use an in-memory database like H2 instead of the current implementation so that JPA id assignments work?
The default behaviour in our documentation is to use the in-memory storage, which for example we use in the workshops. So I'd like to get this path working again. Your advice is appreciated!
I've merged and added a fix to assign unique ids for articles in the in-memory store.
Hi @AdamBien, shouldn't the ArticlesService be under 'control' rather than 'boundary'?
The "articles" microservice was refactored and "optional" infrastructure code was removed. The focus was package structure and layering. Algorithms were not changed