I'm trying
@org.springframework.data.mongodb.core.mapping.Document(collection = "goal")
@org.springframework.data.elasticsearch.annotations.Document(indexName = "goal")
public class Goal implements Serializable {
....}
but that gives me:
Error creating bean with name 'goalRepository':
Invocation of init method failed; nested exception is
org.springframework.data.mapping.PropertyReferenceException:
No property insert found for type Goal! ->
BTW: That error disappears as soon as I add an property with the name 'insert' to Goal or I remove the elasticsearch annotation from goal.
The GoalRepository is:
package org.jhipster.mongo.repository;
import org.jhipster.mongo.domain.Goal;
import org.springframework.data.mongodb.repository.MongoRepository;
public interface GoalRepository extends MongoRepository<Goal,String> {
}