Hibernate join returning a list of objects from one table in the join
posted 10 years ago
I've done a couple of projects with hibernate but I can't seem to get this sort of thing to work. I have to classes IncentiveObj and IncentiveOwnerObj I want to return an IncentiveObj for those rows on the IncentiveOwnerObj (related table actually) where the other parts of the where clause are specified that is the first_Name and last_Name match the string's passed. Both share a field called incentive_id which I am joining on.
I have tried different things the last being to create a contructor on the object I want which accepts a paramter but then I get a list of objects with only that field filled. If I add the other columms to the constructor it doesn't work.
Here is the select string I'm passing to the query currently.