One-to-one-to-one direct to field mapping

Yes, I didn't mispelled, there IS a one-to-one-to-one relationship in the database I am mapping, don't ask me why!
To make it simple:
TABLE A (a,b, att1)
TABLE B (b,c, att2)
TABLE C (c, att3)
My Descriptor class is DescA.java with all attributes (String att1, String att2 and String att3) and is associated directly with table A.
I have mapped att1 using direct to field.
I have mapped att2 using direct to field and multitable.
But there is no direct relationship between A and C tables, which makes multitable configuration impossible (?).
So, how can I map C.att3 direct to DescA.att3 ??
[]'s
Henrique

Henrique,
If you are using the Toplink Workbench you will have to specify the relationship between Table B and C using an After Load method. The mapping workbench does not support this scenario yet, but it is allowed by TopLink. Use the api ClassDescriptor.addMultipleTableForeignKeyFieldName(String, String) to specify the relationship.
In the workbench you will see a problem message about the primary keys not matching and no reference being specified. You can safely ignore this warning, or if it bothers you, the only workaround I can think of is to also specify the mappings to Table C in the afterload method.
Karen

Similar Messages

  • Direct to field mapping to a foreign column

    I am using toplink workbench to map an attribute to a column in a foriegn table.
    Example:
    Table Emp {
    EmpID,
    AddressID, -- (Foriegn Key to the table Address)
    StreetName }
    Table Address {
    AddressID, (Primary Key)
    StreetName }
    Class Emp{
    empId;
    addressId;
    streetName;
    Class Address {
    addressId;
    streetName;
    In the workbench I have the descriptors defined and I am trying to map attribute 'Emp->streetName' to the column 'Address->StreetName'.
    I added the the Address table in the advanced properties->Multitable Info of Emp class and also defined the association between the tables.
    I mapped the 'streetName' property to the the 'Address->StreetName' using a direct to field mapping.
    When I do getter on the streetName of the Emp class I get Null and I don't see any query getting executed in the Toplink to retrieve the streetName.
    I don't want to load the complete Address object just to grab the streetName from the Address table.
    Did anybody try to do something similar? if yes I would appreciate your hint.
    -Rama

    TopLink for POJOs does not support lazy loading of primitive type attributes. Lazy loading is only possible with relationships (i.e., one-to-one, one-to-many, many-to-many).
    Mapping the same column data to two different classes does entail a number of complications but regardless, you'll eventually have to perform a join between the EMP and ADDRESS table to obtain the street name associated with an Employee. If you model your Employee-Address relationship as a one-to-one rmapping with Employee having an attribute of type Address:
    class Emp {
        long id;
        Address address;
    class Address {
       long id;
       String streetName;
    }you can configure the relationship to use joining[1] so that when you read an Emp you'll also read the associated Address in a single statement.
    --Shaun
    [1] http://www.oracle.com/technology/products/ias/toplink/doc/10131/main/_html/oomapcfg002.htm#sthref3924

  • Lazy loading or indirection for direct to field mapping striing object

    Hi,
    I need to achieve indirection for String instance variable, currently mapped using direct to field mapping.
    This field is a text column in sql server storing large data which is rarely read.
    Recently we have been noticing that it is causing lot of IO on our SAN system.
    Is there a way indirection can be achieved for this which is currently mapped as direct to field.
    I have tried using indirection in transformation mapping. But profiling db indicates above mentioned text column is still part of the select query.
    Thanks
    Nagesh

    Hi Nagesh,
    There is no support for lazy loading of DirectToField mappings in TopLink 10.1.3 POJO persistence. Typically, people who have large CLOBs or BLOBs will put them in a separate table to avoid loading them with their owner. If you can't refactor your data model to accomodate this things get more complicated. Do you ever update these large structures are they read only in your application? If they are read only then a very simple approach is to not map the large data column and instead lazily load the data with a report query.
    Ideally you would upgrade to TopLink JPA in 11g where lazy loading of Basic mappings is supported. :-)
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • I need one XML File containing one Idoc fields Say Orders01

    hiall,
    i need one XML File containing one Idoc fields Say Orders01
    bye
    satish

    hi,
    <?xml version="1.0" encoding="iso-8859-1"?>
    <ORDERS02>
      <IDOC BEGIN="1">
        <EDI_DC40 SEGMENT="1">
          <TABNAM>EDI_DC40</TABNAM>
          <MANDT>800</MANDT>
          <DOCNUM>0000000000213213</DOCNUM>
          <DOCREL>46B</DOCREL>
          <STATUS>30</STATUS>
          <DOCTYP>ORDERS02</DOCTYP>
          <DIRECT>1</DIRECT>
          <RCVPOR>A000000032</RCVPOR>
          <RCVPRT>LS</RCVPRT>
          <RCVPRN>sell</RCVPRN>
          <RCVSAD/>
          <RCVLAD/>
          <STD/>
          <STDVRS/>
          <STDMES/>
          <MESCOD/>
          <MESFCT/>
          <OUTMOD>4</OUTMOD>
          <TEST/>
          <SNDPOR>SAPSID</SNDPOR>
          <SNDPRT>KU</SNDPRT>
          <SNDPRN>23334</SNDPRN>
          <SNDSAD/>
          <SNDLAD/>
          <REFINT/>
          <REFGRP/>
          <REFMES/>
          <ARCKEY/>
          <CREDAT>20061019</CREDAT>
          <CRETIM>205734</CRETIM>
          <MESTYP>ORDERS</MESTYP>
          <IDOCTYP>ORDERS02</IDOCTYP>
          <CIMTYP/>
          <RCVPFC/>
          <SNDPFC/>
          <SERIAL></SERIAL>
          <EXPRSS/>
        </EDI_DC40>
        <E1EDK01 SEGMENT="1">
          <KZABS>X</KZABS>
          <CURCY>USD</CURCY>
          <WKURS>1.000</WKURS>
          <ZTERM>ZZZZ</ZTERM>
          <BSART>EC</BSART>
          <BELNR>300024455</BELNR>
          <RECIPNT_NO>misssa</RECIPNT_NO>
        </E1EDK01>
        <E1EDK14 SEGMENT="1">
          <QUALF>014</QUALF>
          <ORGID>1000</ORGID>
        </E1EDK14>
        <E1EDK14 SEGMENT="1">
          <QUALF>009</QUALF>
          <ORGID>001</ORGID>
        </E1EDK14>
        <E1EDK14 SEGMENT="1">
          <QUALF>011</QUALF>
          <ORGID>1000</ORGID>
        </E1EDK14>
        <E1EDK03 SEGMENT="1">
          <IDDAT>012</IDDAT>
          <DATUM>20061019</DATUM>
        </E1EDK03>
        <E1EDKA1 SEGMENT="1">
          <PARVW>LF</PARVW>
          <PARTN>000002344</PARTN>
          <TELF1></TELF1>
          <BNAME></BNAME>
        </E1EDKA1>
        <E1EDKA1 SEGMENT="1">
          <PARVW>WE</PARVW>
          <LIFNR>1000</LIFNR>
          <NAME1></NAME1>
          <STRAS></STRAS>
          <ORT01></ORT01>
          <PSTLZ>4444</PSTLZ>
          <LAND1>EN</LAND1>
          <TELF1></TELF1>
          <SPRAS>D</SPRAS>
          <ORT02></ORT02>
          <REGIO>02</REGIO>
        </E1EDKA1>
        <E1EDK02 SEGMENT="1">
          <QUALF>001</QUALF>
          <BELNR>600060324</BELNR>
          <DATUM>20061019</DATUM>
          <UZEIT>205736</UZEIT>
        </E1EDK02>
        <E1EDK17 SEGMENT="1">
          <QUALF>001</QUALF>
          <LKOND>EXW</LKOND>
          <LKTEXT>london</LKTEXT>
        </E1EDK17>
        <E1EDK18 SEGMENT="1">
          <QUALF>001</QUALF>
          <TAGE>12</TAGE>
          <PRZNT>4.000</PRZNT>
        </E1EDK18>
        <E1EDK18 SEGMENT="1">
          <QUALF>002</QUALF>
          <TAGE>30</TAGE>
          <PRZNT>2.000</PRZNT>
        </E1EDK18>
        <E1EDK18 SEGMENT="1">
          <QUALF>003</QUALF>
          <TAGE>45</TAGE>
        </E1EDK18>
        <E1EDP01 SEGMENT="1">
          <POSEX>00010</POSEX>
          <PSTYP>0</PSTYP>
          <KZABS>X</KZABS>
          <MENGE>1.000</MENGE>
          <MENEE>EA</MENEE>
          <BMNG2>1.000</BMNG2>
          <PMENE>EA</PMENE>
          <VPREI>3</VPREI>
          <PEINH>1</PEINH>
          <NETWR>3</NETWR>
          <MATKL>001</MATKL>
          <BPUMN>1</BPUMN>
          <BPUMZ>1</BPUMZ>
          <E1EDP20 SEGMENT="1">
            <WMENG>1.000</WMENG>
            <EDATU>19</EDATU>
          </E1EDP20>
          <E1EDP19 SEGMENT="1">
            <QUALF>002</QUALF>
            <IDTNR>100</IDTNR>
          </E1EDP19>
          <E1EDP19 SEGMENT="1">
            <QUALF>001</QUALF>
            <KTEXT>some text</KTEXT>
          </E1EDP19>
        </E1EDP01>
        <E1EDS01 SEGMENT="1">
          <SUMID>002</SUMID>
          <SUMME>3</SUMME>
          <SUNIT>USD</SUNIT>
        </E1EDS01>
      </IDOC>
    </ORDERS02>
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Can any one tell me how to work with field exit????

    Hi
    Can any one tell me how to work with field exit I know how to create them. I want to know how it works. Actually I want to create a field exit for T-CODE MIRO. Where I want to put the value ebeln of the PO Reference tab into the Assignment of details tab and make Assignment field disable.
    Thanks in advance

    Hi,
    Follow the Steps,
    1. Go to CMOD transaction
    2. From the menu "GOTO->TEXT ENHANCEMENTS->DATA ELEMENTS-   ->NEW DE CUST DOCU".
    3. In the displayed box specify the data element and
       press either "CHANGE" or " Ref to screen" button
    4. CHANGE button is for defining the documentation
    5. "Ref. to screen" if for assigning the screen in which
       a field has the this type data element.
       Note: You should have used this data element for a   
             field in that screen.
    6. Now it will ask for Function Module name, specify the
       FM name and double click it. It will go to the editor.
    7. Now using the Import parameters code accordingly
    8. Activate and go back
    9. Now "Assign the created program ( that is FM) to the
       screen by specifying the Program name and Screen
       number.
    10. Now save and activate.
    Note: No need to create a separate project for creating field exit through transaction CMOD.
    I hope this is suffice.
    Regs,
    Venkat Ramanan

  • One (src)to many(target) field mapping

    Hi,
    I am new to XI.Is one to many field mapping possible in XI?
    Plz send me the links with examples.

    Hi,
    Yes it should be possible.
    Follow this links
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0e/56373f7853494fe10000000a114084/content.htm

  • Drop the Rules of one table from existing bi directional replication setup

    Hi All,
    I have one small question on bi directional replication setup, Its regarding table add in existing replication setup.
    What happened ,When we add a new table to existing replication setup if any reason table is not replicating between two database even we are not getting
    any error in dba_apply_error ,then we have to remove the rules for that particular table and setup again. Some time what happened we got error "queue has
    errors" i dont know the ORA number. But in that case what happened Apply process ABORETED and when we try to start the process it gives same error
    ("Queue has errors" ) and ABORTED again.
    then on metalink for doc id 203225.1 .we have remove the whole replication Manually and setup again. It's horriable....
    Could you please help that before drop the rules for particular table from exisitng bi directional replication setup then wht should we do ?
    Do we need to unscheduled the propagation process and then drop the rules becuase i read on metalink that reason behind the error ,queue has errors
    "negative rules drops while propagation process using the same rule set" .
    Please Suggest!!!!!!!!!!
    Many Thanks

    How huge those tables?. If those are small tables use Oracle MINUS function to get the defference records.

  • Is there an all in one printer that allows me to scan multiple pictures at one time and put them directly into iPhoto?

    I am looking to replace an old HP psc 2210 all in one printer  with a new all in one that will let me scan multiple photos at one time and put them directly into iPhoto.  Dos anyone have suggestions for a printer that will do this?

    I use an HP Photosmart, but most scanners will scan multiple photo's. I just make sure in the scan preferences, I tick the box to "Detect Seperate Items". I normaly scan 6 to 8 photo's at a time, size depending on how many I can fit on the scanner bed. I set the preferences to scan directly to iPhoto.
    Hope this helps.

  • How to delete the double records connected to one or more than one tables in SQL 2008?

    Hi
    Can anyone please help me with the SQL query. I Im having a table called People with columns names: personno., lastname, firstname and so on. The personno. is having duplicate records,so all the duplicate records i have written with "double" in
    the beginning of the numbers. I tried deleting these double records but they are linked to one or more than one tables. I have to find out, all the tables blocking the deleting of double person. And then create select statements which creates update statements
    in order to replace the current id of double person with substitute id. (The personno. is in the form of id's in the database)
    Thanks

    You should not append "double" in the personno. When we append it will not be able to join or relate to other table. Keep the id as it is and use another field(STATUS) to mark as duplicate. Also we will require another field(PRIMARYID) against
    those duplicate rows i.e the main or the primary personno.
    SELECT * FROM OtherTable a INNER JOIN
    (SELECT personno, status, primaryid FROM PEOPLE WHERE status = 'Duplicate') b
    ON a.personno = b.personno
    UPDATE OtherTable SET personno = b.primaryid
    FROM OtherTable a INNER JOIN
    (SELECT personno, status, primaryid FROM PEOPLE WHERE status = 'Duplicate') b
    ON a.personno = b.personno
    NOTE: Please take backup before applying the query. This is not tested.
    Regards, RSingh

  • Clearing of open items from one Bank Account to one or several customer A/C

    The requirement herein is to do the Posting & clearing of open items from one Bank Account to one or several customer Accounts. We will have to use the Standard program RFBIBL00 to achieve this because the program can do the posting and clearing of open items. I know that we will have to use the structures BSELK (Header) & BSELP (item) to get the clearing functionality as well. Now the question is to which field we will map the Bank A/C No. and the Customer Clearing A/C. I need help on mapping the data to correct structure fields. I thought about it and I think the data should be arranged like the following:
    BGR00- Session Header
    BBKPF- Header
    BBSEG- Doc. data (Bank Account BBSEG-BANKN )----Can you confirm ??
    BSELK-AGKON (Customer A/C- open item/ Header )
    BSELP - Line Item
    BSELK-AGKON (Customer A/C- open item/ Header )
    BSELP - Line Item
    BSELK-AGKON (Customer A/C- open item/ Header )
    BSELP - Line Item
    I know that the clearing can happen from one Bank A/C to several customer accounts. I am thinking on building up data in this format & then writing it to a file to sumbit the file data to RFBIBL00. Can anybody help me in building up the data. Kindly provide your helpful insights. I want to be sure if this is correct or not ?? One more question how to fill the BSELP structure ??

    Solved Through forum

  • Hi guys i added a new mail account and now she i click new mail i can see 4 accounts, the first is right below the subject, and it' the old one and the new one, the other one is on its right and it's the old one and the new one. is it normal? Thanks.

    hi guys i added a new mail account and now she i click new mail i can see 4 accounts, the first is right below the subject, and it' the old one and the new one, the other one is on its right and it's the old one and the new one. is it normal? Thanks.

    sorry, correction,
    hi guys i added a new mail account and now if i click new message on the mail field  i can see 4 accounts, the first is right below the subject, and it' the old one and the new one, the other one is on its right and it's the old one and the new one. is it normal? Thanks.

  • How does one get the Satellite to work in Google Maps ?

    How does one get the Satellite to work in google maps ?

    I am experiencing exactly the same issue - iMac, 10.6.8.  Thanks for reporting it - I thought I was going nuts.  What happens from here?  Does Apple watch these postings?  Do we just hope that they find the bug themselves?  Is there a vehicle for reporting bugs directly to Apple?
    Thanks in advance.

  • More than one work center for one operation

    Hi Experts,
    Is it posssible to assign more than one work center to one operation,in a maintenance order?
    for example if head fitter and helper has executed maint.activity,how we can do this
    Thanks in advance
    Regards
    Prashil

    Dear,
    You cannot assign more then one workcenter to a one operation.
    But you can assign to a sub operation,i.e to operation one workcenter and to suboperation anotherworkcenter.
    For Sub-operation:
    Go to task list change >>> Operation tab.
    Let say your first operation number is 0010. Then below it for next operation change operation number to 0010 and next to it there is field for sub-operation give there number 0001 or 0010 as per your requirement. Select suitable control key and work center, give description and press enter. your sub operation 0001 will be created for operation 0010.
    I hope it will solve your query,
    Thanks,
    Mohit

  • Authorization objects for  transaction, one to view, and one to maintain

    Hi all,
    My requrement is to create two authorization objects for  transaction, one to view, and one to maintain.
    I know how to create objetcs vai sm21, but i donot know how to crate objects with activity codes.
    Please suggest how to create object where i can asign activity codes.
    regards
    manish

    The Authorization Concept
    R/3 uses authorization objects to assign authorizations to users. An authorization object is a template for an authorization. For example, authorization object F_SKA1_BUK - G/L Account: Authorization for company codes requires the specification of two field values: Company Code and Activity. To allow a General Ledger supervisor to create a general ledger master record, he/she must be assigned an authorization to create (Activity 1) accounts for a specific company code (eg. Company Code 2000). Such an authorization is created using the object F_SKA1_BUK by assigning these field values and naming the authorization following an appropriate convention (eg. Z_SCC20001).
    Authorizations may be classified as general authorizations, organizational authorizations or functional authorizations. General authorizations specify the functions a user may perform. Authorization object F_SKA1_BUK has been assigned to the function for creating general ledger master records. The system checks for the useru2019s authorization to create general ledger accounts (Activity 1) in at least one company code. The system then checks whether the user is permitted to create accounts for the specified organizational unit (company code) and has the required functional authorizations. Authorizations in this case may restrict the user to certain Charts of Accounts. In addition, an authorization group may be defined in certain authorization objects to protect individual master records.
    Profiles relating to an organizational role (eg. General Ledger Supervisor) are defined consisting of a list of authorizations and other profiles. Such profiles are then assigned to users with that role and stored in their user master record along with other data (eg. password).
    Do check this link as well.
    http://articles.techrepublic.com.com/5100-10878_11-5110893.html

  • Why we can have only one public class in one source file

    why we can have only one public class in one source file

    When the java compiler is run it looks for classes referenced by the classes you are directly compiling. When looking for these referenced classes it looks for source as well as class files and compiles them automatically if the coresponding class files are missing, or older than the source.
    In order to do this it must be able to work out the source file name for any given class which might be referenced from another (the rule also applies to package level access).

Maybe you are looking for

  • Can I share contacts between different Apple ID accounts on Icloud?

    I would like my wife to have access on her iPhone to the contacts on my iPhone. We have different Apple ID's. Can I share my contacts with her through iCloud?

  • Problem in data transfer from BW to CRM

    Dear Guys, I am facing one problem when i am tranfering the data from BW to CRM system (using Analysis Process Designer). When i am transfering data from standard ODS, data has changed properly. But in custom ODS, data has not changed. In both part,

  • IBook won't turn on

    So this is actually a question for my mom. Her iBook G4 has not been working correctly. Sometimes (not all the time) her computer will not turn on after she turns it off. The only way we can get it to turn back on is: 1. Take out the battery and unpl

  • Laggy Mouse

    I have a 13" MacBook Pro Retina, Late 2012.  When at home, I often have it hooked up to two 24" monitors via Thunderbolt > DVI.  Everything runs smoooooth as can be including 1080 video, Photoshop, FinalCut Pro, etc. except....the mouse cursor.  The

  • Looking for Business Scenario Configuration Guide for ECO CRM

    hi, I have the SAP E-Commerce for mySAP ERP: Business Scenario Configuration Guide (for ECO). I am looking for the same document for ECO CRM. Does anyone know where I can find this document? kind regards Michael