I think you must use a primary key class when you have a composit key,
like this:
        
<prim-key-class>se.benefit.rita.sales.SalesTransPK</prim-key-class>

/Lennart

Indika Fernando skrev:
> 
> how should I have composite Primary Keys in the Deployment Descriptor......
> 
> The following is part of my D.Descriptor for UserListBean(entity) that I
> tried but doesn't work with jboss......
> <entity>
> .......
> .........
>     <primkey-field>userID,listID</primkey-field>
> </entity>
> 
> AND
> 
> <entity>
> .......
> .........
>     <primkey-field>userID,listID</primkey-field>
>     <primkey-field>listID</primkey-field>
> </entity>
> 
> My UserListPK class is the following
> public class UserListPK implements java.io.Serializable
> {
>  public String userID;
>     public String listID;
> 
>     public UserListPK(String userID,String listID)
>     {
>         this.userID = userID;
>         this.listID = listID;
>  }
> 
>  public UserListPK(){}
> 
>     public String toString()
>     {
>         return userID;
>     }
> 
> }
> My Home interface is this:
> 
> public interface UserListHome extends EJBHome
> {
>      UserList create(String id) throws
> CreateException,RemoteException;
> 
>     /**
>     * Finds a UserList by its primary Key (userID)
>     */
>     public UserList findByPrimaryKey(UserListPK key)   throws
> FinderException, RemoteException;
> 
>    public Collection findByUserID(String userID) throws FinderException,
> RemoteException;
> 
>    public Collection findByListID(String listID) throws FinderException,
> RemoteException;
> 
>    public Collection findAll() throws RemoteException, FinderException;
> }
> 
> thanx in advance...(need a quick reply)
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> List Help?:          [EMAIL PROTECTED]

-- 
mailto:[EMAIL PROTECTED]
http://www.benefit.se/english


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to