-
Notifications
You must be signed in to change notification settings - Fork 34
Created separate recipe for cassandra write and postgres read side #66
base: master
Are you sure you want to change the base?
Conversation
Hi @marvinmarnold, Thank you for your contribution! We really value the time you've taken to put this together. Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement: |
CLA now signed |
UserGreetingRecord record = new UserGreetingRecord(); | ||
record.setId(greetingMessageChanged.getName()); | ||
record.setMessage(greetingMessageChanged.getMessage()); | ||
entityManager.persist(record); |
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.
Is the comment a left-over?
Also, does PGsql merge records when inserting data for the same PK? The commented code does a find
first to update if the record is already there, but the new code doesn't.
If that's the case I think it's a very important difference compared to H2 worth mentioning in the README.
// return entityManager | ||
// .createQuery(SELECT_ALL_QUERY, UserGreeting.class) | ||
// .getResultList(); | ||
// } |
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.
The meat of the sample is commented out. :-(
@marvinmarnold What a key difference with the recipe for H2? It's very difficult to find her manually 😞 |
It's on the |
|
||
The key changes are in [`application.conf`](hello-impl/src/main/resources/application.conf) and [`HelloModule`](hello-impl/src/main/java/com/lightbend/lagom/recipes/mixedpersistence/hello/impl/HelloModule.java). | ||
|
||
Specifcally, `JdbcPersistenceModule` is explicitly disabled: |
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.
Specifcally, `JdbcPersistenceModule` is explicitly disabled: | |
Specifically, `JdbcPersistenceModule` is explicitly disabled: |
Thank you, @ignasi35 ! I found it 😄 |
@marvinmarnold, we are planning to reduce the number of recipes/samples we have to maintain. One of the recipes we plan to keep is the mixed persistence, but I don't think it's worth having another mixed-persistence recipe that is basically the same but only changing the underlying RDBMS. This will only increase the surface of things we need to maintain. On the other hand, we want to have a place where community members can publish their samples/recipes projects. With that in mind, the upcoming Would that be a good solution for you? |
@renatocaval yea that sounds like a good idea. I'll try to go through the other comments soon and make some final improvements in the meantime. |
No description provided.