Comments on: EJB 3.0 Reference Implementation with teeth – Open Source EJB 3.0 by Sun and Oracle (Report from JavaPolis) https://technology.amis.nl/2005/12/14/ejb-30-reference-implementation-with-teeth-open-source-ejb-30-by-sun-and-oracle-report-from-javapolis/ Friends of Oracle and Java Wed, 08 Jul 2015 07:37:03 +0000 hourly 1 http://wordpress.org/?v=4.2.3 By: Lucas Jellema https://technology.amis.nl/2005/12/14/ejb-30-reference-implementation-with-teeth-open-source-ejb-30-by-sun-and-oracle-report-from-javapolis/#comment-2692 Wed, 14 Dec 2005 20:42:17 +0000 http://technology.amis.nl/blog/?p=950#comment-2692 Still not supported in a very direct way – something you just don’t do unless you are a enthousiastic Database programmer – is the derivation of values inside the database through Defaults defined on columns or inside Database Triggers. Only database generated Primary Key values are directly supported through an attribute in the @Id annotation. When you know that an Before Row Insert or Update trigger may set or change values on the record, you have to explicitly tell the EntityManager to flush and refresh directly after a create and update. Not pretty. Then again, you can hardly expect a generic persistency API to leverage features like Oracle’s Returning Clause that you can use to return the values of specific columns immediately following a DML statement.

]]>