Page 1 of 1

Query problem

Posted: Wed Aug 13, 2014 2:11 am
by phil.cohen.hci
I'm trying to get a list of ClientContacts for a given ClientCorporation, using the following code:

Code: Select all

Dim service = New BullhornAPI.ApiServiceClient()
Dim currentsession = service.startSession("<username>", "<password>", "<key>").session
Dim query2 As BullhornAPI.dtoQuery = New BullhornAPI.dtoQuery
query2.entityName = "ClientContact"
query2.where = "clientCorporation.ID = 1"
Dim bhcontacts As New BullhornAPI.apiQueryResult
bhcontacts = service.query(currentsession, query2)
... but when I run it I get the following error: "-99999: org.hibernate.QueryException: could not resolve property: ID of: com.bullhorn.entity.client.ClientCorporation [SELECT a.id FROM com.bullhorn.entity.client.ClientContact a WHERE clientCorporation.ID = 1]"

Any ideas?

Re: Query problem

Posted: Thu Aug 14, 2014 1:57 pm
by srg.bdavis
Phil,

The properties in the query are case sensitive. The id column on the ClientCorporation entity should be in lower case.

Brent