Hi
I was wondering if anyone could help me on this. I have a concrete class
called CurveDefinition
that has a 1:N relationship with another concrete class CurvePoint. Neither
of these are in
extents. The CurvePoint class has a reference to another interface, called
Instrument (via an ID in the table for the CurvePoint class). This interface
is at the top
level of a series of extents which is about 4 layers deep.
E.g.
1 N 1 1
CurveDefinition <>--------- CurvePoint --------- Instrument
|
------------------
| | |
<various implementations of
instrument>
I tried using prefetch relationships on the CurvePoint collection on the
CurveDefinition class but even though it loads
the CurvePoints in one go, it fetches the Instruments individually and as
this is at the top level of a deep extent
the OJB later looks at all tables for matching instances of Instrument.
As a collection of curve points that are associated with a CurveDefinition
reference instruments of the same type I tried
modifying the ClassDescriptor of the CurvePoint class to change the object
eference descriptor for the instrument to point to
the class descriptor for a concrete class, but to no avail performance wise.
Without using prefetch relationships but using collection proxies it takes
about 300ms to load a curve point
and the associated instrument from the DB and is pretty slow.
Is there any way of making prefetch relationships work, in the above
example, to load all the instruments in one go. E.g
As it stands now, with a CurveDefinition containing 10 CurvePoints (and
therefore 10 instruments to be fetched from the DB)
and the fact that I have 8 concrete instances of Instrument each in a
different table, OJB runs 80 separate queries to load the 10 instruments
rather than 8 queries if it loaded all referenced objects in one go.
Any help would be gratefully appreciated.....
Many thanks
Mark Rowell
----------------------------------------------------------------
Mark Rowell
CreditTrade
T: +44 (020) 7400 5078
M: mailto:mark.rowell@;credittrade.com
CreditTrade Limited is regulated by the FSA. (c) CreditTrade 2002. All rights
reserved. The information and data contained in this email is provided for the
information purposes of the addressee only and should not be reproduced and/or
distributed to any other person. It is provided without any warranty whatsoever and
unless stated otherwise consists purely of indicative market prices and other
information.
Any opinion or comments expressed or assumption made in association with the data or
information provided in this email is a reflection of CreditTrades judgement at the
time of compiling the data and is subject to change. CreditTrade hereby makes no
representation and accepts no responsibility or liability as to the completeness or
accuracy of this email.
The content of this email is not intended as an offer or solicitation for, or
recommendation of, the purchase or sale of any financial instrument, or as an official
confirmation of any transaction, and should not be construed as investment advice.
--
To unsubscribe, e-mail: <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>