I'm having a problem where I'm declaring (through xdoclet) a finder method in 
my bean class and the method is not being invoked correctly.

The xdoclet code:

  |  * @ejb.finder
  |  *      signature="com.hannonhill.object.interfaces.Folder 
findByPrimaryKey(java.lang.String pk)"
  |  *      query="select object(x) from Folder as x where x.id = ?1 and 
x.isRecycled = FALSE"
  | 

in the bean class declared by:

  |  * @ejb.bean                
  |  *          name="Folder" 
  |  *          type="CMP" 
  |  *          view-type="local" 
  |  *          local-jndi-name="ejb/Folder"
  |  *      reentrant="true" 
  |  *          primkey-field="id"
  |  *          schema="Folder"
  |  *          transaction-type="Container"
  |  *          cmp-version="2.x"
  | 

The call to the find method:

  | return new 
FolderAdapter(FolderUtil.getLocalHome().findByPrimaryKey(entityId));
  | 

which produces the following DEBUG output:
18:32:42,687 DEBUG [Folder#findByPrimaryKey] Executing SQL: SELECT t0_Folder.id 
FROM cxml_folder t0_Folder WHERE t0_Folder.id=?
  | 

Clearly the wrong query is getting executed, and I was wondering if this is a 
problem with overriding findByPrimaryKey(). Additionally, I could never find a 
place where the query for findByPrimaryKey was defined. I don't know if XDoclet 
just automatically generates it for all EntityBeans or what. 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880529#3880529

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3880529


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to