Evan Ireland wrote:
> How about omitting the column from your insert statement, i.e. instead of:
>
> insert into table (myKey, myColWithDefault) values (123, null)
>
> do:
>
> insert into table (myKey) values (123)
>
> If you are using CMP you will need to check with BEA whether this is possible.
You can´t with bea or with any app server afik. Persistence with CMP is
completely based on the public fields of the bean. If the table does not
accept a null value and you try to insert null values an sql exception
will be thrown. There is no way to adapt the SQL generated to do the
insert into the table.
The best way to do CMP with default values is to set the fields in the
ejbCreate method to their default values. You could create environment
entries for these default values so thei can be changed upon deployment.
sven
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".