Dear friends, i need to know something, i've got to implement the
"XXXWithCollectionProxy" class anyway?
I ask this because when I want to access to the object into the collection
like this:

Texto texto = (Texto)broker.getObjectByQuery(query);

The object texto looks fine....

CollectionProxy opcionesTexto =
(CollectionProxy)texto.getAllOpcionesTexto();

                Iterator it = opcionesTexto.iterator();

                while (it.hasNext()){
                        InterfaceOpcionTexto ot = (InterfaceOpcionTexto)it.next();
                        System.out.println(ot.getOpcionId());
}

Into the line with ot.getOpcionId() throws the following exception..

org.apache.ojb.broker.PersistenceBrokerException: Error invoking:getOpcionId

And the repository.xml is

........<class-descriptor class="ar.publiquest.lufthansa.entity.texto.Texto"
table="TEXTOS" >
        <field-descriptor id="1" name="textoId" column="ID_TEXTOS"
jdbc-type="INTEGER" primarykey="true"/>
        <field-descriptor id="2" name="descripcion" column="TXT_DESCRIP"
jdbc-type="VARCHAR"/>
        <field-descriptor id="3" name="texto" column="TXT_TEXTO"
jdbc-type="VARCHAR"/>
        <field-descriptor id="4" name="flash" column="TXT_FLASH"
jdbc-type="VARCHAR"/>
        <field-descriptor id="5" name="respuesta" column="TXT_RESPUESTA"
jdbc-type="VARCHAR"/>
        <collection-descriptor name="allOpcionesTexto"
element-class-ref="ar.publiquest.lufthansa.entity.opciones.OpcionTexto"
sort="DESC" proxy="true" auto-retrieve="true" auto-update="false"
auto-delete="true">
                <inverse-foreignkey field-id-ref="1"/>
        </collection-descriptor>
        <collection-descriptor name="allHistorial"
element-class-ref="ar.publiquest.lufthansa.entity.usuario.HistorialUsuario"
orderby="historialUsuarioId" sort="DESC" proxy="true" auto-retrieve="true"
auto-update="false" auto-delete="true">
                <inverse-foreignkey field-id-ref="5"/>
        </collection-descriptor>
</class-descriptor>........

and......

<class-descriptor
class="ar.publiquest.lufthansa.entity.opciones.OpcionTexto"
table="OPCIONES_TEXTOS" proxy="dynamic" >
        <field-descriptor id="1" name="textoId" column="ID_TEXTOS"
jdbc-type="INTEGER" primarykey="true"/>
        <field-descriptor id="2" name="opcionId" column="ID_OPCIONES"
jdbc-type="INTEGER" primarykey="true"/>
        <reference-descriptor name="interfaceTexto"
class-ref="ar.publiquest.lufthansa.entity.texto.Texto">
                <foreignkey field-id-ref="1"/>
        </reference-descriptor>
        <reference-descriptor name="interfaceOpcion"
class-ref="ar.publiquest.lufthansa.entity.opciones.Opcion">
                <foreignkey field-id-ref="2"/>
        </reference-descriptor>
</class-descriptor>

I attach the .java files.

And if you need any resource or information, please email me.

I really need to have working this....

Thank you very much!!!!

German Bejarano.






Attachment: OpcionTexto.java
Description: Binary data

Attachment: Texto.java
Description: Binary data

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

Reply via email to