Hi, you can do it without problem. I have two classes for one table.
Classes: Crm_cliente_masinfo, Crm_cliente_general Table: CRM_CLIENTE (1)First xml descriptor. <!-- This repository file is generated by the impart OJB Generator --> <!-- www.impart.ch [EMAIL PROTECTED] --> <!-- created at 9 Jul 2003 11:37:50 GMT --> <class-descriptor class="com.indra.crm.vo.Crm_cliente_masinfo" table="CRM_CLIENTE" > <field-descriptor id="66" name="ln_id_cliente" column="LN_ID_CLIENTE" jdbc-type="INTEGER" primarykey="true" autoincrement="true" sequence-name="sec_cliente" /> <field-descriptor id="73" name="ds_url" column="DS_URL" jdbc-type="VARCHAR" /> <field-descriptor id="74" name="ts_comentario" column="TS_COMENTARIO" jdbc-type="VARCHAR" /> <field-descriptor id="79" name="ln_facturacion" column="LN_FACTURACION" jdbc-type="INTEGER" /> <field-descriptor id="80" name="mn_nu_empleados" column="MN_NU_EMPLEADOS" jdbc-type="INTEGER" /> <field-descriptor id="81" name="mn_nu_fact_emp" column="MN_NU_FACT_EMP" jdbc-type="INTEGER" /> <field-descriptor id="82" name="sn_movil_emp" column="SN_MOVIL_EMP" jdbc-type="INTEGER" /> <field-descriptor id="83" name="sn_nu_sedes" column="SN_NU_SEDES" jdbc-type="INTEGER" /> <field-descriptor id="84" name="sn_nu_sedes_hfc" column="SN_NU_SEDES_HFC" jdbc-type="INTEGER" /> <field-descriptor id="85" name="ln_potencial_total" column="LN_POTENCIAL_TOTAL" jdbc-type="INTEGER" /> <field-descriptor id="86" name="ln_potencial_fijo" column="LN_POTENCIAL_FIJO" jdbc-type="INTEGER" /> <field-descriptor id="87" name="ln_potencial_movil" column="LN_POTENCIAL_MOVIL" jdbc-type="INTEGER" /> <field-descriptor id="88" name="ln_potencial_datos" column="LN_POTENCIAL_DATOS" jdbc-type="INTEGER" /> <field-descriptor id="89" name="ln_potencial_fijo_emp" column="LN_POTENCIAL_FIJO_EMP" jdbc-type="INTEGER" /> <field-descriptor id="90" name="ln_potencial_datos_emp" column="LN_POTENCIAL_DATOS_EMP" jdbc-type="INTEGER" /> <field-descriptor id="91" name="ln_potencial_movil_emp" column="LN_POTENCIAL_MOVIL_EMP" jdbc-type="INTEGER" /> <field-descriptor id="92" name="sn_id_usuario_alta" column="SN_ID_USUARIO_ALTA" jdbc-type="INTEGER" /> <field-descriptor id="93" name="dt_fh_alta" column="DT_FH_ALTA" jdbc-type="TIMESTAMP" /> <field-descriptor id="94" name="sn_id_usuario_mod" column="SN_ID_USUARIO_MOD" jdbc-type="INTEGER" /> <field-descriptor id="95" name="dt_fh_mod" column="DT_FH_MOD" jdbc-type="TIMESTAMP" /> <field-descriptor id="96" name="sn_id_usuario_baja" column="SN_ID_USUARIO_BAJA" jdbc-type="INTEGER" /> <field-descriptor id="97" name="dt_fh_baja" column="DT_FH_BAJA" jdbc-type="TIMESTAMP" /> </class-descriptor> (2) Second xml descriptor <!-- This repository file is generated by the impart OJB Generator --> <!-- www.impart.ch [EMAIL PROTECTED] --> <!-- created at 9 Jul 2003 11:37:50 GMT --> <class-descriptor class="com.indra.crm.vo.Crm_cliente_general" table="CRM_CLIENTE" > <field-descriptor id="66" name="ln_id_cliente" column="LN_ID_CLIENTE" jdbc-type="INTEGER" primarykey="true" autoincrement="true" sequence-name="sec_cliente" /> <field-descriptor id="67" name="ds_nb_cliente" column="DS_NB_CLIENTE" jdbc-type="VARCHAR" /> <field-descriptor id="68" name="ss_cif" column="SS_CIF" jdbc-type="VARCHAR" /> <field-descriptor id="69" name="sn_lv_tipo_cliente" column="SN_LV_TIPO_CLIENTE" jdbc-type="INTEGER" /> <field-descriptor id="70" name="sn_lv_estado" column="SN_LV_ESTADO" jdbc-type="INTEGER" /> <field-descriptor id="71" name="sn_id_gestor_asignado" column="SN_ID_GESTOR_ASIGNADO" jdbc-type="INTEGER" /> <field-descriptor id="72" name="sc_gran_cliente" column="SC_GRAN_CLIENTE" jdbc-type="CHAR" /> <field-descriptor id="74" name="ln_jefe_proyecto" column="LN_JEFE_PROYECTO" jdbc-type="VARCHAR" /> <field-descriptor id="76" name="ms_id_migracion" column="MS_ID_MIGRACION" jdbc-type="VARCHAR" /> <field-descriptor id="77" name="ms_id_codigo_amena" column="MS_ID_CODIGO_AMENA" jdbc-type="VARCHAR" /> <field-descriptor id="78" name="ms_id_codigo_auna_tlc" column="MS_ID_CODIGO_AUNA_TLC" jdbc-type="VARCHAR" /> <field-descriptor id="92" name="sn_id_usuario_alta" column="SN_ID_USUARIO_ALTA" jdbc-type="INTEGER" /> <field-descriptor id="93" name="dt_fh_alta" column="DT_FH_ALTA" jdbc-type="TIMESTAMP" /> <field-descriptor id="94" name="sn_id_usuario_mod" column="SN_ID_USUARIO_MOD" jdbc-type="INTEGER" /> <field-descriptor id="95" name="dt_fh_mod" column="DT_FH_MOD" jdbc-type="TIMESTAMP" /> <field-descriptor id="96" name="sn_id_usuario_baja" column="SN_ID_USUARIO_BAJA" jdbc-type="INTEGER" /> <field-descriptor id="97" name="dt_fh_baja" column="DT_FH_BAJA" jdbc-type="TIMESTAMP" /> <field-descriptor id="98" name="ln_id_cliente_padre" column="LN_ID_CLIENTE_PADRE" jdbc-type="INTEGER" /> <field-descriptor id="99" name="ss_mig_cif_aunatlc" column="SS_MIG_CIF_AUNATLC" jdbc-type="VARCHAR" /> </class-descriptor> (3) My repository.xml <?xml version="1.0" encoding="UTF-8"?> <!-- defining entities for include-files --> <!DOCTYPE descriptor-repository SYSTEM "repository.dtd" [ <!ENTITY CRM_CLIENTE_GENERAL SYSTEM "crm_cliente_repositorio_general.xml"> <!ENTITY CRM_CLIENTE_MASINFO SYSTEM "crm_cliente_repositorio_masinfo.xml"> ]> <!-- This is a sample metadata repository for the ObJectBridge System. Use this file as a template for building your own mappings--> <!-- defining entities for include-files --> <descriptor-repository isolation-level="read-committed" version="1.0"> <!-- The Default JDBC Connection. If a class-descriptor does not specify its own JDBC Connection, the Connection specified here will be used. --> <jdbc-connection-descriptor dbalias="thin:@IP:PORT:SID" useAutoCommit="2" default-connection="true" driver="com.p6spy.engine.spy.P6SpyDriver" jcd-alias="" jdbc-level="2.0" password="CRM_AGC" platform="Oracle" protocol="jdbc" subprotocol="oracle" username="CRM_AGC"> <connection-pool logAbandoned="true" maxActive="1" maxIdle="1" maxWait="5000" removeAbandoned="true" /> <sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl"/> </jdbc-connection-descriptor> <!-- Enlace que apunta a CRM_USUARIO --> &CRM_CLIENTE_GENERAL; &CRM_CLIENTE_MASINFO; <!-- This repository file is generated by the impart OJB Generator --> <!-- www.impart.ch [EMAIL PROTECTED] --> <!-- created at 8 Jul 2003 08:50:17 GMT --> </descriptor-repository> -----Mensaje original----- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Enviado el: viernes, 08 de agosto de 2003 12:13 Para: [EMAIL PROTECTED] Asunto: one table -> multiple classes problem Hi, i have table that looks like : table order ( id, orderid, .... sender_name, sender_street, .... recipient_name, recipient_street, .. ) each order consists of some order data, the sender address and the recipient address. at the moment i have an order class that contains the sender and the recipient class (the sender and recipient class is basically a class that contains only the addresses). class order { public Long id; public Long orderId; public SenderAddress sender; public RecipientAddress recipient; } is it possible to load the order object and also load the sender and recipient information in the proper classes in the order object ? I could not find any information on how to do that in the documentation. Unfortunately, normalizing the table is not possible. Any help is really appreciated. Thanks in advance, Andreas -- COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test -------------------------------------------------- 1. GMX TopMail - Platz 1 und Testsieger! 2. GMX ProMail - Platz 2 und Preis-Qualitätssieger! 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ------------------------------------------------------------------------------------------------------------------- Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda prohibida su divulgación, copia o distribución a terceros sin la previa autorización escrita de Indra. En el caso de haber recibido este correo electrónico por error, se ruega notificar inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente. The information in this e-mail and in any attachments is confidential and solely for the attention and use of the named addressee(s). You are hereby notified that any dissemination, distribution or copy of this communication is prohibited without the prior written consent of Indra. If you have received this communication in error, please, notify the sender by reply e-mail --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]