|
Hello,
Can someone please
explain how to use these 2 tags?
I am trying to
set-up a custom finder for a CMP entity bean. The bean is
deployed into JBoss1.3 (alpha) server.
Also, I would
like the finder to return objects ordered by a given field. I know, this can be
done afterwards, but still ...
So, in
@ejb:finder tag, I can define my query using EJB-QL , which doesn't support "ORDER
BY".
On the other
hand, in @jboss:finder-query tag I have the option to specify the query (JAWS
syntax) and the "order" field.
Question:
where the query should be defined? In @ejb:finder, or @jboss:finder-query or in
both?
Using the
jboss tag, the generated jaws.xml file contained the finder query method, and
the order field as well. But the result list is not ordered.
Further more,
the query that
is performed seems to be the query from @ejb:finder tag, not from
@jboss:finder-query tag.
If I do not
specify the query for @ejb:finder, at runtime an exception is thrown by
JBoss. (javax.ejb.FinderException: Unknown query).
Here the code
for the bean
*
@ejb:bean
* name="publication/PublicationGroup" * display-name="Models a Publication Group" * type="CMP" * cmp-version="2.x" * jndi-name="ejb/publication/PublicationGroup" * view-type="local" * schema="PublicationGroup" * primkey-field="publicationGroupID" * @ejb:transaction type="Required" * @ejb:finder signature="java.util.Collection findAll()" * @ejb:finder signature="java.util.Collection findAllCustom()" * @ejb:pk class="java.lang.Long" generate="false" * * @jboss:table-name "publication_group" * @jboss:finder-query * name="findAllCustom" * query="publicationGroupID < 3" * order="description" * read-ahead="true" * @jboss:create-table "false" * @jboss:remove-table "false" * @jboss:tuned-updates "true" * @jboss:read-only "false" Thanks in
advance,
Andronica
|
- RE: [Xdoclet-user] @jboss:finder-query vs. @ejb:finde... Andronica Teodorescu
- RE: [Xdoclet-user] @jboss:finder-query vs. @ejb:... chowatt
- RE: [Xdoclet-user] @jboss:finder-query vs. @... Andronica Teodorescu
- Re: [Xdoclet-user] @jboss:finder-query v... Dmitri Colebatch
- RE: [Xdoclet-user] @jboss:finder-query vs. @ejb:... Andronica Teodorescu
- Re: [Xdoclet-user] @jboss:finder-query vs. @... Dmitri Colebatch
- Re: [Xdoclet-user] @jboss:finder-query v... David Jencks
- Re: [Xdoclet-user] @jboss:finder-que... Dmitri Colebatch
- [Xdoclet-user] ValueObjects Steve Knight
- Re: [Xdoclet-user] ValueObjects Vincent Harcq
- Re: [Xdoclet-user] ValueObjects Steve Knight
