Error in Write to Data Store Entity

Hi, 

 

I am getting the following error while using Write to Data Store Entity: 

 

There is a problem with task “Write to Data Store Entity” in the process “ABC - Customer”. An error occurred while trying to write to the entity “ABC_DETAILS” [id=d6884946-c52f-4ba9-af6c-832f42eaca5c@505871, type=ABC_CRHDetails (id=2778)] (data store: ABC). Details: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): ABCDetailsDT35252 Data: TypedValue[it=2778,v={<null>,<null>,Apoorva Mathur,,,,+91 80 2540,,,,Apoorva.Mathur@test.xyz.com,,<null>,65.0,676.0,76576.0,<null>,[Document:508660]}]

 

TIA :) 

  Discussion posts and replies are publicly visible

Parents
  • This error indicates that your primary key is not set to auto-generate its next value when inserting.

    If you are creating your CDT from a DB table or view, you will have the option to click the primary key icon and specify the sequence used to generate this value. Appian will then populate your XSD with the correct info. You can also do this yourself, it will look something like this:

    <xsd:element name="fieldName" type="xsd:int">
        <xsd:annotation>
          <xsd:appinfo source="appian.jpa">
            @Id 
            @SequenceGenerator(
                name="SEQUENCE_NAME", 
                sequenceName="SEQUENCE_NAME"
            ) 
            @GeneratedValue(
                strategy=GenerationType.SEQUENCE, 
                generator="SEQUENCE_NAME"
            ) 
            @Column(
                name="COLUMN_NAME",
                nullable=false, 
                unique=true, 
                columnDefinition="NUMBER"
            )
          </xsd:appinfo>
        </xsd:annotation>
    </xsd:element>

  • My CDT's primary key is set to auto generate still i am getting this error

Reply Children