Re: [appfuse-user] Help needed for Many to Many relation

2008-04-11 Thread Trish
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("

Re: [appfuse-user] Help needed for Many to Many relation

2008-04-10 Thread Trish
Hi Rob, >You are appending a right-parenthesis ")" to your projectId variable so if your projectId is 12345, >you are feeding 12345) in to your query >parameter. >IOW, the last line of your query string should read: "where empproj.projectId=?)", projectId); Thanks for the correction

Re: [appfuse-user] Help needed for Many to Many relation

2008-04-08 Thread Dustin Pearce
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 t

Re: [appfuse-user] Help needed for Many to Many relation

2008-04-08 Thread Rob Hills
Hi again Trish, Rob Hills wrote: Hi Trish, Trish wrote: Following error found while using following query getHibernateTemplate().find("from Employee as emp where emp.employeeId in " + "(select empproj.employeeId from EmployeesProject as empproj " + "where e

Re: [appfuse-user] Help needed for Many to Many relation

2008-04-08 Thread Rob Hills
Hi Trish, Trish wrote: Following error found while using following query getHibernateTemplate().find("from Employee as emp where emp.employeeId in " + "(select empproj.employeeId from EmployeesProject as empproj " + "where emppr

Re: [appfuse-user] Help needed for Many to Many relation

2008-04-08 Thread Trish
Trish wrote: > > Hi, > > Following error found while using following query > > > getHibernateTemplate().find("from Employee as emp where emp.employeeId in > " + > "(select empproj.employeeId from > EmployeesProject as empproj " + >

Re: [appfuse-user] Help needed for Many to Many relation

2008-04-08 Thread Trish
Hi, Following error found while using following query getHibernateTemplate().find("from Employee as emp where emp.employeeId in " + "(select empproj.employeeId from EmployeesProject as empproj " + "where empproj.projectId=?)", pr

Re: [appfuse-user] Help needed for Many to Many relation

2008-04-08 Thread Trish
Hi, Following error found while using following query getHibernateTemplate().find("from Employee as emp where emp.employeeId in " + "(select empproj.employeeId from EmployeesProject as empproj " + "where empproj.projectId=?)", pr

Re: [appfuse-user] Help needed for Many to Many relation

2008-04-08 Thread Trish
Hi Rob, Thank you for the reply..I had corrected the correction you suggested query syntax, but still I m facing another problem while fetching the values from db I was not sure about how to refere the third table employeeproject fields in to the query where I have class fields of Employee and Pr

Re: [appfuse-user] Help needed for Many to Many relation

2008-04-08 Thread Trish
Hi Rob, Thank you for the reply..I had corrected the correction you suggested query syntax, but still I m facing another problem while fetching the values from db I was not sure about how to refere the third table employeeproject fields in to the query where I have class fields of Employee and Pr

Re: [appfuse-user] Help needed for Many to Many relation

2008-04-07 Thread Rob Hills
Hi Trish, 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 At a quick glance, your entities look OK to me. public List getByProject(Long projectId, Long periodId) { return getHiberna

[appfuse-user] Help needed for Many to Many relation

2008-04-07 Thread Trish
Hi Im new to appfuse and trying to implement manay to many relation for Employee Project tables, the created model classes as follws @Entity public class Employee extends BaseObject { private Long employeeId; private String employeeName; private List employeesProjects; @Id