cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rorison, Jeff" <Jeff_Rori...@sra.com>
Subject objectFromDataRow NPE
Date Wed, 06 Oct 2010 18:04:28 GMT
I am using 3.0 (final) and am having some issues using
context.createFromDataRow(...)

ObjectResolver is throwing an NPE on what looks like updating snapshots.

 

Code:

     SQLTemplate template = .....

     template.setFetchingDataRows(true);

     ...

     List res = this.dataContext.performQuery(template);

     Subject sub = (Subject)context.objectFromDataRow(Subject.class,
(DataRow)res.get(0), true);

 

Err:

java.lang.NullPointerException

                at
org.apache.cayenne.access.ObjectResolver.objectsFromDataRows(ObjectResol
ver.java:117)

                at
org.apache.cayenne.access.ObjectResolver.synchronizedObjectsFromDataRows
(ObjectResolver.java:94)

                at
org.apache.cayenne.access.DataContext.objectsFromDataRows(DataContext.ja
va:597)

                at
org.apache.cayenne.access.DataContext.objectFromDataRow(DataContext.java
:646)

                ...........

 

What, if anything am I doing incorrectly here? I have tried changing the
refresh, and most of the other API calls with no success?

Has this changed any in 3.0, as I see a few differences between the API
and the docs?


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message