Hello,

I am currently porting our application from OJB 1.0.0rc4 to OJB 1.0.0

A new problem has been introduced since then in
MtoNCollectionPrefetcher.associateBatched,
as Jakob points out in this source's javadoc:

BRJ: There is a potential problem with the type of the pks used to build the
Identities.
 * When creating an Identity for the owner, the type of pk is defined by the
instvars 
 * representing the pk. When creating the Identity based on the
mToNImplementor the
 * type of the pk is defined by the jdbc-type of field-descriptor of the
referenced class.
 * This type mismatch results in Identities not being equal. <br>
 * Integer[] {10,20,30} is not equal Long[] {10,20,30}

In my application, I use primary keys of type Long mapped to BigDecimal.
The issue then results in the stacktrace below.

java.lang.NullPointerException
 at
org.apache.ojb.broker.accesslayer.MtoNCollectionPrefetcher.associateBatched(
MtoNCollectionPrefetcher.java:408)
 at
org.apache.ojb.broker.accesslayer.MtoNCollectionPrefetcher.prefetchRelations
hip(MtoNCollectionPrefetcher.java:94)
 at
org.apache.ojb.broker.core.QueryReferenceBroker$PBPrefetchingListener.prefet
ch(QueryReferenceBroker.java:873)
 at
org.apache.ojb.broker.core.QueryReferenceBroker$PBCollectionProxyListener.be
foreLoading(QueryReferenceBroker.java:930)
 at
org.apache.ojb.broker.core.proxy.CollectionProxyDefaultImpl.beforeLoading(Co
llectionProxyDefaultImpl.java:182)
 at
org.apache.ojb.broker.core.proxy.CollectionProxyDefaultImpl.getData(Collecti
onProxyDefaultImpl.java:425)
 at
org.apache.ojb.broker.core.proxy.CollectionProxyDefaultImpl.toArray(Collecti
onProxyDefaultImpl.java:260)
 at
de.ppi.neuwerk.repman.persistent.ojb.AuditOjb.getCreatedNodes(AuditOjb.java:
157)

With some effort, I tried also current CVS head, and the problem is still
there.

Any ideas for a workaround?  I wonder if anybody else has this problem?!
I cannot image that we are the only ones who have primary-key fields with
FieldConversion
and who use m:n-Collections.

Best regards,
  Olli

P.S. I am committer myself, and I apologize for my long absence from active
participation.



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

Reply via email to