This is how DB behave. You can never be sure in what
order elements are retrieved. There are solutions for
this problem (at least using pure SQL), but they tend
to be cumbersome. In my experience it's always better
to arrange business logic, so it doesn't depend on
order or the order can be achieved by a simple ORDER
BY clause.
Cheers,
Krzysztof
--- [EMAIL PROTECTED] wrote:
<HR>
<FONT face="Default Sans Serif, Verdana, Arial,
Helvetica, sans-serif" size=2><DIV><FONT face="Default
Monospace, Courier New, Courier, monospace">Bruce
wrote:<BR>> No, there is no guarantee because
they're returned in the order<BR>> specified (or
not specified) by the OQL query. For example, in
a<BR>> query to fetch some objects, it is possible
to use the ORDER BY<BR>> clause.<BR><BR>Not sure we
are on the same page here, will rephrase my
question<BR>to make sure.<BR><BR>Class A is parent of
Class B (Class B depends on Class A).
relationship<BR>is implemented using
Vector.<BR>Considder following scenario:<BR>...<BR>A a
= new A();<BR>B b1 = new B();<BR>B b2 = new B();<BR>B
b3 = new
B();<BR><BR>a.addB(b1);<BR>a.addB(b2);<BR>a.addB(b3);<BR><Persistify
a using JDO><BR>...<BR><get a from persistent
storage><BR>Vector v = a.getBs();<BR><BR>Now v
isn't guaranteed to be {b1,b2,b3} correct
?<BR><BR>Doesn't that mean that from a client
application point of view</FONT></DIV><DIV><FONT
face="Default Monospace, Courier New, Courier,
monospace">persistfied Vectors doesnt behave like
vectors at all, but </FONT></DIV><DIV><FONT
face="Default Monospace, Courier New, Courier,
monospace">rather like Collections ?<BR><BR>Kind
Regards<BR>Jan H. Hansen<BR></DIV></FONT></FONT>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send
mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev