Hi Dusty
Thank you very much for the guiding me for right mpping class for Many To
Many...but u said well I need the third class for more information like
employee specific period on project and role details as u said.
I fetch records sucessfuly with the query ....
getHibernateTemplate().find("from Employee as emp where emp.employeeId in "
+
"(select empproj.employee.employeeId from
EmployeesProject as empproj "
+
"where empproj.project.projectId=?)",
projectId);
Thanks again Dusty and Rob.
Regards,
Trish.
dusty wrote:
>
>>The mapping you have there is pretty exotic. I think I would use that
>>pattern when I needed to store additional information about each
>>association. It doesn't look that way in the code below, but perhaps
>>in the future you want to distinguish users that belong to a project
>>by a role. In that case you could add a role field to your
>>association class, but I am gettting off topic.....
>
>>Note: I did not look up the HQL above but I am pretty sure the in
>>elements() is the right syntax.... With this model, you would only
>>know what employees were in each project and vice versa. As I
>>mentioned before, if your intent is to store information about the
>>association then your mapping model is appropriate.
>
>
>>On Apr 7, 2008, at 11:03 PM, Trish wrote:
>
>>>
>>> Hi
>>>
>>> Im new to appfuse and trying to implement manay to many relation for
>>> Employee Project tables, the created model classes as follows
>>>
>
>
--
View this message in context:
http://www.nabble.com/Help-needed-for-Many-to-Many-relation-tp16547740s2369p16627264.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]