rwinch / spring-ldap-migrate-issues

0 stars 0 forks source link

LDAP-314: repository methods ignoring @Entity(base=) #313

Closed rwinch closed 9 years ago

rwinch commented 10 years ago

Migrated from LDAP-314

LdapRepository query methods ignore @Entry(base =

interface LdapAccountRepository extends LdapRepository<Account>
Account findByAccount(String account);

@Entry(base = "DC=wims,DC=tijd,DC=intra", objectClasses="user")
public final class Account {

fix in org.springframework.ldap.repository.query.LdapQueryCreator :

protected ContainerCriteria create(Part part, Iterator<Object> iterator) {
        ConditionCriteria criteria = query().base(clazz.getAnnotation(Entry.class).base()).where(getAttribute(part));

        return appendCondition(part, iterator, criteria);
    }