-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
OOPS make that SortedSet, Tree set won't do it either
On Feb 7, 2005, at 4:33 PM, Robert S. Sfeir wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Armin,
I think the issue might be that we're using a HashSet not an OrderedSet or as Brian suggested TreeSet.
it seems that in general in OJB we should be using sorable sets, though hash is faster of course, because of the nature of the purpose.
R
On Feb 7, 2005, at 4:23 PM, Robert S. Sfeir wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Feb 7, 2005, at 4:03 PM, Jakob Braeuchi wrote:
hi robert,
i added a simple testcase QueryTest#testPrefetchedCollectionOrderBy that uses the orderby attribute of the CollectionDescriptor.
this test passes without any problems.
The only potential problem i see is in ColllectionPrefetcher#associateBatched().
...
else
{
ManageableCollection col = createCollection(collectionClass);
for (Iterator it2 = list.iterator(); it2.hasNext();)
{
col.ojbAdd(it2.next());
}
result = col;
}
...
if the collectionClass of CollectionDescriptor does not maintain the order the we have a problem.
Yup that looks like it, I use ManageableCollection, specifically the Set impl but changed to ArrayList impl, it's relying on the Collection to maintain its natural order, hence if the Collection is not sortable, it just adds them as it gets them. (at least this is what I understand from the code). Something has to happen there to tell the user they're full of it, and that you can't sort.
R -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin)
iD8DBQFCB9xEJhqny0eCHK8RAjohAJ4srmUKZ+FpWe6n1mKxjzf0HH/VYwCaA1jZ kIUY2hDxVeTCadrHpy7KNbI= =BiF0 -----END PGP SIGNATURE-----
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin)
iD8DBQFCB97HJhqny0eCHK8RAmQgAJ9EYCUdwjYuGW0lPwQ960x8l8L/6wCffYmR YsR4f7d2BMbqtRpmqp7rTaU= =7QPO -----END PGP SIGNATURE-----
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin)
iD8DBQFCB98QJhqny0eCHK8RAhuqAJ9ATlwArcQrjGrhizSvutDSxBHH/gCfQCgy ygtF5NuOZ3NaElAqvL7b7KQ= =cgb5 -----END PGP SIGNATURE-----
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
