Hello,

I am getting the following error message when attempting a NamedNativeQuery:

Error in named query: uCourseSectionId = a9047cea83ab0a6400961dff823ffa16
[No query with that name ('Conference.GetConferenceList'). [Result type
"class edu.umuc.tycho.feature.conference.entity.helper.ConfExtended" does
not have any public fields or setter methods for the projection or aggregate
result element "null", nor does it have a generic put(Object,Object) method
that can be used, nor does it have a public constructor that takes the types
null.]]

The constructed object, which is not an entity, has the following
constructor signature:

public ConfExtended(String confId, int unreadCnt, int noteCnt) {...

None of these three values are ever going to be null coming from the
database.  The first is a PK, the other two are aggregates (COUNTs).  I
originally had this returning several other values as well from the selected
entities, but some could be null and took them out in case that was the
problem, but that didn't change the error.

Does anyone have a hint on what's causing this error?  I traced it backwards
a ways into the src, but the parser is a bit over my head.

Also, is there a problem if one of the returned values is null?  For the
final solution I am working up to I am going to have to have some nulls in
some of the columns.

Thanks in advance.
-- 
View this message in context: 
http://n2.nabble.com/Trouble-with-Constructor-Expressions-tp1342024p1342024.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to