-
Nov 8th, 2012, 07:25 AM
#1
[ODM] SearchControls on OdmManager read ?
Hello,
I've got an application using spring-ldap-odm that pushes and pulls objects from a LDAP backend.
However, some of the attributes of my object are matching LDAP non-operational attributes (e.g. memberOf, pwdAccountLockedTime, etc.) and even if I have a @Attribute(name = "memberOf") on one of my object's fields, I cannot have these fields filled without using a SearchControls which allows me to specify the attributes I want to get.
The problem is that SearchContols are can only be given to search/findAll methods (which returns a list of objects matching a filter) but not on the read method which is really useful to get only one object from a given DN.
Is there a way to specify the attributes I want to get from my LDAP for any read method of the OdmManager ?
Thank you
-
Nov 9th, 2012, 07:28 AM
#2
I've found a way in implementing an OdmManager proxy around the default impl, and ensuring that the behavior of read() is a kind of findAll().get(0) which I can add SearchControls. But maybe is there a cleaner way than that ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules