DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Incomplete
Priority: Testcase Required Testcase Required
Assignee: Unassigned
Reporter: Stefaan Van Cauwenberge
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Store LDAP

unable to specify the searchscope on a relation attribute

Created: 11/May/12 02:11 PM   Updated: 11/Apr/16 10:31 AM   Resolved: 30/Mar/16 08:58 AM
Component/s: None
Affects Version/s: 3.1.0.m3
Fix Version/s: None

File Attachments: 1. Java Source File (2 kB)
2. File ldap.diff (13 kB)
3. Zip Archive (42 kB)

Environment: all

Datastore: LDAP
Severity: Proof of Concept

 Description  « Hide
When you specify a relation (eg parent-child container), you are unable to specify the searchscope (subtree, one level). Subtree is always taken.
In other words: the attribute recursion-depth="1" in the below configuration does not work.


Stefaan Van Cauwenberge added a comment - 11/May/12 02:54 PM
Files for issues

Tested on eDirectory and openLDAP.

After I fixed the issue localy, I merged it with the latest version (3.1.0.m3). I hope it still works.

This patch supports the following:
1. A field definition of "dn" will always contain the dn of the object.

2. Extention on the class to add the search scope:
<extension vendor-name="opns" key="scope" value="SUBTREE_SCOPE"/>

Possible values are the constants.

3. Support for the attribute recursion-depth on the field definition.
Supported values: 0, 1 and 2 (the actual values of the constants).


Stefaan Van Cauwenberge made changes - 11/May/12 02:54 PM
Field Original Value New Value
Attachment [ 11654 ]
Andy Jefferson added a comment - 17/May/12 02:55 PM
Hi, thx for the diffs, but sadly they don't apply to SVN trunk. Could you please regenerate it, using SVN trunk as the basis and attach a single "patch" file ("diff -u" format).

Andy Jefferson made changes - 09/Aug/12 09:54 AM
Priority Major [ 3 ] Incomplete [ 6 ]
Stefaan Van Cauwenberge added a comment - 22/Oct/12 08:53 PM
New diff file.
Diff with version 3.1

I hope this one does the trick for you.

This fix includes support for:
- The dn attribute in the object, both in PersistenceManager.newQuery(...) and PersistenceManager.getObjectById, allowing primary-key="true" on the dn attribute (enabling caching of objects with the same naming value but a different context).
- A lot less query towards the ldap (no need to require the ldap to get the DN every 5 seconds...). The dn is associated with the object itself.
- Support for extention 'opns' for search controlling scope (method LDAPUtils.getSearchControls). If included it the release, the extention name should be


Stefaan Van Cauwenberge made changes - 22/Oct/12 08:53 PM
Attachment ldap.diff [ 11791 ]
Stefaan Van Cauwenberge added a comment - 22/Oct/12 09:05 PM
It seems that the diif does not include new class files. Attached the new class file I added: DNFieldFetcher.

Stefaan Van Cauwenberge made changes - 22/Oct/12 09:05 PM
Attachment [ 11796 ]
Andy Jefferson added a comment - 30/Mar/16 08:58 AM
No testcase provided after 3.5 years!

Andy Jefferson made changes - 30/Mar/16 08:58 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Incomplete [ 4 ]
Andy Jefferson made changes - 11/Apr/16 10:31 AM
Status Resolved [ 5 ] Closed [ 6 ]