Creating a pseudo column in class-table mapping

I would like to create a class (Reference) with attributes
long owner ;
long child ;
String childName ; // read only
This will be loaded into the owner object in a Vector.
This will be mapped to a database table (db_references) with columns
owner number; -- FK to owner
child number; --FK to child
We are setting a shallow load scheme where we are only pulling the keys of the child objects into the owner.
However, on load, I would like to be able to pull in the name of the child object as well as the key.
If I add the child table to the descriptor, inserts of the Reference class try to insert into child table which already has the row, throwing the predictable error.
This is another situation where my Oracle Forms experience must be blinding me to the correct solution. Any suggestions?

I gave up on the generic mapping class and mapping table endeavor.
In my current test, I created a read only SummaryClass that maps to a subset of the attributes on the FullClass.
The Vector in the OwnerClass is mapped to the SummaryClass in TopLink. I even created a view on the tables involved with the FullClass with just the attributes required by the SummaryClass. When I read the owner, I get the FullClass in the Vector. I even changed the PK in the view for the SummaryClass to not match that in the FullClass.
The FullClass objects are in the TopLink cache. There is no attempt to read the database on the read.
When I issue a
server.initializeIdentityMaps()
in the read statement.
Then the correct classes are returned on the read.
A less radical:
UnitOfWork uowSession = getUnitOfWorkSession();
uowSession.removeFromIdentityMap(thePlan);
in the read also works.
I am rather concerned that the returned class from a TopLink read changes based on the state of the read cache.
Any suggestions on how best to address this odd behavior?
Thanks

