You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Alexandre Morin <am...@infovista.com> on 2003/12/29 17:12:08 UTC

Bug using insert procedures with include-all-fields flag

Hello,

 

I'm using OJB R5 and would like to use the support for using stored
procedures.

 

I'm using the following declaration in my class descriptor

 

<insert-procedure name="vmojb.insInstance" include-all-fields="true">

</insert-procedure>

 

It looks like the code doesn't take any parameters into account when the
include-all-fields flag is set.

 

Tracing the code, we get into the InsertProcedureDescriptor constructor
which does

 

        this.includeAllFields = includeAllFields;

        if (this.includeAllFields) {
this.addArguments(this.getClassDescriptor().getFieldDescriptions());

        }

 

But the addArgument just does nothing if the include-all-fields flag is set
:

 

    public final void addArgument(ArgumentDescriptor argument)

    {

        if (!this.getIncludeAllFields())

        {

            super.addArgument(argument);

        }

    }

 

I guess the constructor code should set the flag after calling  addArguments
rather than before. 

 

 

Thanks,

 

-Alex