Hello All,
I have been facing an issue with the find() method of the EntityManager(
EJB 3.0). I have an entity bean which has composite primary key. When i try to find an object with the primary key the find() method of the EntityManager returns null. When i check the database the entity that i am searching for exists. The user with which i am creating the entity in the DB is the same as the user with which i am searching for it. Can anybody let me know whether i am missing anything? Is there something incorrect that i am doing?
The code works fine when i have entity beans without composite primary keys.
Its a
Java SE application.
The entity bean and its corresponding primary key class are as shown below:
The code for
testing the bean is as shown below