(playframework 2.0.2-java) EBean - No ScalarType registered error when querying with enum values
I have Role entity class: @Entity public class Role extends Model { @Id @Constraints.Required public Integer id; @Constraints.Required @Formats.NonEmpty @Enumerated(EnumType.STRING) public RoleNameEnum name; // name is enum value } In some test I try to find users by role: List<User> users = User.findByRole(Role.findByRoleName(RoleNameEnum.ADMIN)); where method findByRoleName() is following: public static List<User> findByRole(Role role) { return find.where().eq("role", role).findList(); } I receive error: [error] Test UserTest.findUsersByRole failed: No ScalarType registered for class models