am getting in a pickle with a parent-child relationship and CMR. JBoss 3.2.5 is not 
wanting to deploy - claiming a CMR field error. Should I be using a finder here? Not 
sure. Please forgive newbie question...

22:51:48,467 ERROR [EntityContainer] Starting failed 
jboss.j2ee:jndiName=ejb/pixStore/Tag,service=EJB
org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT 
OBJECT(p) FROM Tag p WHERE p.Parent.id = ?1'; - nested throwable: 
(org.jboss.ejb.plugins.cmp.ejbql.UnknownPathException: Unknown cmr field in path: at 
line 1, column 43.  Encountered: "Parent" after: "p.")

TIA, Mark.


  | /*
  |  * Created on 12/09/2004
  |  *
  |  * TODO To change the template for this generated file go to
  |  * Window - Preferences - Java - Code Style - Code Templates
  |  */
  | package pixStore.ejb;
  | 
  | import java.rmi.RemoteException;
  | 
  | import javax.ejb.EJBException;
  | import javax.ejb.EntityBean;
  | import javax.ejb.EntityContext;
  | import javax.ejb.RemoveException;
  | 
  | /**
  |  * @ejb.bean name="Tag"
  |  *           display-name="Name for Tag"
  |  *           description="Description for Tag"
  |  *           jndi-name="ejb/pixStore/Tag"
  |  *           type="CMP"
  |  *           cmp-version="2.x"
  |  *           view-type="both"
  |  * 
  |  * 
  |  * 
  |  * @ejb.finder                      signature = "Collection findByParent(int tag)"
  |  *                                          role-name = "Tag-Has-One-Parent"
  |  *                                          query = "SELECT OBJECT(p) FROM Tag p 
WHERE p.Parent.id = ?1"
  |  * 
  |  * 
  |  */
  | public abstract class TagBean implements EntityBean {
  | //etc...    
  |     /**
  |      * @ejb.pk-field 
  |      * @ejb.persistent-field
  |      * @ejb.interface-method
  |      *
  |      * @jboss.persistence auto-increment = "true"
  |      * @jboss.column-name name = "Id"
  |      *
  |      */
  |     public abstract int getId();
  |     public abstract void setId(int Id);
  |     private int Id;
  |     
  |     /**
  |      * @ejb.persistent-field
  |      * @ejb.interface-method
  |      * 
  |      * @jboss.column-name name = "Tag"
  |      */
  |     public abstract String getTag();
  |     public abstract void setTag(String Id);
  |     private String Tag;
  |     
  |     /**
  |      * @ejb.persistent-field
  |      * @ejb.interface-method
  |      * 
  |      * @ejb.relation        name = "TagParentChild"
  |      *                                      role-name = "Tag-Has-One-Parent"
  |      *                                      target-ejb = "Tag"
  |      * target-multiple = "yes"
  |      * 
  |      * 
  |      * @jboss.column-name name = "Parent"
  |      */
  |     public abstract pixStore.interfaces.Tag getParent();
  |     public abstract void setParent(pixStore.interfaces.Tag Parent);
  |     private pixStore.interfaces.Tag Parent;
  |     
  | }
  | 

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

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


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to