Skip to content

Clarify that @DnAttribute does not affect attribute mapping #459

Closed
@edysli

Description

@edysli

Javadoc for @DnAttribute states:

Indicates that a field is to be automatically populated to/from the distinguished name of an entry.

However, spring-ldap will also try to create an actual LDAP attribute with any field annotated with @DnAttribute. So either the documentation is wrong or this annotation does too much.

In my case, using

@DnAttribute(value = "ou", index = 3) public String branch;

causes a schema violation:

Caused by: javax.naming.directory.SchemaViolationException:
[LDAP: error code 65 - Unable to modify entry '<removed>' because the entry resulting from applying the modifications would have violated the provided schema:
The entry contains attribute branch which is not defined in the schema.]

Please either document this behaviour or prevent @DnAttribute from affecting something else than the DN.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions