Query problem

Forum for users and developers of Bullhorn's API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
phil.cohen.hci
User
Posts: 8
Joined: Tue Aug 12, 2014 7:13 pm

Query problem

Post by phil.cohen.hci » Wed Aug 13, 2014 2:11 am

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?

srg.bdavis
User
Posts: 67
Joined: Thu Feb 20, 2014 4:52 pm

Re: Query problem

Post by srg.bdavis » Thu Aug 14, 2014 1:57 pm

Phil,

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

Brent

Post Reply