GeneratedValue marks a field for which the corresponding table column receives a value that is assigned by the database management system. The assignment occurs during an add statement, which also places the DBMS-generated value into the field.
eglx.persistence.sql
Record PaymentRec { @Table {name="PAYMENT"} } paymentId int {@ID, @GeneratedValue, @Column { name="PAYMENT_ID" } }; description string? { @Column { name="DESCRIPTION" } } ; amount decimal(10,2) { @Column { name="AMOUNT" } } ; End
mypayment PaymentRec; mypayment.description = "shoes"; mypayment.amount = 123.50;
ds SQLDataSource?{@Resource};
function addPayment(newPayment PaymentRec in) try add newPayment to ds; onException(ex sqlException) // invokes a custom exception handler. logException(ex); end end
Record GeneratedValue type Annotation { targets=[FieldMbr] } end
Target | Issue |
---|---|
Java | No issues. |
JavaScript | Database access is not supported. |