Similar Messages

  • Create two logical columns with same LTS mapping but diff filter conditions

    Hi,
    Problem:
    How to create two logical columns within same logical table mapped to same physical column but different filter conditions?
    I have a scenario where in,
    Physical layer columns
         - table1.employee
         - table1.emp_city
    I need a columns in logical layer:
    Logical layer - lt1.count_emp_delhi (counts distinct employees whose city_name = 'Delhi')
              lt1.count_emp_mumbai(counts distinct employees whose city_name = 'Mumbai')
    My approach:
    For Delhi column
    1. Create a logical column lt1.count_emp_delhi mapped to the physical column table1.employee
    2. Aggregate using countdistinct in aggregate tab.
    3. Edit the mapping condition
         3.1. Use the where clause and set table1.emp_city='Delhi'.
    For Mumbai column.
    Followed the same approach as above but in 3.1 if I change the condition to 'Mumbai', even the delhi column is populated with mumbai count which is ERRONEOUS
    Could some one please help?

    Hi,
    1. Create two alias tables for table1 in Physical Layer. Lets say TB_Mumbai and TB_Delhi
    2. Create a logical table in BMM layer (D1 Employee Cities )
    3. Drag and drop the employee & emp_city columns from both alias tables (TB_Mumbai and TB_Delhi ) into your newly created logical table.
    4. Now you can see two Logical Table Sources (TB_Mumbai and TB_Delhi )
    5. Now using Where condition, write the condition on each table
    NOTE: Don't write any condition on the Physical table Table1.
    Hope it helps you.
    Regards,
    Kalyan Chukkapalli
    http://123obi.com

  • File Browse Option don't show me all Column in Data / Table Mapping

    Dear Friends,
    i am using 4.1 on APEX.ORACLE.COM.
    i have to created page with DATA Upload option.Page are ctreated successfully But there is one problem when i COPY & PASTE DATA from Excel Sheet then Data Upload Success fully.
    But When I use File Browser Option to Upload Data Then In Data / Table Mapping Step that show me Only One Column Name Select list with Do Not Load default option . but i have 7 column name in Excel Sheet. that should be display me 7 Select List to select All column name which are mention in Excel Sheet
    Please tell me where i am wrong and how to display all Column name in Data / Table Mapping step to upload Excel Sheet Data.
    How to Resplve this issue.
    Thanks
    Manoj Kauhsik

    Dear Earl,
    Thanks to reply me.
    I am not using Utility to upl;oad Excel Sheet Data.
    i am go through Apex.oracle.com .i have create an application to upload data from Excel Sheet.
    There is an option DATA UPLOAD when we create new Page so i have choose this option and create Pages with follow all instraction .By using this option i want to an Feature in my Application to Upload Data .
    When i use Copy and Paste OPtion to upload data from Excel Sheet.then Data ar Uploaded but Problem Is When i use File Browser Option to upload data then that show me only one option for Column name rather than i have 7 Column in My excel file.
    i have one more problem ,i have .csv file when i open it and close then no problem but when i reopen it then that show me a pop up with Meassages
    "Excel has detected abc.csv file is a SYLK file.but can't load it".
    How resole it.Please suggest me.
    Thanks
    Vedant

  • Add a field in a form after creating a new column in a table

    Hi,
    I have searched extensively in the help menus and tutorials and maybe I have missed this, but after adding a new column to a table. How do I update the form so that when data is entered into the form it is populated in the table? Is there a tutorial or explanation of the process somewhere?
    Thanks,

    Hi
    That has to be done manually but it is simple. Create a new item of the desired type e.g. Text Item, Select List by Right clicking on the region and select Create Page Item. A wizard will start where you will select the desired type. Press next and enter the name of the item. e.g. P3_LAST_NAME. Press Next and Enter a label for the Item. Press next and choose Source Type as Database Column when asked. Press Create button.
    Hope it helps.
    Zulqarnain
    MaxApex Hosting
    http://www.maxapex.com

  • Create a new column in a table that compares the value of one column with its previous value

    The DDL:
    DECLARE
    @T TABLE
    IDNO
    int,
    name
    varchar(40),
    [Date]
    datetime2,
    Price1
    float,
    Price2
    float
    DECLARE
    @K TABLE
    IDNO
    int,
    name
    varchar(40),
    [Date]
    datetime2,
    Price1
    float,
    Price2
    float
    INSERT
    INTO @T
    VALUES(22,'C_V_Harris','2014-01-02 10:23:49.0000000',
    23.335,      
    23.347)
    INSERT
    INTO @T
    VALUES(21,'C_V_Harris','2014-01-02 10:05:13.0000000',
    23.357,      
    23.369)
    INSERT
    INTO @T
    VALUES(20,'C_V_Harris','2014-01-02 09:56:15.0000000',
    23.364,      
    23.377)
    INSERT
    INTO @T
    VALUES(19,'C_V_Harris','2014-01-02 09:45:26.0000000',
    23.351,      
    23.367)
    INSERT
    INTO @T
    VALUES(18,'C_V_Harris','2014-01-02 09:43:20.0000000',
    23.380,      
    23.396)
    INSERT
    INTO @T
    VALUES(17,'C_V_Harris','2014-01-02 09:34:28.0000000',
    23.455,      
    23.468)
    INSERT
    INTO @T
    VALUES(16,'C_V_Harris','2014-01-02 09:30:37.0000000',
    23.474,      
    23.486)
    INSERT
    INTO @T
    VALUES(15,'C_V_Harris','2014-01-02 09:18:12.0000000',
    23.419,      
    23.431)
    INSERT
    INTO @T
    VALUES(14,'C_V_Harris','2014-01-02 09:16:06.0000000',
    23.360,      
    23.374)
    INSERT
    INTO @K
    SELECT
    ROW_NUMBER()
    OVER (ORDER
    by IDNO)
    AS RN,*
    FROM
    @T
    SELECT
    * FROM
    @K
    --not working:
    SELECT
    a.RN,a.Price2
    FROM
    @K a
    INNER
    JOIN @K
    b
    ON
    a.RN=b.RN-1
    WHERE
    a.Price2>b.Price2
    I need to create  a view with a column (say 'Comp' below) that compares the value of each row in Price2 with the previous Price2 row, and it is greater then +1, the
    same 0, and less -1.
    The processed table should be:
    IDNO
    name
    Date
    Price1
    Price2
    Comp
    22
    C_V_Harris
    1/2/2014 10:23:49
    23.335
    23.347
    0
    21
    C_V_Harris
    1/2/2014 10:05:13
    23.357
    23.369
    1
    20
    C_V_Harris
    1/2/2014 9:56:15
    23.364
    23.377
    1
    19
    C_V_Harris
    1/2/2014 9:45:26
    23.351
    23.367
    -1
    18
    C_V_Harris
    1/2/2014 9:43:20
    23.38
    23.396
    1
    17
    C_V_Harris
    1/2/2014 9:34:28
    23.455
    23.468
    1
    16
    C_V_Harris
    1/2/2014 9:30:37
    23.474
    23.486
    1
    15
    C_V_Harris
    1/2/2014 9:18:12
    23.419
    23.431
    -1
    14
    C_V_Harris
    1/2/2014 9:16:06
    23.36
    23.374
    -1
     How can I structure the statement to get (the most recent - order by date ) result for Comp?

    Satheesh Variath, I just had to make some corrections from your script to get the correct answer:
    CREATE
    VIEW vw_Comp
    AS
    SELECT
    TOP 1 t.IDNO,t.name,t.[Date],t.Price1,t.Price2,
    CASE
    WHEN t.Price2
    > LAG(Price2,1)
    OVER (PARTITION
    BY name
    ORDER BY IDNO) 
    THEN 1
    WHEN t.Price2
    < LAG(Price2,1)
    OVER (PARTITION
    BY name
    ORDER BY IDNo) 
    THEN -1
    ELSE 0
    END
    AS Comp
    FROM 
    @T t
    ORDER
    BY DATE
    DESC
    The adjustments: the selection of the most recent comparison (Top 1) and the use of the function LAG (instead of LEAD) to get the previous value of the column.

  • How to set the flexfield column in advanced table

    Dear All
    Dear Gaurav
    Good morning
    iis it posible to create a flexfield column in advanced table.I am trying it is showing some error......
    Thanks& Regards
    Sreekanth

    Hi,
    My doubt is compulsory we give the view instance for flex field,
    and also give the view instance for advanced table.
    when i created the flex field in advanced table,it didn't ask the view instance.
    the advanced table and flex field view instance are different
    at that how can i create the flex field in advanced table.

  • Creating a radio button group in a column of a table in Web Dynpro

    Hi,
    I want to put a radio button group in a column of a table in Webdynpro. I added a column to a web dynpro view and then inserted a tableCellEditor for that column.. But I cannot define it as Radio Button group. I want the user to be able to select 3 statuses using this group.
    Does anyone have a solution for this??
    Thanks in advance...
    Nakul

    Hi,
    You wont be able create three RB in one cell.
    Create as many column as the no of options is.Here it is 3.
    Create 4 attributes inside the node , option 1,option 2,option 3 and selectedoption.
    Map each RB s keytoSelect to option 1,2,3. Map all the RBs selectedKey atribute to selectedoption.
    Now selection for each row will be stored in the selected option.
    Regards
    Bharathwaj

  • Data Load - Data / Table Mapping Columns Not Showing

    Hi,
    Using the new 4.1 functionality I have created a data load wizard.
    Everything seems to have created OK however when i run the wizard and get to the Data / Table Mapping stage (2nd page) the column names lov contains no list of values.
    The table i am trying to load in is in another schema but all the grants are there so that schema can view it.
    Any idea what I need to do or what I have missed so the columns can be viewed.
    Thanks in advance.

    Hi,
    You have to log in as admin and there should be an option to add schemas, once adding it should appear in the lov.
    This link should help.
    Parsing Schema

  • When I upload a cvs file not all the column display in the Data / Table Mapping screen

    1. I have created application using Apex Data Loading wizard. There when I am trying to load data from .csv file, but not all the columns display in the "Data / Table Mapping" screen. But if I go through AQL --> Utility --> Data Workshop, there all column display in "Data / Table Mapping" page. I want to get same thing in application I created. How will get all columns display in the screen?
    2. Is there any way to select target table dynamically during runtime. So that in appication we can select different target tables with different source file to load data.

    Your user info says iPad. This is the OS X Numbers forum. Assuming you are using OS X… Be sure the file is named with a .csv suffix.
    (I don't have an iPad, so I don't know the iOS answer.)

  • I am unable to sort multiple columns in a table created in Pages.

    I had been using Appleworks up until I installed Lion and have now switched to iWork. I created a table within a Pages document and am able to sort a single column (using the Table Inspector and choosing Sort from  Edit Rows and Columns) but the Sort option is grayed out when I attempt to sort multiple columns.
    In another post, someone talked about this being a problem if you have merged fields. I do not believe I have done this (to be honest I don't know the function of merging fields).
    This is very frustrating as I was easily able to sort these tables in Appleworks.

    Sharon Anderson wrote:
    Thanks for your quick response! I have been trying that but then found that Numbers would only let me print in landscape view so I had to paste the table back into Pages. Is there a way to print in portrat view (from Numbers?)
    Not so. In the lower left corner of the window, there's an icon that looks like a piece of paper. If you see this:
    you are in Sheet View, or normal, mode. If you see this:
    You are in Print View mode. Now you see the icons for portrait and landscape modes. Click your choice. Then arrange your content to fit the pages as you wish.
    Jerry

  • Create "Object" Type based on columns of a table

    Hi Experts
    is it possible to create an Object Type based on columns of a table?
    for example the syntax for creation of type is
    CREATE OR REPLACE TYPE temp_t
    AS OBJECT (ID number, code number)
    can we create a type that is based on columns of an existing table? so that we donot have to write down all the column names in each type as i have to create types based on 100 and above tables :-s
    Please help me out here!
    Best Regards

    You cannot do that Zia, check below code:
    SQL> create or replace type temp_t as object(object_name all_objects.object_name%TYPE);
      2  /
    Warning: Type created with compilation errors.
    SQL> sho err
    Errors for TYPE TEMP_T:
    LINE/COL ERROR
    0/0      PL/SQL: Compilation unit analysis terminated
    1/35     PLS-00201: identifier 'ALL_OBJECTS.OBJECT_NAME' must be declared

  • Creating Time Dimension from date columns in fact tables.

    I remember watching a demo from a BI Tool a couple years ago, wich I swear was OBIEE, and the presentator stated it was possible to create a Time Dimension in the admin tool, based on a date column in other table.
    Can you guys tell me if there's such functionality in OBIEE?
    If so, how could I achieve that?!
    Thanks in advance!
    Marcos

    hi,
    You are trying to make Fact table as Dim table ???
    Fact table has some dim columns??
    We can do this by making a fact table as dim table ,create a dim hierarchy on that table
    Year level :Extract(year from fact_date_column)
    Month and year  level:CAST (Extract(month from fact_date_column) As CHAR(5) ) || CAST (Extract(yearfrom fact_date_column) As CHAR(5) )
    Like this
    But,be careful while doing this make sure that all joins and content levels are good
    As per my knowledge this is not a good way,Experts can add some words lets see!!!!!! :-)
    thanks,
    saichand.v

  • How to create unique key column in ROLAP fact table?

    Hi all,
    Is there a way to create a single column primary key (or unique index) on my ROLAP cube (and fact tables) in OWB? if so, what I should do in my mappings?
    Thanks!
    - Andrew

    Have you all conformed dimensions between the two facts?

  • How to create  hidden column in Oracle Table

    Hi folks
    i have one doubt regarding hidden column creation in Oracle Table..
    Let me briefly explain my requirements.
    I have one table called UWRMC_MAST is table contain the following columns
            RMC_N_ID           NUMBER(10)                    NOT NULL,
           COB_N_ID           NUMBER(2)                      NOT NULL,
           SUBCOB_N_ID     NUMBER(2),
           RMC_C_CODE      VARCHAR2(10 BYTE)         NOT NULL,
           RMC_C_NAME      VARCHAR2(100 BYTE)       NOT NULL,
           CREATED_N_BY   NUMBER(10)                     NOT NULL,
           CREATED_D_DT   DATE                              NOT NULL,
           MODIFIED_N_BY  NUMBER(10)                     NOT NULL,
           MODIFIED_D_DT  DATE                              NOT NULL,
           RECORD_N_STS   NUMBER(1)                      NOT NULL,
           RMC_C_REMARKS VARCHAR2(256 BYTE),
           EFFECT_D_DT     DATE                           NOT NULL
    RMC_N_ID is primary key
    i want to create one column like Old_EFFECT_D_DT as virtual column
    when ever i update the effective date that date should be insert into Old_EFFECT_D_DT i.e., Virtual Column
    For example
    SQL> select RMC_N_ID, COB_N_ID, SUBCOB_N_ID, RMC_C_CODE, EFFECT_D_DT from uwrmc_mast;
      RMC_N_ID   COB_N_ID SUBCOB_N_ID RMC_C_CODE EFFECT_D_
            46          1          74 PCTMOTR    02-FEB-11
    Below i update the effective date(01-feb-2011
    SQL> update uwrmc_mast
      2  set EFFECT_D_DT = '01-apr-2011'
      3  where rmc_n_id =46;
    1 row updated.
    But i want a result like below
    SQL> select RMC_N_ID, COB_N_ID, SUBCOB_N_ID, RMC_C_CODE, EFFECT_D_DT from uwrmc_mast;
      RMC_N_ID   COB_N_ID SUBCOB_N_ID RMC_C_CODE EFFECT_D_   OLD_EFFE
            46          1          74 PCTMOTR    01-APR-11   02-FEB-11Is this possible to do in oracle , kindly give a solution for my requirement
    Regards
    Arun

    Arun wrote:
    Hi Mr.David_Aldridge
    Am having the doubt that's why i posted my quires in oracle forums.. just i want to know whether my requirement suit for VIRTUAL COLUMN in Table.
    Regards,
    ArunWell, I'm not sure exactly what your requirement is.
    If you want to audit changes to the records of that table then it would be better to use Oracle's auditing facility. If this previous change date is really a required part of your actual application functionality then you might use the application itself to maintain the previous date as a column in the table, as you say, or if you need to maintain the history of changes then add a new table so you can keep track of multiple changes.

  • Cannot create a temporary column table in HANA SP8 console

    Hi All,
    We upgraded the HANA to SP8 version this week, and found there are some issues when creating a temporary table.
    Here is the sql:
    CREATE TYPE TT_CONF AS TABLE(ID INTEGER, NAME VARCHAR(32))
    CREATE LOCAL TEMPORARY COLUMN TABLE #CONF LIKE TT_CONF;
    And then got the error message like below:
    Could not execute 'CREATE LOCAL TEMPORARY COLUMN TABLE #CONF LIKE TT_CONF' in 220 ms 419 µs .
    SAP DBTech JDBC: [598]: failed to execute the external statement: InvalidHostNameException at Communication.cpp(01174):
      message: the hostname could not be resolved
      info:    host unknown
      param:  
    Is this a new constraints or just a bug? Does anybody have this issue?

    Hi, queena
    I also encounter the same problem in XS service. Now we import '/sap/hana/xs/libs/dbutils/procedures.xsjslib' into our project. But it will throw errors when one of the procedure's parameters is a temporary table.
    Then we debug it, then we find errors come from following statement : connection.prepareStatement('CREATE LOCAL TEMPORARY COLUMN TABLE "' + localschema + '"."' + localtemp + '" LIKE "' + schema_name + '"."' + table_name + '"').execute();
    So we try to delete COLUMN in the lib, then everything seems okay.

Maybe you are looking for

  • How to know last command used in solaris

    Dear Friends, We have a Solaris 8 server. Someone changed ownership of files. Is there any way to find out who logged in the server & changed ownership ? ? last command is not giving much information . Since /var/adm/lastlog is in binary format I am

  • Problem  to Multiply the Values and Stored in the Same Datatype Variable.

    HI, my Variables are : data : lv_per    TYPE konv-kwert,           lv_amt    TYPE KONV-KWERT,          lv_cost    TYPE KONV-KWERT.       LV_COST = 2073.00.       LV_AMT   = 6000.00.     I want to calculate as lv_per  = (LV_COST /  LV_AMT)  * 100.    

  • Iphone calendar entry comes up with red dot?

    I entered an entry on my iphone calendar that somehow had a red dot associated with it. As opposed to either blue or green, home or work, the standard calendars I have. Sync between my iphone entries and the mobilme 'cloud' has been working fine exce

  • How to close the called vi but keep caller vi remain open

    I have Main.vi that call and open subvi Calculator.vi.  I want to close Calculator.vi window and keep Main.vi open when exit button is pressed.  I've tried the EXIT function but this method also close Main.vi.  Is there another method that close call

  • Parameters from abap web dynpro to visual composer

    Hello , Can we pass output parameters from abap web dynpro to visual composer? <i><u>For Example:</u></i> ID NUMBER that we got in the application (Abap web...) and we want to pass it to import parameter of visual composer (start-point) I know about