David Zejda wrote:

I had a class with reference:

     * @ojb.reference class-ref="oit.agree.Agreement"
     *                foreignkey="agreement_id"
     *                auto-retrieve="true"
     *                auto-update="false"
     *                auto-delete="false"

and referenced interface (with no ojb fields, defined only for extent)

/**
 * @ojb.class include-inherited="true"
 */
public interface Agreement ...

XDoclet created repository, but refused to generate torque schema
(invocation exception, caused by null pointer exc. (and something about
array size 0) has been thrown instead)...

The problem disappeared, as soon as I had shifted reference to implementing
class instead of interface:

     * @ojb.reference class-ref="oit.agree.AbstractAgreement"
     *                foreignkey="agreement_id"
     *                auto-retrieve="true"
     *                auto-update="false"
     *                auto-delete="false"

Is it OK?

Generating repository descriptors for interfaces works without problems, but you should be aware of some things when using this at runtime. E.g. you probably need factory-class/factory-method and perhaps ojbConcreteClass.
Also, please post the exact stacktrace.


Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to