Reputation: 337
My goal is to combine map from some spring data projection. Entity:
@Entity
public class Parent {
// id, getters and boilerplate
private List<Child> childs
}
and projection be like:
interface ParentProjection{
@Value("target.childs == null ? null : {target.childs![name]: target.childs![id'})
Map<String,Long> getChildNameAndId();
}
It compiles but when it reaches getChildAndId() in application it falls with : java.lang.IllegalArgumentException: Projection type must be an interface!
Upvotes: 1
Views: 464
Reputation: 1381
You can search Stackoverflow, there are similar questions with answers that might help you:
"java.lang.IllegalArgumentException: Projection type must be an interface" Error
Upvotes: 1