Closed spring-projects-issues closed 5 years ago
Sungo Fan commented
I have also encounter this problem. do you have any update or work around? thanks
akhtyamovrr commented
Hello
Are there any plans to fix the issue? It breaks compatibility of old data with newer versions of the framework that causes additional efforts for data migration and code changes of other components during an update to the latest release version. Because of these reasons update of dependencies becomes impossible for some consumers
sothawo commented
Is this still an issue with a RuntimeException? There are several tickets concerning the mapping with @JsonProperty
annotated values, but they don't mention runtime exceptions
Aram Mirzadeh commented
sothawo - I don't think I have run across since 2.0.0
sothawo commented
error did not occur again, and DATAES-562 now is the correct way to handle custom field name mapping
Aram Mirzadeh opened DATAES-419 and commented
I have a working env ... Java 8, Boot 2.0.0.M7, Data 3.0.2.RELEASE, Cluster is a remote 3 node, ES 5.6.4 (xpack disabled)
{{
@Id
private String id; private String firstName; private String lastName;}}Methods like:
findByFirstName and findByLastName both work if I leave it as is ... however, the incoming json (produced by another system) has an underscore in the field names, ex: first_name, last_name.
I added a
@JsonProperty
("first_name") to the model class, the inserts/mappings do work with the new field name, however any combination of findByFirstName, findByFirst_Name, findByFirstName, findByFirstName all result in a runtime exception.{{
@Id
private String id;@JsonProperty
("first_name") private String firstName; private String lastName;}}In this test project I don't have a ES client method, it's all
@EnableAutoConfiguration
and two lines in the application.properties file (spring.data.elasticsearch.cluster-nodes, cluster-name)First, what is the proper method name creation to automap this? Second, is there anyway of catching the query that is being built via the auto query builder so this can be debugged locally?
Thanks
Affects: 3.0.2 (Kay SR2)
1 votes, 4 watchers