question regarding ebjCreate/create
ebjCreate(String userId, int companyId, int i, String s)
companyId is a foreign key in the user table. and i want to insert null into that field in the db. but the ejb inserts a 0 not a null and that violates the foreign key ref. how do i insert null instead of 0 ??
thanks in advance.
Something to try is to make companyId an Object that can accept a null value. Since you are using int, try Integer for companyId. What type of persistence are you using: BMP or CMP. You have alot more control of what happens here if you use BMP. For example, if you were using BMP, you could pass in the int value and test it for 0. If the value is 0, then send a null value to the database. What database are you using. Some databases are picky about how a field in the database is set to null.
thanks for the reply. i'm going to try it. we are currently using oracle 8 with weblogic CMP. seems
like more trouble than its worth.