PrimaryEntityToAssociatedEntityAssociations
Create, delete and query the Id-s of associated records between a PrimaryEntity and an AssociatedEntity entities in BullhornCRM system.
Note: The Associations Tables are not exposed unless the ExpandAssociations connection property is set to 'True'.
Select
The driver will use the Bullhorn CRM API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the driver.
- The PrimaryEntityId and AssociatedEntityId columns support the =, AND, OR, !=, >, >=, <, <=, IN operators when specified in the WHERE clause conditions.
- The IsPrimaryRecordDeleted pseudocolumn supports only the = operator when specified in the WHERE clause conditions.
Due to the Bullhorn CRM REST API limitations, when the PrimaryEntityId is not specified, only the top 15 associated entity record Id-s are returned for every primary entity record. In order to retrieve every associated entity record Id for a certain primary entity record, you will need to specify the PrimaryEntityId. You can specify either one primary entity record Id using the = operator, or you can specify a list of primary entity record Id-s using the IN operator.
The example query below returns all PrimarySkills record Id-s associated to the Candidate with Id '760807'.
SELECT CandidateId, PrimarySkillsId FROM CandidateToPrimarySkillsAssociations WHERE CandidateId = '760807'
The example query below returns all PrimarySkills record Id-s associated to every Candidate specified in the IN list.
SELECT CandidateId, PrimarySkillsId FROM CandidateToPrimarySkillsAssociations WHERE CandidateId IN ('760592', '760807', '761036', '761225')
INSERT
To create a new association between two entity records, you will need to specify the existing primary entity record Id and the existing associated entity record Id.
INSERT INTO CandidateToPrimarySkillsAssociations (CandidateId, PrimarySkillsId) VALUES ('761036', '1000369')
DELETE
To delete an existing association between two entity records, you will need to specify the existing primary entity record Id and the existing associated entity record Id.
DELETE FROM CandidateToPrimarySkillsAssociations WHERE CandidateId = '761036' AND PrimarySkillsId = '1000369'
Columns
Name | Type | ReadOnly | Description |
PrimaryEntityId [KEY] | Int | False |
The Id of the 'PrimaryEntity' associated entity. |
AssociatedEntityId [KEY] | Int | False |
The Id of the 'AssociatedEntity' associated entity. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
IsPrimaryRecordDeleted | Bool |
Weather or not the record of the 'PrimaryEntity' entity is deleted. |