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
|
- Re: [JBoss-user] Returning single field as Collection ... Ulf Tidstrand
- Re: [JBoss-user] Returning single field as Collec... Jonathan . O'Connor
- Re: [JBoss-user] Returning single field as Collec... Alexey Loubyansky
- RE: [JBoss-user] Returning single field as Collec... Ulf Tidstrand
- RE: [JBoss-user] Returning single field as Co... Jonathan . O'Connor
- RE: [JBoss-user] Returning single field a... Adrian Brock
- SV: [JBoss-user] Returning single field as Collec... Ulf Tidstrand