title: ldap find object by group member
body: <p>I am using spring ldaptemplate. I am trying to member out roles from my group. Schema is as follows .</p>
  
  <pre><code>ou=roles,cn=admin
  member cn=key1,ou=Keys
  member cn=key2,ou=keys
  
  ou=roles,cn=user
  member cn=key3,ou=Keys
  member cn=key2,ou=keys
  </code></pre>
  
  <p>I want to find out roles whose member cn=key2 .</p>
  
  <p>My query is</p>
  
  <pre><code>ldapTemplate.search(
              query().where("objectclass").is("groupOfNames").and("ou")
                          .is(roles).and("cn").is("key2"), PERSON_CONTEXT_MAPPER);
  </code></pre>
  
  <p>where I am missing?Is their any alternate using ldaptemplate.</p>