db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Rowell <mark.row...@credittrade.com>
Subject Re: Materialising the wrong type of object when prefetching relations hips where related class is part of extent
Date Fri, 28 Jan 2005 13:45:09 GMT
Thomas Dudziak <tomdzk <at> gmail.com> writes:

> 
> Mhm, a couple of points:
> 
> * A minor thing but you should not use the id-stuff for the field
> descriptors but rather reference the foreignkey fields directly. Has
> no bearance to your problem but anyway ...
> 
> * Perhaps you should declare the ojbConcreteClass field in the whole
> hierarchy of CreditDefaultSwap, i.e. even in Instrument. Likewise, it
> might help if you duplicate Instrument's fields in the descriptor of
> InstrumentModel. Or perhaps you don't need InstrumentModel's
> descriptor ? Do you query for it (it is not used elsewhere in the
> repository file) ?
> 
> * I don't understand where in BasePrefetcher#prefetchRelationship an
> access to a field descriptor might happen. Could you set a breakpoint
> to the MetadataException and post where the exception is uttered and
> what the context is ?
> 
> Tom
> 

Tom

Thanks for the reponse. The id stuff is legacy; never got around to changing 
it and if it ain't broke...

Re duplicate fields in extent classes. Does a concrete class inherit field 
definitions declared in a super-class e.g. the priceDetails collection - every 
Instrument implementation has this collection can I jsut declare it in 
Instrument and remove the declaration from implementations?

Other than that will try what you suggest..

Thanks

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message