This content has been marked as final.
Show 3 replies
-
1. Re: Column XXXX cannot be null. why not Default value?
svewap Jul 4, 2005 3:28 PM (in response to svewap)i have generally problems to insert datas into my mysql-table at ejbCreate or ejbPostCreate. For example:
public Integer ejbCreate(Integer idcompanyuser, Integer companyid, String username) throws CreateException { setIdcompany(companyid); // -> works return null; } public void ejbPostCreate(Integer idcompanyuser, Integer companyid, String username) throws CreateException { setActivated("1"); // -> DOESN'T WORKS setCompanyusername(username); // -> works setConfirmed("0"); // -> works }
The columns 'activated' and 'confirmed' have the type CHAR(1).
I use the newest J-Connector of MySQL.
(Nochwas: Für die vielen Views bin ich NICHT verantwortlich.) -
2. Re: Column XXXX cannot be null. why not Default value?
svewap Jul 4, 2005 4:02 PM (in response to svewap)Ok, my last post was stupid and a case for the beginner's corner. a jbuilder 2005 problem.
-
3. Re: Column XXXX cannot be null. why not Default value?
schrouf Jul 6, 2005 10:05 AM (in response to svewap)NOT JBoss is complaining about a NULL value, it's your underlying database. Have you specified a default for your column within your table SQL DDL statement ?
Regards
Ulf