Multiple Table Mapping To Single Entity in Workshop 8.1

I've taken a test run on creating entity beans with workshop 8.1, although mapping
an CMP entity to a single database table looks to be relatively straightforward,
I can't seem to find a way to map multiple database tables to a single CMP entity
(at least not via workshop). Do I have to manually modify the deployment descriptors
after building with workshop?

Thanks, John.
Jingwei
"John Reynolds" <[email protected]> wrote:
>
Jingwei Zhang <[email protected]> wrote:
Is there any example of using ejbgen to map single EJB to multiple tables?
Jingwei... I found this at: http://www.beust.com/cedric/ejbgen/#multiple-table-mapping
By default, Entity beans are mapped to one table, with the attribute
table-name
on the tag @ejbgen:entity. If you want to map your Entity bean to more
than one
table, you can use the table-name attribute on individual @ejbgen:cmp-fields.
All the CMP fields that do not have a table-name attribute will use the
table
specified on @ejbgen:entity (which can therefore be considered as the
"default"
table).
If you want to map an Entity bean to several tables, you need to specify
a comma-separated
list of tables in the table-name attribute (and also on column). For
example:
* @ejbgen:cmp-field
* column = "bal1, bal2"
* table-name = "Table1, Table2"
Make sure that the number of tables matches the number of columns, and
that the
columns exist in the corresponding table (for example, in the example
above, Table1
must contain column bal1, and Table2, bal2).

Similar Messages

  • Move data from multiple Tables to a Single Table & Convert the list to ALV.

    Hi,
    My aim is to get the list of Materials with their descriptions, with MRP Controller, with Unrestriced Qty. & the Reorder Qty. So, I have to fetch the data from different tables. But finally I am not able to copy or move the fetched data from multiple tables into the single final table.
    Also tell me how to convert this list into ALV.
    Below is the program code.
    *& Report  Y_REORDER_REPORT
    REPORT  Y_REORDER_REPORT.
    tables : marc,makt, mard.
    DATA: Begin of i_final occurs 0,
            matnr type marc-matnr,
            maktx type makt-maktx,
            DISPO type marc-DISPO,
            MINBE type marc-MINBE,
            LABST type mard-LABST,
          end of i_final.
    DATA: Begin of i_marc occurs 0,
           matnr type marc-matnr,
           DISPO type marc-DISPO,
           MINBE type marc-MINBE,
          end of i_marc.
    DATA: Begin of i_makt occurs 0,
           matnr type makt-matnr,
           maktx type makt-maktx,
          end of i_makt.
    DATA: Begin of i_mard occurs 0,
           matnr type mard-matnr,
           LABST type mard-LABST,
           LGORT TYPE MARD-LGORT,
          end of i_mard.
    SELECT  matnr
            dispo
            minbe from marc
            into corresponding fields of table i_marc
            where dispo EQ 'STR'.
    SORT I_MARC by MATNR.
    WRITE: /10  'Material',
            75  'MRP',
            80  'Reorder Qty.'.
    LOOP at i_marc.
    Write: /10  i_marc-matnr,
            75  i_marc-dispo,
            80  i_marc-minbe.
    ENDLOOP.
    write: /.
    SELECT  matnr
            MAKTX from makt
            into corresponding fields of table i_makt
            for all entries in i_marc
            where matnr = i_marc-matnr.
    LOOP at i_makt.
    Write: /10 i_makt-matnr,
            30 i_makt-maktx.
    ENDLOOP.
    SELECT  matnr
            LGORT
            LABST from mard
            into corresponding fields of table i_mard
            for all entries in i_marc
            where matnr = i_marc-matnr.
    LOOP at i_mard.
    Write: /10 i_mard-matnr,
            30 I_MARD-LGORT,
            40 i_mard-labst.
    ENDLOOP.
    move  i_mard-matnr to i_final-matnr.
    move  i_marc-dispo to i_final-dispo.
    move  i_marc-minbe to i_final-minbe.
    move  i_makt-maktx to i_final-maktx.
    move  i_mard-labst to i_final-labst.
    WRITE: /10  'Material',
            30  'Material Desc.',
            75  'MRP',
            80  'Reorder Qty.',
            105 'Current Stock'.
    LOOP at i_final.
    Write: /10  i_final-matnr,
            30  i_final-maktx,
            75  i_final-dispo,
            80  i_final-minbe,
            105 i_final-labst.
    ENDLOOP.
    *LOOP at i_mard.
    *Write: /10  i_mard-matnr,
           30  i_makt-maktx,
           75  i_marc-dispo,
           80  i_marc-minbe,
           105 i_mard-labst.
    *ENDLOOP.
    Regards,
    Vishal

    Change like this,
    SELECT matnr
    lgort
    labst FROM mard
    INTO CORRESPONDING FIELDS OF TABLE i_mard
    FOR ALL ENTRIES IN i_marc
    WHERE matnr = i_marc-matnr.
    LOOP AT i_mard.
       WRITE: /10 i_mard-matnr,
       30 i_mard-lgort,
       40 i_mard-labst.
    ENDLOOP.
    LOOP AT i_marc.
       READ TABLE i_mard WITH KEY matnr =  i_marc-matnr.
       READ TABLE i_makt WITH KEY matnr =  i_marc-matnr.
       MOVE i_mard-matnr TO i_final-matnr.
       MOVE i_marc-dispo TO i_final-dispo.
       MOVE i_marc-minbe TO i_final-minbe.
       MOVE i_makt-maktx TO i_final-maktx.
       MOVE i_mard-labst TO i_final-labst.
       APPEND i_final.
    ENDLOOP.
    WRITE: /10 'Material',
    30 'Material Desc.',
    75 'MRP',
    80 'Reorder Qty.',
    105 'Current Stock'.

  • In XI Mapping multiple fields mapping to single target field.

    Hi Friends,
    In XI Mapping multiple fields mapping to single target field.
    For example my requirement is :
    Source Fields:(This RFC BAPI Structure)
    Empno                0-1
    EmpName           0-1
    Address             0-1
    Taget Field is:
    Details               0-1
    The above three fields passed to the Details Field. Here i am using Concat function
    But i have one query on that on,Every field having "line Break" required.
    Can you please help me out above this requirement.
    Thanks in Advance,
    Sateesh N.

    If you want a line break between the three fields, then try
    passing a,b,c to the udf and in the udf you would have
    return a+"\n"+b+"\n"+c;

  • Export Multiple tables into a single Excel Sheet

    We have a use case where we need to export multiple tables into an excel sheet. The exportCollectionActionListener only allows one table (which is provided in the exportedId attribute) to be exported into Excel. So is there a method provided by adf to export more that one table into excel ?

    dvohra,
    I need to export multiple tables into a single excel sheet. These links only show how to export a single table to an excel sheet.
    I have tried out this : http://iadvise.blogspot.com/2007/04/export-adf-table-to-excel.html. But i am not getting the popup to save the file. So i can't find out where the file got created.

  • Export to Excel - Multiple Tables in a single details section

    Hi All,
    I have a set of reports where I am using a single details section to show multiple tables stacked over one another. That is, i have a table with three columns and two rows, followed by some white space and then another table with 4 columns and 1 row, followed by white space and then other tables.
    When I export it to excel, I am getting the data but the ordering is in a reverse pivoted fashion:
    Excel output:
    CR_column1_Heading    CR_Column2_Heading    CR_Column1_Data CR_Column2_Data
    Is there a way to control the sequence of fields displayed in excel while exporting?
    Thanks.
    - Atif.

    @Carl,
    It is printing like this.
    HEADER1   HEADER2    HEADER3     DATA 1     DATA 2     DATA 3
    I am getting all the columns and fields in excel, that is not a problem. However, the problem is whether i can control the order the fields are printed onto Excel.
    Like what Ben is commenting:
    HEADER1   DATA 1     HEADER2    DATA 2     HEADER3     DATA 3
    However, I dont want to reorder the fields on the canvas as the format layout is predefined.
    I tried searching through the Cystal SDK if there is a finer level of control but to no avail.
    A work around under the above constraints would be simply amazing!
    Thanks again and appreciate your response.
    Regards,
    Atif.

  • Numbers: Copy/Paste from multiple tables into 1 single Table?

    I would appreciate some guidance in creating a copy/paste script from multiple numbers tables into a different single table within the same numbers document.
    The columns in the source table are in different positions to the destination table.
    So for example, i would want to copy…
    Sheet 1, Table 1 Cell A3  copy to Sheet 2 Table Z Cell B2
    Sheet 1, Table 1 Cell B3  copy to Sheet 2 Table Z Cell C2
    Sheet 1, Table 1 Cell C3  copy to Sheet 2 Table Z Cell E2
    Sheet 1, Table 1 Cell D3  copy to Sheet 2 Table Z Cell F2
    Sheet 1, Table 1 Cell E3  copy to Sheet 2 Table Z Cell G2
    Sheet 1, Table 1 Cell G3  copy to Sheet 2 Table Z Cell I2
    Sheet 1, Table 1 Cell J3  copy to Sheet 2 Table Z Cell H2
    and repeat the copy/paste on subsequent rows of each table until there is an empty row in Sheet 1 Table 1 (or if this is difficult, say set the repeat to a max of 30 rows).
    The script would then need to move on to Sheet 1 Table 2, and do the same copying to Sheet 2 Table Z (from where the previous copy/paste finished in Table Z).
    Repeat process would finalise with Sheet 1 Table 6.
    The Paste part would need to be pasting values, as the cells in the source tables do contain some formulas.
    At the moment this is all done manually and does take some to to undertake.
    If anyone can help, i would be very grateful.
    Thanks,
    Colin

    Interceptor,
    are you trying to aggregate data from severl tables into a single table?  If so you whould be able to do this without a script.  The function indirect() will allow you to construct the proper formula, which you may fill over (in the same row) to the appropriate cells, then fill down.
    Here is a small example:
    There are three data tables ("Table 1", "Table 2", and "Table 3").  And a summary "Table Z"
    In table Z make the first row a header (as shown):
    Use column A to enter the Sheet name and colomn B to enter the table name.
    In row 1 (the header), enter the cells you want to get
    in cell C2 type (or copy and paste from here) the formula:
    =INDIRECT($A2&"::"&$B2&"::"&C$1)
    now select cell C2, copy now select cell C2 thru H2, paste
    now select the cells C2 thu H2, hover the corsor over the bottom edge of the selection, and drag the yellow cirlc down as needed to fill the formula down.
    Update the sheet and table names as needed for each row

  • Single row editing for multiple tables in a single page

    Hi!
    I have split a table with many many columns into more tables with a lower number of columns. There is an ID column (sequence generated) that is Primary Key common for all tables. Obviously, the relationship between these tables is 1 to 1, so it’s not about having to build master-detail pages.
    What I need now is to edit all these tables in a single page: one single row from each table. The Automated Row Fetch & Automatic Row Processing (DML) processes used for the old table must be replaced by something else.
    Is there a way to use in a single page more pairs of such processes for more tables?
    I want to avoid manually writing processes with lot of PL/SQL code to handle row fetch & update.
    Keep in mind that the page will have an ID item that can be used to identify unique rows in all my tables.
    Thanks,
    Sorin

    I have split a table with many many columns into more tables with a lower number of columns
    IMHO that is a very bad idea. There is nothing wrong with having many columns in a table. If you would like to split them to better "categorize" them, just create views on the table and expose different subsets of the columns.
    I want to avoid manually writing processes with lot of PL/SQL code to handle row fetch & update.
    That is unavoidable given how you have designed the underlying tables.
    You could try creating a view that joins all the tables by the PK and creating a form based on that view. Then write a INSTEAD OF trigger on the view that "doles out" the DML on the view to each of the underlying tables.

  • Adding Sum Totals from Multiple Tables in A single Document

    Hello All,
    I'm having trouble adding sum totals from multiple tables I've created in a Pages 09 doc. I putting together a spreadsheet for cost projections for a house remodel. I created tables for each room of the house. At the bottom of the document I'd like to have another table that takes the totals from each individual room and adds them up. Problem appears to be that each table has the same x/y axis labels so row and column numbers/letters are repeated so the final table can't quantify thing correctly.
    Any easy solutions? I can't find anything that's helped in my search efforts.
    Thanks,
    Josefis

    Jerry,
    Thanks for the feedback. I thought that might be the case. And you were correct to assume I was more comfortable in Pages. I'm halfway through converting everything to numbers. In the end it will work great too. Just some different formatting/design choices to be made as numbers doesn't appear to be as versatile in the same way pages is with design. So far it looks pretty good though.
    Thanks again,
    Josefis

  • How can I sort multiple tables on a single page as if they were one continuous table?

    I have a single narrow column of numbers that cover multiple pages. I would like to do either of the following: break that long single column into multiple colums that fit on one page and are still able to be sorted in that arrangement OR sort the long column as it is (spread out over multiple pages) and then break that long sorted column down into multiple segments that can be placed onto a single page.
    I have been sorting the long single column, then copy and pasting sections from the column onto a new page so that I can print them on a single page.
    I am hoping there is a more elegant method to do this.

    Hi Walt,
    Sorting is one of the things that changed between Numbers '09 and Numbers 3. If you are on Mountain Lion I want to assume you are using '09. Is that true?
    This will work in '09 and 3. Table one is a single column with entries 1-89.
    A2 ==INDEX(Table 1 :: $A,ROW())
    B2 =INDEX(Table 1 :: $A,ROW()+35)
    C2 =INDEX(Table 1 :: $A,ROW()+70)
    The formulas are filled down.
    You can adjust the formulas in B and C to reflect how many rows fit on your page.
    quinn

  • Multiple tables of the same entity

    Hi *,
    I would like to do the following but don't really know how to go about it. Any hints?
    Suppose I have an entity A which has a field which is a collection of objects of entity B and entity B has the ID of entity A as a field (for cross reference). Is there a way so that I instead of 1 database table for entity B, I can create database tables of entity B which are separated on the value of the ID of entity A?
    I hope this is clearly formulated!
    Best regards,
    Vaak

    I think 2 beats 1. The main reason being to minimise the number of network calls. You're basically asking, are fascades a good idea? and the answer is yes.
    You can obviously do 3 in different app servers. However you'll need to configure your app servers so they can handle the fact that they're not the only ones updating the database. This is to handle concurrency as you mentioned. How you do this will depend on your app server and will affect performance, but shouldn't be a problem.
    I think you should definately decide up front what's going in different app servers, I dunno if 3 would work in the same app server.
    Why do you would want to use multiple app servers?
    Why not have everything in the same app?
    Is is just the 1 database?
    You can use clustering for scalability.

  • How to save multiple tables on one single save button in JDeveloper.

    hi all,
    i have two tables on a JSF page.
    the parent and child tables has 1 to many relationship.
    its like for department id i have many employee_id's.
    in my scenario ,
    i have to give values to both parent and child tables at a time on one single click on add button. and after clicking on one single save button i should be able to commit the data into database for both the tables at a time.
    its similar like a hire a person in fusion applications , when you clinked on hire person. all the related tables populated to give data and on one single save committing data to database.
    please help in this. and its my urgent requirement for my application design.
    am beginner to the J Developer Tool and ADF.
    regards,
    M vijayalakshmi.

    I assume you are using ADF BC as your business components. Now if both your Master and Chail VO are instances of the same AM, the commit operation of the AM will take care of it. You just have to drag and drop the commit operation as a Save button in your page

  • Multiple Crypto Maps on Single Outside Interface

    Hi, I had the following crypto map configured on my ASA5505 to allow Cisco IPSec VPN clients to connect from the outside:
    crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set pfs group1
    crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set transform-set ESP-AES-128-SHA ESP-AES-128-MD5 ESP-AES-192-SHA ESP-AES-192-MD5 ESP-AES-256-SHA ESP-AES-256-MD5 ESP-3DES-SHA ESP-3DES-MD5 ESP-DES-SHA ESP-DES-MD5
    crypto map outside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
    crypto map outside_map interface outside
    I'm trying now to set up an additional crypto map - a static configuration to establish a tunnel with Windows Azure services. The configuration they gave me is:
    crypto map azure-crypto-map 10 match address azure-vpn-acl
    crypto map azure-crypto-map 10 set peer XXX.XXX.XXX.XXX (obfuscated)
    crypto map azure-crypto-map 10 set transform-set azure-ipsec-proposal-set
    crypto map azure-crypto-map interface outside
    However, when I apply that configuration, my Cisco IPSec clients can no longer connect. I believe my problem is that last line:
    crypto map azure-crypto-map interface outside
    which blows away my original line:
    crypto map outside_map interface outside
    It seems I'm stuck with picking just one of the maps to apply to the outside interface. Is there a way to apply both of these maps to the outside interface to allow both IPSec tunnels to be created? We're running ASA version 8.4(7)3.

    Hi,
    You can use the same "crypto map"
    Just add
    crypto map outside_map 10 match address azure-vpn-acl
    crypto map outside_map 10 set peer XXX.XXX.XXX.XXX (obfuscated)
    crypto map outside_map 10 set transform-set azure-ipsec-proposal-set
    Your dynamic VPN Clients will continue to work just fine as their "crypto map" statements are with the lowest priority/order in the "crypto map" configurations (65535) and the L2L VPN is higher (10)
    And what I mean with the above is that when a L2L VPN connections is formed from the remote end it will naturally match the L2L VPN configurations you have with "crypto map" configurations using the number "10". Then when a VPN Client connects it will naturally not match the number "10" specific configurations and will move to the next entry and will match it (65535)
    If you would happen to configure a new L2L VPN connection then you could give it the number "11" for example and everything would still be fine.
    Hope this helps
    - Jouni

  • CS4-connecting to multiple tables within a single Indesign doc.

    Hi!
    I recently downloaded Datalinker, a plugin for Indesign that lets you connect to databases. I created a table in indesign and pulled in data from one table in the database. The problem I'm having is if I create another table in the same indesign document and want to access a different table in the database, I can't get that to work. It seems like it only wants to be able to connect to one table at a time per document?
    Does anyone know a different way to go about doing this?
    Thanks!

    Have you contacted Teacup? They're very good about responding.
    Bob

  • How to handle multiple tables data in Entity Beans?

    How to handle multiple tables data in Entity Beans?
    i mean, my bean (non trivial) is responsible for frequent
    insertion in one table and some deletion on another table.
    Can anyone of you...please..?

    Is your data model right? If you are adding in one and deleting in another it sounds to me more like a process that an entity, in which case you may revisit your data model and simplify it, add in a session bean with the process method to co-ordinate between the two.
    However, if you want to map multiple different tables within a single entity bean it is possible and just part of the mapping. How you actualyl specify it depends on which implementation you are working with.
    Cheers,
    Peter.

  • TopLink Question - Mutliple Object to Single Table mapping

    Just a short question,
    Does toplink support mapping feature as such that it can map two distinct objects with single table that when in insertion or selection those two objects can be manipulated, selected in single operation? I know that TopLink mapping supports single object from multiple table mapping, but I'm not sure about multiple objects being associated with single table.
    Secondly, does Hibernate has something like what I described above?
    Howard.

    Hi Howard,
    You can map two objects to a single table if the objects are related by aggregation.
    In TopLink, two objects–a source (parent or owning) object and a target (child or owned) object–are related by aggregation if there is a strict one-to-one relationship between them, and all the attributes of the target object can be retrieved from the same data source representation as the source object. This means that if the source object exists, then the target object must also exist, and if the source object is destroyed, then the target object is also destroyed.
    http://www.oracle.com/technology/products/ias/toplink/doc/1013/main/_html/tutbuild004.htm#sthref2325
    -Blaise

Maybe you are looking for

  • Unable to activate domains on solaris 10

    Hi all, I have installed guardian 1.1 on my local machine (Win XP). I am using java 1.5_06. I was able to activate 9.2.1 domains on my machine, but not the domains running on Solaris 10. It keeps saying "The agent is not properly deployed to all runn

  • Apple Remote Desktop 3 and Real VNC

    Just wanted to post an FYI, that recently I found out VNC (Real VNC) Server & Viewer were conflicting with ARD 3.2 in terms of screen sharing/control. All other connections were fine. (e.g. chat, message, package install, etc..) For me to regain a su

  • Use of FakeDataSource.properties file.

    Hi, Could you please tell me the usage of FakeDataSource file in JTDataSource file. Why we need this FakeDataSource file. Your response will be needful for me. Regards, Srinivas

  • Selecting media to sync to iPod Nano causes iTunes to become sluggish and freeze.

    For the past few months I've noticed that when I update the content on my 6th Gen iPod Nano iTunes will freeze after I switch from music to audiobooks, or anything for that matter.  The same issue happens when I try to select specific artists, or an

  • Presenter 7.07 Problems License

    I can not install presenter 7.07 or presenter 7  I keep getting License Issues I called Adobe Tech support and have done everything they asked. un installed all adobe products install as a trail office 2007 windows 7 64 bit created new user account I