Community
Participate
Working Groups
Build Identifier: EDT 0.7 GM build The generated SQL Add code got error when primitive key is self increased. The primitive key was included in generated SQL. This will cause a conflict when insert data. Reproducible: Always Steps to Reproduce: 1. Create a Simple table in database with primitive key self increasing. (I got the error in derby) 2. Create a Web Client with service project.And create the record from DB. 3. Write a service/program/handler to do the add operation. Just using the basic add syntax "add action_targets to data_source_expr " 4. The generated SQL insert statement in Java code will include primitive key. This will cause a conflict in runtime.
If modify the auto added SQL statement to exclude the primitive key, the generated Java code still contains the primitive key. Which will cause a column mismatch SQL error.
Found that just need to add annotation @GeneratedValue behind the PK, so closed this bug.