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
By default the mapping layer will able to read the above structure but reject map keys not having a mapKeyDotReplacement set on write. Users may use . as the replacement value to able to write map.key.with.dot from the above example. Still the dot notation within the value of an @Field annotation has a different semantic that would expand the parts of the field name into separate nested documents.
One way of dealing with this issue could be to enhance the @Field annotation as follows:
public @interface Field {
Class<? extendsFieldNamingStrategy> fieldNaming() defaultFieldNamingStrategy.class;
// ...
}
this would allow a certain level of flexibility eg. by providing predefined strategies for the above purpose as well as having a fixed value for meta annotation usage.
The text was updated successfully, but these errors were encountered:
Replace duplicate occurrences of _id with FieldName.ID.name(). Shorten property names to avoid repetative "field" wording. Add Javadoc
to MongoField builder.
See #4464
Original pull request: #4512
MongoDB 5 relaxed restrictions on special characters in field names as outlined in the reference documentation.
By default the mapping layer will able to read the above structure but reject map keys not having a
mapKeyDotReplacement
set on write. Users may use.
as the replacement value to able to writemap.key.with.dot
from the above example. Still the dot notation within the value of an@Field
annotation has a different semantic that would expand the parts of the field name into separate nested documents.One way of dealing with this issue could be to enhance the
@Field
annotation as follows:this would allow a certain level of flexibility eg. by providing predefined strategies for the above purpose as well as having a fixed value for meta annotation usage.
The text was updated successfully, but these errors were encountered: