Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
+1
person also asked this
people also asked this
Replies
15 replies
Subscribers
5 subscribers
Views
5751 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Hi, I am getting the below error in the process. I have created a CDT
sudhirp804
over 10 years ago
Hi,
I am getting the below error in the process. I have created a CDT with a field name AirlineID as an Number(Integer). It throws an error when it try to store the value in "Write to Store Entity". Please suggest why the CDT integer type value is not able store in the DataStore Entity. Please note the below CDT syntax.
"Details: An error occurred while trying to convert the given data to the type of the specified entity “AirlineDetailMaster” [id=ed3e7773-2bba-4ae6-87af-ded44c76eb95@14330, type=AirlineDetailMaster (id=5170)] (data store: AirTicketManagement). Value that could not be converted: ActivityClassParameter[name=AirlineID,it=1,v=1] Details: com.appiancorp.core.type.TypeCastException: Invalid Cast: Cannot cast from type 'Number (Integer)' to type 'AirlineDetailMaster': CastInvalid "
<xsd:complexType name="AirlineBooking">
<xsd:sequence>
<xsd:element name="AirlineId" type="xsd:int">
<xsd:annotation>
<xsd:appinf...
OriginalPostID-114466
OriginalPostID-114466
Discussion posts and replies are publicly visible
0
sudhirp804
over 10 years ago
Any update on the below issue.? I have attached the CDT and Application.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sudhirp804
over 10 years ago
I have tried with @Id and @GeneratedValue annotation and also removed it and tried again. Still getting the same error. Also, checked the CDT "AirlineDetailMaster" and it showing anywhere previous version. Please suggest what need to change so that entry would store in the "Write to Store Entity".
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sudhirp804
over 10 years ago
I have deleted the CDT and created again the earlier which I am getting got resolved but now I am getting the below issue. I have checked default value in the form and it is mapping =pv!AirlineManagement.AirlineId. Also, in the Write to Data Store the Value = =pv!AirlineManagement.AirlineId and saved into as AirlineManagement.AirlineId.
Please suggest and let me know what is the issue out here.
Details: An error occurred while trying to write to the entity “AirlineDetailManagement” [id=decea2f4-e5db-4e14-a809-1d20990a49c1@14599, type=AirlineDetail (id=5258)] (data store: AirMaster). Details: org.hibernate.exception.GenericJDBCException: could not insert: [AirlineDetailDT2146]: java.sql.SQLException: Field 'airlineid' doesn't have a default value Data: TypedValue[it=5258,v={12,Indian Airlines,Bussiness,13}]
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
Let me clarify a couple of things:
1. Looking at your post in detail it seems you're letting Appian create the tables automatically for you, correct? You're not trying to map to an existing table, are you?
2. The @Id annotation will let Appian know what your primary key is in the table in the database. This is needed if your table already has a primary key or if you want to name your primary key something different from a_id.
3. When setting the primary key @Id you can also let Appian know if you will be manually populating the value or if the column will be of type auto-increment; in which case the @GeneratedValue annotation is needed in addition to @Id.
4. Can you clarify what your specific scenario is after reviewing my statements #1 to #3; once you clarify that please provide the current XSD (most recent version) and the DDL of the table (generate it from the database NOT from Appian)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sudhirp804
over 10 years ago
Thanks a lot... Yeah it was not mapping correctly to an existing table. Issue is resolved.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
<