microservices-practical / microservices-v6

Learn Microservices with Spring Boot - v6
5 stars 20 forks source link

@Transactional missing #1

Open harkinj opened 6 years ago

harkinj commented 6 years ago

Hi, I think the GameServiceImpl ::newAttemptForUser method should have the @Transactional attribute added? Thanks John

mechero commented 6 years ago

Hi John,

That's an excellent finding. Yes, for a proper consistency between score and badges, it should. Otherwise, the user might end up with some extra score but without the associated badges. It's not critical, but it can be avoided with the annotation.

I take note of this for a second edition of the book, thank you!

harkinj commented 6 years ago

Thanks for the feedback, great book by the way :)