Hi
I think this is not your prblem. but i have to comment on this line
Code:
Project p = (Project) session.get(Project.class, projectId);
UserProjects up =(UserProjects) session.get(UserProjects.class, p);
here session.get() is session.get(Class clazz,Serializable id).
clazz is ok
but id it is a serializable object.
Normally if you have a id not composite-id the serializable id may string parameter. but in composite-id situation you have to mention what is the class for composite-id
Code:
<composite-id class="Test"> .... </composite-id>
in such condition you can pass a named Object to get method to load entity.
Amila
(Don't forget to rate if helps)