Skip to content
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

DnAttribute annotation ignores value if index is present #698

Open
marcusdacoregio opened this issue Aug 16, 2022 · 1 comment
Open

DnAttribute annotation ignores value if index is present #698

marcusdacoregio opened this issue Aug 16, 2022 · 1 comment
Labels
in: core type: breaks-passivity A change that breaks passivity with the previous release type: bug A general bug
Milestone

Comments

@marcusdacoregio
Copy link
Contributor

marcusdacoregio commented Aug 16, 2022

The DefaultObjectDirectoryMapper ignores the value attribute from @DnAttribute if index is present.

See the following sample: https://github.com/marcusdacoregio/ldap-odm-index-bug

This is strange behavior that could be fixed or at least documented properly.

Related to #315

@jzheaux
Copy link
Contributor

jzheaux commented Oct 11, 2024

What I'm inclined to do is error if the names don't match. For example, if I do:

@DnAttribute(name="uid", index=1)

then if "uid" is at index 2, then it will apply what is in index 2 to "uid`", which is quite an unexpected result.

Alternatively, the code could error if name and index are both supplied.

I've opened #940 to address this via documentation for now since this change will likely not be passive.

@jzheaux jzheaux modified the milestones: 2.4.x, 4.x Oct 11, 2024
@jzheaux jzheaux added the type: breaks-passivity A change that breaks passivity with the previous release label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core type: breaks-passivity A change that breaks passivity with the previous release type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants