You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to persist candidateCertification entity which has fileAttachment field in it.
It is OneToMany field but I can't use 'associateWithEntity()' method as StandardFileAttachment.class is not extending BullhornEntity class. Hence, I tried as below:
CandidateCertification candidateCertification = new CandidateCertification();
Candidate cand= bullhornData.findEntity(Candidate.class, candidateId);
candidateCertification.setCandidate(cand);
Certification cert= bullhornData.findEntity(Certification.class, certId);
candidateCertification.setCertification(cert);
StandardFileAttachment standardFileAttachment = new StandardFileAttachment();
standardFileAttachment.setCandidate(cand);
standardFileAttachment.setId(fileId);
standardFileAttachment.setName(fileName);
OneToMany oneToMany = new OneToMany<>();
oneToMany.setData(Arrays.asList(standardFileAttachment));
Hi Team,
I was trying to persist candidateCertification entity which has fileAttachment field in it.
It is OneToMany field but I can't use 'associateWithEntity()' method as StandardFileAttachment.class is not extending BullhornEntity class. Hence, I tried as below:
CandidateCertification candidateCertification = new CandidateCertification();
Candidate cand= bullhornData.findEntity(Candidate.class, candidateId);
candidateCertification.setCandidate(cand);
Certification cert= bullhornData.findEntity(Certification.class, certId);
candidateCertification.setCertification(cert);
StandardFileAttachment standardFileAttachment = new StandardFileAttachment();
standardFileAttachment.setCandidate(cand);
standardFileAttachment.setId(fileId);
standardFileAttachment.setName(fileName);
OneToMany oneToMany = new OneToMany<>();
oneToMany.setData(Arrays.asList(standardFileAttachment));
Below is the error while inserting record:
{ detailMessage=null,
propertyName=fileAttachment, severity=WARNING,
type=ATTEMPT_TO_SET_TO_MANY }
Could you please check the issue once OR suggest if we have any other way to achieve it.
Thanks!
Verinder
The text was updated successfully, but these errors were encountered: