Posted By:
Tio_Jody
Posted On:
Friday, September 22, 2006 02:26 PM
Good afternoon. I need to retrieve a register via CMP XDoclet generated, in my Bean I write this 'finder': * @ejb.finder * signature="RecordR findByNamePattern(java.lang.String name)" * query="SELECT OBJECT(c) FROM RECORDR AS c WHERE c.name LIKE ?1 ORDER BY c.recordRUID DESC" Runnin in JBoss SA I got a problem, it throws a FinderException informing: "More than one entity matches the finder criteria" I ordered it by the UID descending because I only need to know the last register inserted that matches the criteria. I know that I can return a Collection but I think there
More>>
Good afternoon.
I need to retrieve a register via CMP XDoclet generated,
in my Bean I write this 'finder':
* @ejb.finder
* signature="RecordR findByNamePattern(java.lang.String name)"
* query="SELECT OBJECT(c) FROM RECORDR AS c WHERE c.name LIKE ?1 ORDER BY c.recordRUID DESC"
Runnin in JBoss SA I got a problem, it throws a FinderException
informing: "More than one entity matches the finder criteria"
I ordered it by the UID descending because I only need to know
the last register inserted that matches the criteria.
I know that I can return a Collection but I think there must
be a better solution because this way it would cause too much
overhead.
Thanks for any help/directions.
<<Less