Hi - I keep stumbling on the same error:
An error occurred while trying to write to the entity “vehicle” [id=62d4f82a-d537-42fc-8e4e-c9d39f791ae1@4643, type=SG_VM_Vehicle (id=3470)] (data store: SG VM MySQL Data Store). Details: org.hibernate.exception.GenericJDBCException: could not insert: [SGVMVehicleDT2869]: java.sql.SQLException: Field 'vehicleid' doesn't have a default value Data: TypedValue[it=3470,v={<null>,White,White,3435643,1990,1,White,Sedan,5676545,2020-08-30,<null>,KPMG_SG,2020-07-31 05:24:28.1,,,<null>}]
I suspect the text in bold is the reason of the error but it remains enigmatic to me: can any one please tell me what I am doing wrong?
many thanks
Discussion posts and replies are publicly visible
Could it be that your forgot to set the auto-generate property for the field vehicleId. I assume that the DB table has been created via Appian.
HI Stefan, the auto-generate was checked. I have been following the remote develop training for the vehicle management app (did it three times in a row trying to fix the problem), the vehicle id is also a primary key and an integer......
I have uploaded two screenshots: one of the CDT and one of the db
Good. Now lets have a look at the tab "Structure".
what do you mean by tab structure?
This is how it should look like. Please drop the table and re-verify the data store to make Appian recreate it.
understood thank you. When you say drop the table, I should check all the fields and drop them...?
The tab "Operations" has an option to drop or delete the table
Done. Stefan, thank you very much. This was a learning experience. I will work on the application later in the day to see it to completion.
You are welcome :-)