Database Side:
1 . DB2 database
2. id field using "value generationg->identity"
JPA side:
1. ID field must use "@Id @GeneratedValue(strategy = GenerationType.IDENTITY)"
Otherwise the following error will be raised:
Internal Exception: com.ibm.db2.jcc.b.nm: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=SWAT.SEQUENCE, DRIVER=3.50.152Error Code: -204Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ? bind => [50, SEQ_GEN]Query: DataModifyQuery()
Safe, High performance, reuseable
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment