Getting the following error while trying to execute a Query Rule, Exp

Getting the following error while trying to execute a Query Rule,

Expression evaluation error in rule 'ct_getcustomercommunicationdetails' at function 'queryruleexec': Error evaluating function 'queryruleexec' : Unexpected error executing query (type: [CTCustomerCommunicationDetailsDT1367], query: [CT_getCustomerCommunicationdetails], order by: [[]], filters:[((active = TypedValue[it=1,v=1]) AND (customerEmail.email = TypedValue[it=3,v=random@google.com]) AND (customerPhone.phoneNumber = TypedValue[it=3,v=34567890]) AND (customerAddress.partyAddress.streetName = TypedValue[it=3,v=Collingwood]) AND (customerAddress.partyAddress.suburb = TypedValue[it=3,v=Birkdale]))])

Server log,
Caused by: com.appiancorp.suiteapi.common.exceptions.AppianRuntimeException: com.appiancorp.suiteapi.common.exceptions.AppianException

Please provide your suggestions...

OriginalPostID-127769

OriginalPostID-127769

  Discussion posts and replies are publicly visible

Parents
  • I believe you will need to use the @JoinColumn annotation with the @OneToOne annotation, rather than @OneToMany. From our documentation:

    The @JoinColumn annotation is used in conjunction with the @OneToOne annotation for two reasons:

    1) To give an explicit name to the column in the Employee table that references the SecurityAccessCard.
    2) To indicate that value in that column must be unique, which establishes the bi-directional, one-to-one relationship. Without the uniqueness constraint, one SecurityAccessCard could belong to more than one Employee.
    @JoinColumn(name="card_id", nullable=false, unique=true)

    Please take a look here for more information:
    forum.appian.com/.../Defining_a_Custom_Data_Type.html
Reply
  • I believe you will need to use the @JoinColumn annotation with the @OneToOne annotation, rather than @OneToMany. From our documentation:

    The @JoinColumn annotation is used in conjunction with the @OneToOne annotation for two reasons:

    1) To give an explicit name to the column in the Employee table that references the SecurityAccessCard.
    2) To indicate that value in that column must be unique, which establishes the bi-directional, one-to-one relationship. Without the uniqueness constraint, one SecurityAccessCard could belong to more than one Employee.
    @JoinColumn(name="card_id", nullable=false, unique=true)

    Please take a look here for more information:
    forum.appian.com/.../Defining_a_Custom_Data_Type.html
Children
No Data