This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
We are using a CMP for data access. One of the fields is defined in our database (Oracle) as non-null and has a default value. However, if that field is not set on the CMP, the create() method ends up trying to insert a null into the field, which doesn't work. Is there any way to have it simply leave that field out of the insert and let the database use its default?
Most of the app. servers would not support such a feature. The app. server that typically supports such advanced features is weblogic. If you are using one check out its documentation else my humble suggestion is to set the default value explicitly in your ejbCreate implementation.