Announcement Announcement Module
No announcement yet.
[ODM] SearchControls on OdmManager read ? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • [ODM] SearchControls on OdmManager read ?


    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

  • #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 ?