RE: one table -> multiple classes problem
true" > autoincrement="true" > sequence-name="sec_cliente" > > /> >name="ds_nb_cliente" > co > lumn="DS_NB_CLIENTE" > jdbc-type="VARCHAR" > /> >tor id="68" > name="ss_cif" > column="SS_CIF" > jdbc-type= > "VARCHAR" > /> >name="sn_lv_tipo_cl > iente" > column="SN_LV_TIPO_CLIENTE" > jdbc-type="INTEGER" > / > > >name="sn_lv_estado" > column= > "SN_LV_ESTADO" > jdbc-type="INTEGER" > /> >"71" > name="sn_id_gestor_asignado" > column="SN_ID_GESTOR_ASIG > NADO" > jdbc-type="INTEGER" > /> > > name="sc_gran_cliente" > column="SC_GRAN_CLIENTE" > jdbc-type > ="CHAR" > /> >name="ln_jefe_proye > cto" > column="LN_JEFE_PROYECTO" > jdbc-type="VARCHAR" > /> > > name="ms_id_migracion" > column= > "MS_ID_MIGRACION" > jdbc-type="VARCHAR" > /> >d="77" > name="ms_id_codigo_amena" > column="MS_ID_CODIGO_AME > NA" > jdbc-type="VARCHAR" > /> > > name="ms_id_codigo_auna_tlc" > column="MS_ID_CODIGO_AUNA_TLC" > > jdbc-type="VARCHAR" > /> >name=" > sn_id_usuario_alta" > column="SN_ID_USUARIO_ALTA" > jdbc-type=" > INTEGER" > /> >name="dt_fh_alta" > >column="DT_FH_ALTA" > jdbc-type="TIMESTAMP" > /> >criptor id="94" > name="sn_id_usuario_mod" > column="SN_ID_US > UARIO_MOD" > jdbc-type="INTEGER" > /> >name="dt_fh_mod" > column="DT_FH_MOD" > jdbc-type="TIM > ESTAMP" > /> >name="sn_id_usuario_b > aja" > column="SN_ID_USUARIO_BAJA" > jdbc-type="INTEGER" > /> >name="dt_fh_baja" > column="DT_ > FH_BAJA" > jdbc-type="TIMESTAMP" > /> >name="ln_id_cliente_padre" > column="LN_ID_CLIENTE_PADRE" > jdbc-type="INTEGER" > /> >name= > "ss_mig_cif_aunatlc" > column="SS_MIG_CIF_AUNATLC" > jdbc-type= > "VARCHAR" > /> > > > > > (3) My repository.xml > > l version="1.0" encoding="UTF-8"?> > > > > >xml"> > ]> > > > ry isolation-level="read-committed" version="1.0"> > >connection-descriptor dbalias="thin:@IP:PORT:SID" useAutoCommit="2" d > efault-connection="true" driver="com.p6spy.engine.spy.P6SpyDriver" jc > d-alias="" jdbc-level="2.0" password="CRM_AGC" platform="Oracle" > protocol="jdbc" subprotocol="oracle" username="CRM_AGC"> >tion-pool logAbandoned="true" maxActive="1" maxIdle="1" maxWait=" > 5000" removeAbandoned="true" /> > >nnection-descriptor> > > &CRM_CLI > ENTE_GENERAL; > &CRM_CLIENTE_MASINFO; > > > > > > > > > > > -Mensaje original- > De: [EMAIL PROTECTED] [mailto:AndreasWues > [EMAIL PROTECTED] > Enviado el: viernes, 08 de agosto de 2003 12:13 > Para: ojb-use > [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 add > ress and the recipient > address. > at the moment i have an order class tha > t 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 SenderAddre > ss sender; > public RecipientAddress recipient; > } > > is it possible t > o load the order object and also load the sender and > recipient informati > on > in the proper classes in the order object ? I could not find any info > rmation > on how to > do that in the documentation. > > Unfortunately, norm > alizing 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 - P > latz 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: ojb-u > [EMAIL PROTECTED] > For additional commands, e-mail: ojb-user- > [EMAIL PROTECTED] > > --- > > Este co > rreo electrónico y, en su caso, cualquier fichero anexo al mismo, conti > ene 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 rueg > a notificar inmediatamente esta circunstancia mediante reenvío a la dir > ección electrónica del remitente. > > The information in this e-mail a > nd in any attachments is confidential and solely for the attention and us > e of the named addressee(s). You are hereby notified that any disseminati > on, distribution or copy of this communication is prohibited without the > prior written consent of Indra. If you have received this communication i > n error, please, notify the sender by reply e-mail > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- 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]
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]
RE: one table -> multiple classes problem
> name="ss_cif" > column="SS_CIF" > jdbc-type= > "VARCHAR" > /> >name="sn_lv_tipo_cl > iente" > column="SN_LV_TIPO_CLIENTE" > jdbc-type="INTEGER" > / > > >name="sn_lv_estado" > column= > "SN_LV_ESTADO" > jdbc-type="INTEGER" > /> >"71" > name="sn_id_gestor_asignado" > column="SN_ID_GESTOR_ASIG > NADO" > jdbc-type="INTEGER" > /> > > name="sc_gran_cliente" > column="SC_GRAN_CLIENTE" > jdbc-type > ="CHAR" > /> >name="ln_jefe_proye > cto" > column="LN_JEFE_PROYECTO" > jdbc-type="VARCHAR" > /> > > name="ms_id_migracion" > column= > "MS_ID_MIGRACION" > jdbc-type="VARCHAR" > /> >d="77" > name="ms_id_codigo_amena" > column="MS_ID_CODIGO_AME > NA" > jdbc-type="VARCHAR" > /> > > name="ms_id_codigo_auna_tlc" > column="MS_ID_CODIGO_AUNA_TLC" > > jdbc-type="VARCHAR" > /> >name=" > sn_id_usuario_alta" > column="SN_ID_USUARIO_ALTA" > jdbc-type=" > INTEGER" > /> >name="dt_fh_alta" > >column="DT_FH_ALTA" > jdbc-type="TIMESTAMP" > /> >criptor id="94" > name="sn_id_usuario_mod" > column="SN_ID_US > UARIO_MOD" > jdbc-type="INTEGER" > /> >name="dt_fh_mod" > column="DT_FH_MOD" > jdbc-type="TIM > ESTAMP" > /> >name="sn_id_usuario_b > aja" > column="SN_ID_USUARIO_BAJA" > jdbc-type="INTEGER" > /> >name="dt_fh_baja" > column="DT_ > FH_BAJA" > jdbc-type="TIMESTAMP" > /> >name="ln_id_cliente_padre" > column="LN_ID_CLIENTE_PADRE" > jdbc-type="INTEGER" > /> >name= > "ss_mig_cif_aunatlc" > column="SS_MIG_CIF_AUNATLC" > jdbc-type= > "VARCHAR" > /> > > > > > (3) My repository.xml > > l version="1.0" encoding="UTF-8"?> > > > > >xml"> > ]> > > > ry isolation-level="read-committed" version="1.0"> > >connection-descriptor dbalias="thin:@IP:PORT:SID" useAutoCommit="2" d > efault-connection="true" driver="com.p6spy.engine.spy.P6SpyDriver" jc > d-alias="" jdbc-level="2.0" password="CRM_AGC" platform="Oracle" > protocol="jdbc" subprotocol="oracle" username="CRM_AGC"> >tion-pool logAbandoned="true" maxActive="1" maxIdle="1" maxWait=" > 5000" removeAbandoned="true" /> > >nnection-descriptor> > > &CRM_CLI > ENTE_GENERAL; > &CRM_CLIENTE_MASINFO; > > > > > > > > > > > -Mensaje original- > De: [EMAIL PROTECTED] [mailto:AndreasWues > [EMAIL PROTECTED] > Enviado el: viernes, 08 de agosto de 2003 12:13 > Para: ojb-use > [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 add > ress and the recipient > address. > at the moment i have an order class tha > t 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 SenderAddre > ss sender; > public RecipientAddress recipient; > } > > is it possible t > o load the order object and also load the sender and > recipient informati > on > in the proper classes in the order object ? I could not find any info > rmation > on how to > do that in the documentation. > > Unfortunately, norm > alizing 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 - P > latz 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: ojb-u > [EMAIL PROTECTED] > For additional commands, e-mail: ojb-user- > [EMAIL PROTECTED] > > --- > > Este co > rreo electrónico y, en su caso, cualquier fichero anexo al mismo, conti > ene 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 rueg > a notificar inmediatamente esta circunstancia mediante reenvío a la dir > ección electrónica del remitente. > > The information in this e-mail a > nd in any attachments is confidential and solely for the attention and us > e of the named addressee(s). You are hereby notified that any disseminati > on, distribution or copy of this communication is prohibited without the > prior written consent of Indra. If you have received this communication i > n error, please, notify the sender by reply e-mail > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- 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]
RE: one table -> multiple classes problem
<<< Hi, I don't know to do this task with only one query. I don't belive ojb can do it, but if you see the broker or query object in the API may be you find something. For storing you need 2 queries too. I don't know other way. >>> -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Enviado el: viernes, 08 de agosto de 2003 13:51 Para: OJB Users List Asunto: RE: one table -> multiple classes problem Hi, thanks for your answer. Correct me if i am wrong, but as far as i can read you xml files, you need to run 2 queries to get your 2 classes. I need to run 3 queries (actually there is one more address, so i need to run 4 queries) to load all the data i need from the database. This should be no problem, but i am wondering if it is not possible to do this in one step (1 query -> all 4 object will be loaded) ? getting each object separately i have 4 db accesses instead of 1 ! just wondering, Andreas > >Hi, >you can do it without problem. > >I have two classes for > one table. > >Classes: Crm_cliente_masinfo, Crm_cliente_general >Ta > ble: CRM_CLIENTE > > (1)First xml descriptor. > > > > > > > > > class="com.indra.crm.vo.Crm_cliente_masinfo" > table="CRM_CLIENTE" > > >name="ln_id_cliente" > column= > "LN_ID_CLIENTE" > jdbc-type="INTEGER" > primarykey="true" > aut > oincrement="true" > sequence-name="sec_cliente" > /> >iptor id="73" > name="ds_url" > column="DS_URL" > jdbc-typ > e="VARCHAR" > /> >name="ts_coment > ario" > column="TS_COMENTARIO" > jdbc-type="VARCHAR" > /> > < > field-descriptor id="79" > name="ln_facturacion" > column="LN > _FACTURACION" > jdbc-type="INTEGER" > /> >"80" > name="mn_nu_empleados" > column="MN_NU_EMPLEADOS" > j > dbc-type="INTEGER" > /> >name="mn > _nu_fact_emp" > column="MN_NU_FACT_EMP" > jdbc-type="INTEGER" > /> >name="sn_movil_emp" > colum > n="SN_MOVIL_EMP" > jdbc-type="INTEGER" > /> >id="83" > name="sn_nu_sedes" > column="SN_NU_SEDES" > jdbc > -type="INTEGER" > /> >name="sn_nu > _sedes_hfc" > column="SN_NU_SEDES_HFC" > jdbc-type="INTEGER" > > /> >name="ln_potencial_total" > > column="LN_POTENCIAL_TOTAL" > jdbc-type="INTEGER" > /> >descriptor id="86" > name="ln_potencial_fijo" > column="LN_PO > TENCIAL_FIJO" > jdbc-type="INTEGER" > /> >"87" > name="ln_potencial_movil" > column="LN_POTENCIAL_MOVIL" > jdbc-type="INTEGER" > /> >name= > "ln_potencial_datos" > column="LN_POTENCIAL_DATOS" > jdbc-type= > "INTEGER" > /> >name="ln_potencial_ > fijo_emp" > column="LN_POTENCIAL_FIJO_EMP" > jdbc-type="INTEGER > " > /> >name="ln_potencial_datos_em > p" > column="LN_POTENCIAL_DATOS_EMP" > jdbc-type="INTEGER" > / > > >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" > /> >r id="93" > name="dt_fh_alta" > column="DT_FH_ALTA" > jdbc > -type="TIMESTAMP" > /> >name="sn_ > id_usuario_mod" > column="SN_ID_USUARIO_MOD" > jdbc-type="INTEG > ER" > /> >name="dt_fh_mod" > col > umn="DT_FH_MOD" > jdbc-type="TIMESTAMP" > /> > id="96" > name="sn_id_usuario_baja" > column="SN_ID_USUARIO_ > BAJA" > jdbc-type="INTEGER" > /> > > name="dt_fh_baja" > column="DT_FH_BAJA&quo
RE: one table -> multiple classes problem
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. (2) Second xml descriptor (3) My repository.xml ]> &CRM_CLIENTE_GENERAL; &CRM_CLIENTE_MASINFO; -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]
Re: one table -> multiple classes problem
hi, ojb fires a query for each extent (subclass) residing in it's own table. extents in the same table (using ojbConcreteClass) are retrieved with one query. this behaviour has the advantage that it runs on all dbms (an alternative would be to use UNION) ! on the other hand, we need multiple queries an we cannot sort the whole result :( hth jakob Crecente Casanova, David wrote: <<< Hi, I don't know to do this task with only one query. I don't belive ojb can do it, but if you see the broker or query object in the API may be you find something. For storing you need 2 queries too. I don't know other way. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Enviado el: viernes, 08 de agosto de 2003 13:51 Para: OJB Users List Asunto: RE: one table -> multiple classes problem Hi, thanks for your answer. Correct me if i am wrong, but as far as i can read you xml files, you need to run 2 queries to get your 2 classes. I need to run 3 queries (actually there is one more address, so i need to run 4 queries) to load all the data i need from the database. This should be no problem, but i am wondering if it is not possible to do this in one step (1 query -> all 4 object will be loaded) ? getting each object separately i have 4 db accesses instead of 1 ! just wondering, Andreas Hi, you can do it without problem. I have two classes for one table. Classes: Crm_cliente_masinfo, Crm_cliente_general Ta ble: CRM_CLIENTE (1)First xml descriptor. table="CRM_CLIENTE" name="ln_id_cliente" column= "LN_ID_CLIENTE" jdbc-type="INTEGER" primarykey="true" aut oincrement="true" sequence-name="sec_cliente" /> iptor id="73" name="ds_url" column="DS_URL" jdbc-typ e="VARCHAR" /> name="ts_coment ario" column="TS_COMENTARIO" jdbc-type="VARCHAR" /> < field-descriptor id="79" name="ln_facturacion" column="LN _FACTURACION" jdbc-type="INTEGER" /> "80" name="mn_nu_empleados" column="MN_NU_EMPLEADOS" j dbc-type="INTEGER" /> name="mn _nu_fact_emp" column="MN_NU_FACT_EMP" jdbc-type="INTEGER" /> name="sn_movil_emp" colum n="SN_MOVIL_EMP" jdbc-type="INTEGER" /> name="sn_nu_sedes" column="SN_NU_SEDES" jdbc -type="INTEGER" /> name="sn_nu _sedes_hfc" column="SN_NU_SEDES_HFC" jdbc-type="INTEGER" /> name="ln_potencial_total" column="LN_POTENCIAL_TOTAL" jdbc-type="INTEGER" /> descriptor id="86" name="ln_potencial_fijo" column="LN_PO TENCIAL_FIJO" jdbc-type="INTEGER" /> "87" name="ln_potencial_movil" column="LN_POTENCIAL_MOVIL" jdbc-type="INTEGER" /> name= "ln_potencial_datos" column="LN_POTENCIAL_DATOS" jdbc-type= "INTEGER" /> name="ln_potencial_ fijo_emp" column="LN_POTENCIAL_FIJO_EMP" jdbc-type="INTEGER " /> name="ln_potencial_datos_em p" column="LN_POTENCIAL_DATOS_EMP" jdbc-type="INTEGER" / 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" /> r id="93" name="dt_fh_alta" column="DT_FH_ALTA" jdbc -type="TIMESTAMP" /> name="sn_ id_usuario_mod" column="SN_ID_USUARIO_MOD" jdbc-type="INTEG ER" /> name="dt_fh_mod" col umn="DT_FH_MOD" jdbc-type="TIMESTAMP" /> id="96" name="sn_id_usuario_baja" column="SN_ID_USUARIO_ BAJA" jdbc-type="INTEGER" /> name="dt_fh_baja" column="DT_FH_BAJA" jdbc-type="TIMEST AMP" /> (2) Second xml descriptor lass-descriptor class="com.indra.crm.vo.Crm_cliente_general" tab le="CRM_CLIENTE" /> name="ds_nb_cliente" co lumn="DS_NB_CLIENTE" jdbc-type="VARCHAR" /> tor id="68" name="ss_cif" column="SS_CIF" jdbc-type= "VARCHAR" /> name="sn_lv_tipo_cl iente" column="SN_LV_TIPO_CLIENTE" jdbc-type="INTEGER&