You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using latest mongojack 4.5.0 (earlier versions also sports the issue), $regexp options do not seem to be serialized correctly.
I must check most thoroughly, but it's correct in Filters.$regexp processing but gets unserialized back by Mongojack and then serialized again and lost.
A simple program like this shows what's going on at the network level:
public class PatternDbTest {
public static void main(String[] args) {
MongoDatabase db = null;
JacksonMongoCollection.builder()
.build(db, "products", TestProduct.class, UuidRepresentation.STANDARD)
.find(Filters.regex("name", "foo|BAR", "i"))
.first();
}
public static class TestProduct {
@Id @ObjectId
private String id;
private String name;
public String getId() { return id; }
public void setId(String id) { this.id = id; }
public String getName() { return name; }
public void setName(String name) { this.name = name; }
}
}
=> logging what's happening on the network I see that options are not properly serialized:
hello,
using latest mongojack 4.5.0 (earlier versions also sports the issue), $regexp options do not seem to be serialized correctly.
I must check most thoroughly, but it's correct in Filters.$regexp processing but gets unserialized back by Mongojack and then serialized again and lost.
A simple program like this shows what's going on at the network level:
=> logging what's happening on the network I see that options are not properly serialized:
DEBUG [2022-07-11 09:33:37,367] org.mongodb.driver.protocol.command: Sending command '{"find": "products", "filter": {"name": {"$regularExpression": {"pattern": "foo|BAR", "options": ""}}}, .....
I just wanted to know if this rings a bell or not. I hope to find some time to investigate further.
best regards,
--Stéphane
The text was updated successfully, but these errors were encountered: