java - PropertyReferenceException while using spring data with mongoDB -
i using spring data mongodb. have 3 models relatioship as
@document class type{ private string property; //getter , setter } class type1 extends type{ private string property1; } class type2 extends type{ private string property2; }
my type repository looks this
public interface typerepository extends mongorepository<type, string>{ public type findbyproperty1(string value); }
while running application getting excetion
org.springframework.data.mapping.propertyreferenceexception: no property property1 found type type!
as there no property1 in type class, need create separate repositories type1 , type2 or there other way of doing common repository both type1 , type2 classes.
Comments
Post a Comment