Skip to content
Advertisement

Spring boot sort.by() No property found for type

JavaScript
JavaScript

I have MemberSchedule Entity and I want to get all items sorted by "start_time", but error occurs with message No property start found for type Member Schedule!.

I think the reason is Sort.by() didn’t recognize _ string. Because using other property like "content" works well.

JavaScript

How can I solve this problem?

error log

JavaScript

Advertisement

Answer

Adding my comment as an answer:

You should use camelCase for naming variables in Java. If you need to then match the variable with one in snake case (let’s say it’s named start_time in a json file) you can use annotations like @JsonProperty

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement