Forums Register Login

Compound Primary Key for CMP

+Pie Number of slices to send: Send
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
and POOF! You're gone! But look, this tiny ad is still here:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 539 times.
Similar Threads
Compound key
Any idea what's going on? NoSuchObjectLocalException
EJB creat method confusion
Hibernate DAO Method Naming Conventions for basic CRUD operations
Problem with EJB-QL and primary-keys
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 08:08:16.