![]() |
![]() |
|
| Index | Recent Threads | Unanswered Threads | Who's Online | Help |
|
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 33
|
|
| Author |
|
|
Newbie Joined: Nov 27, 2008 Post Count: 17 Status: Offline |
So why not raise that JIRA issue you were going to open, and then you can attach a patch to it. I'm sure Stefan would welcome it Hi I will open the issue an post the code in there and leave it to Stefan to review and modify my code. I was wondering if it would not be better to have this filed base like Stefan point before. Also I why not have it Annotated? Like azevedo |
||
|
|
Novice Joined: Jul 2, 2008 Post Count: 36 Status: Offline |
I'm not happy with this dn-qualifiery solution. This way you need to add datastore specific logic into the business class. I think all datastore specific stuff should only be configured using metadata. |
||
|
|
Expert Joined: Nov 16, 2005 Post Count: 1009 Status: Online |
Just my 2 cents. I think that the identity of an object must be its full distinguished name, so when you call getObjectById(), the object is simply retrieve with a Context.lookup(). When you Query the LDAP, the depth could be just controlled by a query extension. But it is too simple, the must be something I miss.... Guido ---------------------------------------- Guido Anzuoni http://www.objectmagic.org |
||
|
|
Expert UK Joined: Mar 13, 2004 Post Count: 5686 Status: Offline |
I'm not happy with this dn-qualifiery solution. This way you need to add datastore specific logic into the business class. I think all datastore specific stuff should only be configured using metadata. Sure it should but how are you going to configure "persist object X to location X1, persist object Y to location Y1, etc" in metadata ? (JDO has instance callbacks, and JDO/JPA have lifecycle listeners that you could hook into). Data Federation support will, in principle, allow more control over object-by-object persistence but that is not implemented. So awaiting your solution ![]() ---------------------------------------- -Andy ![]() ![]() |
||
|
|
Novice Joined: Jul 2, 2008 Post Count: 36 Status: Offline |
Hi azevedo, I thought a bit more about your problem. I started to design different mapping strategies for object relationships in the last few weeks and I think your usecase perfectly fits "hierarchical mapping". You could create one Java class for each level of your directory tree and define a 1-N (or N-1) relationship between them. Please see [1] for a draft, especially section "N-1 Unidirectional". I started to implement it and it seems to work well . Any feedback is welcome.[1] http://www.jpox.org/servlet/wiki/display/ENG/Hierarchical+Mapping |
||
|
|
Newbie Joined: Nov 27, 2008 Post Count: 17 Status: Offline |
Hi azevedo, I thought a bit more about your problem. I started to design different mapping strategies for object relationships in the last few weeks and I think your usecase perfectly fits "hierarchical mapping". You could create one Java class for each level of your directory tree and define a 1-N (or N-1) relationship between them. Please see [1] for a draft, especially section "N-1 Unidirectional". I started to implement it and it seems to work well . Any feedback is welcome.[1] http://www.jpox.org/servlet/wiki/display/ENG/Hierarchical+Mapping Hi seelmann , I think this is a good approach of the problem. If I am getting it right, there is a single orgUnit class that holds a reference to its parent. I just need to construct the orgUnit (class) from which I want a children and pass it to the children class and run the query on it. Am I right? Where can I get the binaries to run a test? azevedo |
||
|
|
Expert Joined: Nov 16, 2005 Post Count: 1009 Status: Online |
Hi azevedo, I thought a bit more about your problem. I started to design different mapping strategies for object relationships in the last few weeks and I think your usecase perfectly fits "hierarchical mapping". You could create one Java class for each level of your directory tree and define a 1-N (or N-1) relationship between them. Please see [1] for a draft, especially section "N-1 Unidirectional". I started to implement it and it seems to work well . Any feedback is welcome.[1] http://www.jpox.org/servlet/wiki/display/ENG/Hierarchical+Mapping Another approach could be allowing for object identity being composed by a local part (i.e. the rdn) and a "foreign-key". The wiki example would become: <jdo>This enhancement would be appreciated for RDBMS store too ![]() (Together with column sharing among different foreign-keys) Guido ---------------------------------------- Guido Anzuoni http://www.objectmagic.org |
||
|
|
Novice Joined: Jul 2, 2008 Post Count: 36 Status: Offline |
Hi azevedo, Yes, you are right. You get the instance of orgUnit from the datastore (getObjectById()). I'm still implementing it, so stay tuned please. Hi Guido, that a good idea, I'll try that. |
||
|
|
Newbie Tunisia Joined: Mar 12, 2010 Post Count: 1 Status: Offline |
Hi, i am encountering the same problem. Is there any way now to change the search scope to SUBTREE_SCOPE? Thank you in advance Baligh |
||
|
|
Novice Joined: Jul 2, 2008 Post Count: 36 Status: Offline |
Hi, you have two options: 1st: the recommended approach is to model your java classes according your directory tree and to define a class for each hierarchy in your LDAP. See http://www.datanucleus.org/products/accessplatform_2_0/ldap/hierarchical.html 2nd: you could define an LDAP URL search base, e.g. <class name="User" table="ldap:///dc=example,dc=com??sub" schema="top,person">Kind Regards, Stefan |
||
|
|
|
|
|
Current timezone is GMT May 17, 2012 12:04:13 PM |