Hi all,

I am using Orion 1.4.7 (and other versions), EJBGen 1.19, EJB 2.0 and
HypersonicSQL (last version).

The problem I am having is with all my finder methods that return a single
bean instead of a Collection. I can't get the single bean finders to work no
matter what I try. The spec says you can do this, and of course there should
be a reasonable expectation that you can generate a query that results in a
single object, even if you use an object ID as the primary key which I do.

I have an entity bean, with a long as the primary key, and a string, say
Name, as the second column. When I create my finder, the where clause is
"WHERE Name = ?1" and the return type is the bean. Nothing weird there. No
matter what I do, the finder returns the first entity bean in the table,
even though the names DO NOT MATCH.

The only way I have gotten this to work is to have the finder return a
Collection and then iterate the collection. Now this collection is of size
one, but I shouldn't have to do this.

Any ideas?

Thanks,

Kit Cragin
VP of Product Development
Mongoose Technology, Inc.
www.mongoosetech.com


Reply via email to