Hi Tristan,

Thanks for your help, but I already developed my bean this way. We managed 
with Burkhard Vogel to find out what was the error and we discovered that 
the version of Oracle I'm using (at least) interprets empty strings as NULL 
values.

I don't know if this is a normal behaviour in Oracle or if this is a bug 
but from my point of view I would say that this isn't a correct behaviour.

Ludovic


--On vendredi 13 juillet 2001 15:34 +0200 Tristan Donaldson 
<[EMAIL PROTECTED]> wrote:

> You need to provide the ejb with all of the information required for the
> SQL insert statement in one operation.  Hence it needs to be included in
> the ejbCreate method.
>
> Just create a new ejbCreate method which takes in both the primary key and
> all of the "not null" fields.
>
> eg:
>
> public Object ejbCreate(Integer id, String name) {
>        this.id = id;
>        this.name = name;
> }
>
> Another option is to default the name field (but this is doing what the
> not null field is trying to stop)
>
> public Object ejbCreate(Integer id) {
>        this.id = id;
>        this.name = "No Provided";
> }
>
> In both of these cases name doesn't need to be part of the primary key.
>
> Tristan.


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to