Hi, thanks again for your clarifications.

[...]
> 
> > I looked at the order-by attribute of the reference 
> > descriptor, but I can't
> > use that. There is no attribute in my element-classes that I 
> > can sort on;
> > it's the order that I put them in the list that is relevant.
> 
> Mhh, In an RDBMS there is no notion of "position in a table". If you 
> want to
> have your elements to show up in a given sequence you have to use an
> additional column that can be used for sorting.
> This is not a restriction with OJB but with relational calculus in 
> general!

Yes, I understand this quite well... :-)
[...]

> You are right, the DListImpl provides such an indirection mechanism 
> (and
> also maintains order of the entries in the way that you'd like to see.
> 
> The only problem is that DListImpl & friends are coded to cooperate 
> with
> ODMG transaction manager.
> They lookup the current ODMG transaction and perform locks etc.
> 
> This won't be of any help in a JDO managed situation (could also cause
> errors).
> But it would be an option to reuse most of the DlistImpl code to write a
> collection class that does all your housekeeping, but does not try to >
work
> with ODMG transactions.

As I said, I have to move away from the JDO-managed situation (until there
is a sufficiently high-quality open-source JDO implementation). I'll have to
go to the ODMG-managed situation. Only I don't like that I have to change my
code in several places now to explicitly use DList instead of java.util.List
and it's standard implementations.
I want to keep my code independant of the actual persistence mechanism used,
so that in future I can switch back to a JDO managed solution.

It would be nice if there was a List implementation that is not
ODMG-specific but provides the same functionality, so that it can be used
transparently (to the largest degree possible) without modifications to the
domain objects. I guess that for a JDO implementation in OJB 2.0 such
proxy-objects for Set, List and Map will have to be created.

But since I don't have time now to do this myself, I'll have to change what
needs to be changed!

Thanks for the advice and explanations - Thomas, you're a great help to
everyone on the list. A big thanks.

--Tim

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to