My first post on the forum! I have a real problem. I am trying to do a search on a object that references another table. But for the life of me I can not seem to search on the propertyType.id object. However I can build a search on the town, road, fields etc. I have tried to do a join and all-sorts, it just ends up bringing back all the results from the database. Any advice would be appreciated.
I have a 2 tables:
id property_name property_town property_raod property_type_id
be this?: eq("property_type_id", Integer.parseInt(params.propertyTypeId) ) [ September 29, 2008: Message edited by: Marc Peabody ]
A good workman is known by his tools.
Joined: Jun 28, 2008
Hi, thanks for the help... I gave it a try and altered the query a little, I also put in a search by town from the property table which worked fine. Still though trying to search using the property_type_id which holds a integer mapping to the property_type table i still have a problem
Putting in the property_type_id like you suggested yielded the following:
Message: could not resolve property: property_type_id of: Property Caused by: org.hibernate.QueryException: could not resolve property: property_type_id of: Property Class: PropHomeController At Line:  Code Snippet:
If you're using % characters I think you have to use like, not eq.
Also, your display name used to match our naming policy of a first and last name but now it's different. Please update your profile to change it back to a valid name.
There's currently a bug in Google Chrome that if you ask it to remember your password and then you visit the page to update your JavaRanch profile, Chrome will actually replace your Display Name with your user id. If you use Chrome, that might have been the problem. Thanks in advance for fixing your display name.