-
Notifications
You must be signed in to change notification settings - Fork 29
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
EventService - Updating events fails #291
Comments
the labels |
I don't know which one Github promotes right now, but sure. Go ahead. |
As a quick fix, the server could make sure that a failed call to the event service does not prevent the achievement update from being executed. |
it's done already |
When sending a valid request to the
/events/update
route for an existing event uuid an exception is thrown.Sample payload:
Exception:
java.sql.SQLException: Field 'event_id' doesn't have a default value
Impact: Achievements can not be updated from game results.
First analysis:
In the EventsService a new
PlayerEvent
is created if not already exists. However thegetEvent
in thePlayerEvent
is annotated asinsertable = false
. I assume this tells hibernate not to insert it, thus it tries to resolve the default value and fails.Maybe removing the
insertable = false
already solves the problemAcceptance criteria for solution:
eventRepository.getOne
in the EventsService withfindById
and throw a proper error message if optional is empty@VisibleForTesting
The text was updated successfully, but these errors were encountered: