Skip to content

Document that @DnAttribute only works on String fields #500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* Indicates that a field is to be automatically populated to/from the distinguished name
* of an entry. Fields annotated with this annotation will be automatically populated with values from
* the distinguished names of found entries.
* the distinguished names of found entries. Annotated fields must be of type <code>String</code>.
* <p>
* For automatic calculation of the DN of an entry to work, the {@link #index()} value
* must be specified on all DnAttribute annotations in that class, and these attribute values,
Expand Down
1 change: 1 addition & 0 deletions src/docs/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,7 @@ The `@Attribute` annotation is used to map object class fields to entity fields.

The `@DnAttribute` annotation is used to map object class fields to and from components in the distinguished name of an entry.
Fields annotated with `@DnAttribute` will automatically be populated with the appropriate value from the distinguished name when an entry is read from the directory tree.
Only fields of type `String` can be annotated with `@DnAttribute`, other types are not supported.
If the `index` attribute of all `@DnAttribute` annotations in a class is specified, the DN will also be automatically calculated when creating and updating entries.
For update scenarios, this will also automatically take care of moving entries in the tree if attributes that are part of the distinguished name have changed.

Expand Down