It seems that the naming conventions between Xtend and Spring Data are incompatible.
For example:
// User.xtend
class User {
@Property
var Long id;
}
interface UserRepository extends JpaRepository<User> {
public User findById(Long id)
}
The @Property
annotation renames id
to _id
, which causes Spring Data to fail, claiming No property id found
Is there a way to either:
- Suppress Xtend's renaming of the field
- "Teach" Spring Data about the naming convention (Looking for a field? Add an underscore)
- Instruct Spring Data to use property-access, rather than field-access for the property resolution?
Any of these would solve this issue, I believe.