Red Hat Training

A Red Hat training course is available for Red Hat JBoss Data Virtualization

2.5. Generated Keys

JBoss Data Virtualization supports returning generated keys for JDBC sources and from JBoss Data Virtualization temp tables with SERIAL primary key columns. However the current implementation returns only the last set of keys generated and returns the key results directly from the source - no view projection of other intermediate handling is performed. For most scenarios (single source inserts) this handling is sufficient. A custom solution may need to be developed if you are using a FOR EACH ROW instead of trigger to process your inserts and target multiple tables that each return generated keys. It is possible to develop a UDF that also manipulates the returned generated keys - see the org.teiid.CommandContext methods dealing with generated keys for more.