After spending long time to make this work, i am lost. I have a date column in my table which defaults to sysdate. I am using CMP to persist. Is there ANY way i can achieve this. I want to read this date with my ejb to display into reports, but i want db to create it.
posted 12 years ago
There are couple of ways to do this:
1. You can use a trigger on the table, to insert SYSDATE just after inserting the row(It may not be considered to be a good practice, though).
2. Use Session Bean facade to get sysdate from database, using a JDBC call and set the property on the entity bean.