Results 1 to 2 of 2

Thread: [ODM] SearchControls on OdmManager read ?

Hybrid View

  1. #1
    Join Date
    Nov 2012
    Posts
    2

    Question [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

  2. #2
    Join Date
    Nov 2012
    Posts
    2

    Default

    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
  •