• Post Reply Bookmark Topic Watch Topic
  • New Topic

Compound Primary Key for CMP

 
JohnJohn SmithSmith
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I've been searching for information on creating a CMP bean that has a compound primary key. I'm getting close, but it still isn't working properly.
It would help me a ton if someone knew of an example I could look at (with the deployment descriptors). I'm using JBoss 3.2.1. Does an example exist somewhere?
Here's my problem.
I've created a primary key object with two public string fields. When I call findByPrimaryKey() and pass it an instance of this object which is filled with valid values, I get a FinderException. Here's what is in the log:
2003-10-04 22:36:56,031 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException, causedBy:
javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey={GroupMemberPk group_id=00000000000000000200,agent_id=00000000000000000100}
If I call findAll(), I get a collection of the proper size, but as soon as I try to access any item inside the collection, I get a FinderException.
The same happens if I call one of my other finders. I get a collection of the proper size, but when I access anything, I get a FinderException.
Thanks
Jay
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!