I am trying to map my java pojo (Parent and child classes) with LDAP entry using spring ODM @Entry as below
The ldap entry looks as below
//child class
public class ChildClass extends ParentClass{
// attribute names are same as in LDAP
protected String attribute1;
protected String attribute2;
}
//parent class
import org.springframework.ldap.odm.annotations.Entry;
import org.springframework.ldap.odm.annotations.Id;
@Entry(objectClasses = {"testObjectClass"})
public class ParentClass {
@Id
Name dn;
protected String cn;
protected List<String> objectClass;
// attribute names are same as in LDAP
protected String attribute3;
protected String attribute4;
protected String attribute5;
}
Using Spring ldaptemplate i am trying to search as below.
ParentClass attributes value are getting populated properly, But ChildClass atributes value are populating as null.
List<ParentClass> results = ldapTemplate.find(dn, filter, searchControls, ParentClass.class)
