spring-projects / spring-projects/spring-ldap

findAll() ignoring base attribute from @Entry

Open
#31 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
375
Forks
501
Avg merge
6h 4m
Merged PRs (30d)
63

Description

SimpleLdaprepository's findAll() wich in turn calls

ldapOperations.findAll(clazz);

Seems to ignore any base set in the @Entry class

    /**
     * {@inheritDoc}
     */
    @Override
    public <T> List<T> findAll(Class<T> clazz) {
        return findAll(LdapUtils.emptyLdapName(),
                getDefaultSearchControls(defaultSearchScope, RETURN_OBJ_FLAG, ALL_ATTRIBUTES),
                clazz);
    }

Wich results in that the base attribute in the @Entity doens't work for LdapRepositorys findAll() method.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at SimpleLdapRepository.findAll(Class) and trace the ldapOperations.findAll(clazz) call alongside how the @Entry base attribute is handled. Reproduce the behavior with an entity that declares a base, then verify that findAll searches from that base rather than ignoring it.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.