Skip to content
Discussion options

You must be logged in to vote

You should use and and not , in the update part:

return update("state = ?1 and participantId = ?2 and lastUpdate = ?3",
		AppointmentState.BOOKED, participantDto.getId(), dateTimeProvider.currentSystemTime())
		.where("id = ?1 AND state = ?2 AND participantId is null",
				new ObjectId(appointmentId), AppointmentState.FREE);

It's documented inside the JavaDoc that specify the update part as a Panache query, but the guide is incorrect about it https://quarkus.io/guides/mongodb-panache#simplified-queries so there is a bug in the guide.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mholzer85
Comment options

Answer selected by mholzer85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants