I have the following jpa repository:
@Query("UPDATE PlayerAccount pa SET pa.password = ?3 WHERE pa.id = ?1 AND pa.password = ?2")
@Modifying
public int updatePasswordWithValidation(Long playerAccountId, String oldPasswordDB, String encodePassword);
Now, i would like to implement a similar update query for a mongoDB repository:
@Query("update( { _id: ObjectId(' $1 ') }, { $set: { messageStatus: $2} })")
But it doesn't work. any references to how a customized mongo repository update looks like?
Thanks