Hi everyone,

 

I have declared a simple EJB QL statement in xdoclet:

 

 * @ejb.finder

 *    signature="java.util.Collection findAllLastNames()"

 *    query="SELECT DISTINCT u.lastName FROM user AS u"

 

The lastName field is of type String, so I thought that this statement would return all uniqe last names in the table as a Collection of String. However it seems to return a Collection of local interfaces instead. That’s fine, but the problem is that the primary key fields are not set in those local interfaces so whenever I try to fetch the “lastName” field with getLastName() from the local interface, Jboss throws a couple of exceptions telling me that the primary key is null.

 

If I invoke the toString() method of the local interfaces I get the JNDI name of the EJB followed by the content of the lastName field, so the information is obviously there, but I can’t get it out in a clean way. What am I doing wrong?

 

I’m using JBoss 3.2.2 (final production version).

 

Regards,

Ulf

 

Ulf Tidstrand
Software Engineer
IMI - Industrial Environmental Informatics
Chalmers University of Technology

Voice  +46 31 772 4914
Fax    +46 31 772 4915
E-mail [EMAIL PROTECTED]
Web    www.imi.chalmers.se

 

Reply via email to