JDO Mapping to same object as parent/child 1:n relationship

Hello,
i'm trying to do a mapping the following way:
Node (1:n) Node where the Node should have the following
accessors:
getChildNodes()   : Set
getParentalNode() : Node
I do have the getChildNodes mapping working, but cannot get the parental relation established due to problems with the Node.map file containing the following:
      <relationship-field name="parentalNode" multiplicity="one">
          <foreign-key name="NODE_TO_PARENTALNODE"
               foreign-key-table="TPB_NODE"
               primary-key-table="TPB_NODE">
            <column-pair foreign-key-column="ID"
                         primary-key-column="PARENT_ID"/>
          </foreign-key>
      </relationship-field>
Using this the checker complains about
javax.jdo.JDOFatalUserException: Error in mapping model of class Node: Relationship of field parentalNode: Primary key column PARENT_ID of relationship's foreign key and target class's com.vw.tpb.node.model.Node primary key columns do not match.
Well. When i do a 1:n relation to myself how should i create two primary keys then ?
Anybody some ideas on this one ?
regards, Udo

Hi Udo,
for the reference from child to parent, the column "ID" should be the primary key colum, whereas the column "PARENT_ID" should be the foreign key column.
Best regards,
Adrian

Similar Messages

  • Integration Object - Setting parent/child (Foreign Key) relationship

    Hi all -
    I have what I think is a very basic question but I cannot seem to get it right. I am using Siebel EAI Adapter with two IO where the source is a template and the second is the instances of the template. The structure is parent/children for both. I am also using a data map to transform the data. My assumtion is that I can insert a template record and all of its children with one message/insert command. My question is how do I set the FK value on the children to the parent id? The parent id is not known at the time of data mapping because the record has not yet been created.
    I would think that the link between the two objects would handle this but I cannot get it to work. Any help is appreciated!
    Siebel 8.1 using Siebel EAI Adapter in WF with data map.
    Kind Regards,
    Chad

    One Siebel Adapter Upsert operation should be sufficient to insert the parent and child. In the Integration object definition, you define the Template child instances with the Parent of Template. i.e
    You define Template first as an Integration Component and then define
    Template child instances to have a Parent as Template.
    Thanks
    Swarna

  • How to create Parent Child relationship of Assets

    Hi All
    can any one provide the solution for the below mention requirment.
    Problem Description: How to create Parent Child relationship of Assets in below case.
    1. If asset Category of Child assets are different but both parent & child assets are already capitalized.
    2. If asset Category of Child assets are same but both parent & child assets are already capitalized.
    3. If asset Category of Child assets are same for new assets.

    Hi All
    can any one provide the solution for the below mention requirment.
    Problem Description: How to create Parent Child relationship of Assets in below case.
    1. If asset Category of Child assets are different but both parent & child assets are already capitalized.
    2. If asset Category of Child assets are same but both parent & child assets are already capitalized.
    3. If asset Category of Child assets are same for new assets.

  • Problem with saving Parent - Child  View Objects in ADF 11g.

    Hi Every one,
    I have a requirment, something like I will be displaying some data on my jsff screen based on one Transient View Object. Whenever user clicks on Save button, I have to do following steps in my AMImpl.
    -> Preapre dynamically Parent View Object Rows based on some logic
    -> Prepare dynamically Child View object Rows and invoke insertRow method on respective child view object.
    When I say commit() First Parent ViewObject data need to be saved and then Child View object data has to be saved. I am having Parent - Child Key relation ship btw these two ViewObjects. Some how I am populating the Parent Primary key in the Child View Object. Please suggest me If there is any other alternative to this.
    Thanks

    I got the solution, Enabling the check box option for Master - Detail Entity association (CompositionAssociation -> Cascade Update Key Attributes) resolved the issue.
    Thanks

  • How to add an item object as a child for a specified parent node in AdvancedDataGrid in Flex?

    Hi all,
              This is the code, to add a object as a child into a specified parent node in AdvancedDataGrid in flex.
    <?xml version="1.0" encoding="utf-8"?><mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="onCreationComplete()" width="100%" height="100%">
    <mx:Script><![CDATA[
    importmx.controls.Alert; 
    importmx.collections.IHierarchicalCollectionViewCursor; 
    importmx.collections.IHierarchicalCollectionView;  
    importmx.collections.ArrayCollection; [
    Bindable]private var objectAC:ArrayCollection = newArrayCollection(); 
    //This method is used to construct the ArrayCollection 'flatData' 
    private function onCreationComplete():void{
    var objOne:Object = newObject(); objOne.name =
    "Rani"; objOne.city =
    "Chennai";objectAC.addItem(objOne);
    var objTwo:Object = newObject(); objTwo.name =
    "Rani"objTwo.city =
    "Bangalore";objectAC.addItem(objTwo);
    var objThree:Object = newObject(); objThree.name =
    "Raja"; objThree.city =
    "Mumbai";objectAC.addItem(objThree);
    //This method is used to add one object as a child item for the parent node 'Rani' 
    private function addChildItem():void{
    var dp:IHierarchicalCollectionView = groupedADG.dataProvider asIHierarchicalCollectionView;  
    varcurent:IHierarchicalCollectionViewCursor = groupedADG.dataProvider.createCursor();  
    var dummyParentNode:Object = {name:"Rani", city:"New Delhi"};  
    var obj:Object = null; 
    while(curent.current){
    // To get the current node objectobj = curent.current;
    // Add Child item, when depth = 1 and Node name should be "Rani" 
    if (curent.currentDepth == 1 && obj["GroupLabel"] == "Rani"){
    dp.addChild(curent.current, dummyParentNode);
    curent.moveNext();
    groupedADG.dataProvider = dp;
    groupedADG.validateNow();
    groupedADG.dataProvider.refresh();
    ]]>
    </mx:Script> 
    <mx:AdvancedDataGrid id="groupedADG" x="10" y="15" designViewDataType="tree" defaultLeafIcon="{null}" sortExpertMode="true" width="305" > 
    <mx:dataProvider> 
    <mx:GroupingCollection id="gc" source="{objectAC}"> 
    <mx:grouping> 
    <mx:Grouping> 
    <mx:GroupingField name="name"/> 
    </mx:Grouping> 
    </mx:grouping> 
    </mx:GroupingCollection> 
    </mx:dataProvider> 
    <mx:columns> 
    <mx:AdvancedDataGridColumn headerText="Name" dataField="name"/> 
    <mx:AdvancedDataGridColumn headerText="City" dataField="city"/> 
    </mx:columns> 
    </mx:AdvancedDataGrid> 
    <mx:Button x="10" y="179" label="Open the folder 'Rani'. Then Click this Button" width="305" click="addChildItem()" /> 
    </mx:Application> 

    Hi,
    It's not possible to 'append' a StringItem or a TextField (or any other lcdui.Item object) to a Canvas or GameCanvas. You can only draw lines, draw images, draw text, etc etc, on a Canvas screen. So, you can only 'simulate' the look and feel of a TextField (on a Canvas) by painting it and adding source code for command handling (like key presses). However, this will be quite some work!!
    lcdui.Item objects can only be 'appended' to a Form-like Displayable.
    Cheers for now,
    Jasper

  • Parent - Child mapping - ODI

    Hi experts,
    I have source as a below format, in .xls, this is parent- child relationship..
    Gen1     Gen2     Gen3     Gen4
    9000000009 blank     blank     blank
    blank     910000000 blank     blank
    blank     blank     9110000000     blank
    blank     blank     9120000009     blank
    blank     blank     blank     9121100009
    And trying the data into Oracle table with the below format.
    Gen1     Gen2     Gen3     Gen4
    9000000009               
    9000000009     9100000009          
    9000000009     9100000009     9110000000     
    9000000009     9100000009     9120000009     
    9000000009     9100000009     9120000009     9121100009
    Please help me what is the workaround I can follow to achieve using ODI.
    regards,
    Preet
    Edited by: 914626 on Mar 4, 2012 10:13 PM
    Edited by: 914626 on Mar 4, 2012 10:14 PM
    Edited by: 914626 on Mar 4, 2012 10:15 PM
    Edited by: 914626 on Mar 4, 2012 10:15 PM
    Edited by: 914626 on Mar 4, 2012 10:17 PM

    Thanks for the thoroughness. There was a mistake in moving the code over for the forum. The field names are correct throughout the original source code.
    BASE_OBJECT_ID is used throughout.
    I suspect the problem lies in the one-to-many sampleItem(s) relationship that is based upon the subclassed item class. (The relationship is actually "sampleItems" in the real code and somehow got changed in the move over.)
    The problem may lie in the mapping of the attribute override in the child class to the referencing of the item class from the parent side of the relationship in the Sample class.
    I further suspect this may be specific to Eclipselink based upon other postings I've seen on the web that have similar problems...
    Any thoughts?
    Edited by: Chris-R on Mar 3, 2010 9:56 AM

  • How to access objects in the Child Form from Parent form.

    I have a requirement in which I have to first open a Child Form from a Parent Form. Then I want to access objects in the Child Form from Parent form. For example, I want to insert a record into a block present in Child Form by executing statements from a trigger present in Parent Form.
    I cannot use object groups since I cannot write code into Child Form to first create object groups into Child Form.
    I have tried to achieved it using the following (working of my testcase) :
    1) Created two new Forms TESTFORM1.fmb (parent) and TESTFORM2.fmb (child).
    2) Created a block named BLK1 manually in TESTFORM1.
    3) Created two items in BLK1:
    1.PJC1 which is a text item.
    2.OPEN which is a push button.
    4) Created a new block using data block wizard for a table EMPLOYEE_S1. Created items corresponding to all columns present in EMPLOYEE_S1 table.
    5) In WHEN-NEW-FORM-INSTANCE trigger of TESTFORM1 set the first navigation block to BLK1. In BLK1 first navigable item is PJC1.
    6) In WHEN-NEW-ITEM-INSTANCE of PJC1, code has been written to automatically execute the WHEN-BUTTON-PRESSED trigger for the "Open" button.
    7) In WHEN-BUTTON-PRESSED trigger of OPEN item, TESTFORM2 is opened using the following statement :
    open_form(‘TESTFORM2',no_activate,no_session,SHARE_LIBRARY_DATA);
    Since its NO_ACTIVATE, the code flows without giving handle to TESTFORM2.
    8) After invoking OPEN_FORM, a GO_FORM(‘TESTFORM2’) is now called to set the focus to TESTFORM2
    PROBLEM AT HAND
    ===============
    After Step 8, I notice that it passes the focus to TESTFORM2, and statements after go_form (in Parent Form trigger) doesnot executes.
    I need go_form with no_activate, similar to open_form.
    Edited by: harishgupt on Oct 12, 2008 11:32 PM

    isn't it easier to find a solution without a second form? If you have a second window, then you can navigate and code whatever you want.
    If you must use a second form, then you can handle this with WHEN-WINDOW-ACTIVATED and meta-data, which you have to store in global variables... ( I can give you hints if the one-form-solution is no option for you )

  • Parent/child records from same table

    I want to create a query that is a union such that the 2nd resultset is based on the 1st resultset. I have a table that has parent/child records in the same table.
    Table: EVENTS
    EVENT_ID
    PARENT_EVENT_ID
    CREATED_DATE
    (other columns)
    if PARENT_EVENT_ID is null then it is a parent record, else it is a child record. I want to select all parent records then union them with all the associated child records...something like this:
    select * from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null -- All parents
    union
    select * from EVENTS where PARENT_EVENT_ID in (select EVENT_ID from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null) -- include any children of parents selected from above
    This works but it's kind of ugly, I want to avoid using the sub-select in the 2nd because it is a repeat of the 1st statement, is there a way to alias the first statement and just refer to it in the 2nd query?

    Hi,
    kev374 wrote:
    Thanks, one question...
    I did a test and it seems the child rows have to also satisfy the parent row's where clause, take this example:
    EVENT_ID|PARENT_EVENT_ID|CREATED_DATE
    2438 | (null) | April 9 2013
    2439 | 2438 | April 11 2013
    2440 | 2438 | April 11 2013
    select * from EVENTS where CREATED_DATE < sysdate - 9
    start with EVENT_ID = 2438
    connect by PARENT_EVENT_ID = prior EVENT_IDSo you've changed the condition about only wanting roots and their children, and now you want descendants at all levels.
    This pulls in record #2438 (per the sysdate - 9 condition) but 2439 and 2440 are not connected. Is there a way to supress the where clause evaluation for the child records? I just want to pull ALL child records associated with the parent and only want to do the date check on the parent.Since the roots (the only rows you want to exclude) have LEVEL=1, you can get the results you requested like this:
    WHERE   created_date  < SYSDATE - 9
    OR      LEVEL         > 1However, since you're not ruling out the grandchildren and great-grandchildren any more, why wouldn't you just say:
    SELECT  *
    FROM    events
    WHERE   created_date     < SYSDATE - 9
    OR      parent_event_id  IS NOT NULL;?
    CONNECT BY is slow. Don't use it if you don't need it.
    If you x-reference my original query:
    select * from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null -- All parents
    union
    select * from EVENTS where PARENT_EVENT_ID in (select EVENT_ID from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null) -- include any children of parents selected from above
    The 2nd select does not apply the created_date < sysdate - 90 on the children but rather pulls in all related children :)Sorry; my mistake. That's what happens when you don't post sample data, and desired results; people can't test their solutions and find mistakes like that.

  • Informatica parent child mapping

      down votefavorite I have a scenario where suppose saycountry      province      city      zip
    ind           ts           hyd       xyz
    ind          maha          mum       abc
    Desired output:id   name         parent-id
    1    india         1
    2    telengana     1
    3    hyderabad     2
    4    xyz           3
    5    mumbai        1
    6    abc           5
    I have to do it with informatica mapping any ideas how do I show this parent child relationship. I am not able to get the logic for thisThanksKumar

    Thanks for the thoroughness. There was a mistake in moving the code over for the forum. The field names are correct throughout the original source code.
    BASE_OBJECT_ID is used throughout.
    I suspect the problem lies in the one-to-many sampleItem(s) relationship that is based upon the subclassed item class. (The relationship is actually "sampleItems" in the real code and somehow got changed in the move over.)
    The problem may lie in the mapping of the attribute override in the child class to the referencing of the item class from the parent side of the relationship in the Sample class.
    I further suspect this may be specific to Eclipselink based upon other postings I've seen on the web that have similar problems...
    Any thoughts?
    Edited by: Chris-R on Mar 3, 2010 9:56 AM

  • JPA One-To-Many Parent-Child Mapping Problem

    I am trying to map an existing legacy Oracle schema that involves a base class table and two subclass tables that are related by a one-to-many relationship which is of a parent-child nature.
    The following exception is generated. Can anybody provide a suggestion to fix the problem?
    Exception [EclipseLink-45] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: Missing mapping for field [BASE_OBJECT.SAMPLE_ID].
    Descriptor: RelationalDescriptor(domain.example.entity.Sample --> [DatabaseTable(BASE_OBJECT), DatabaseTable(SAMPLE)])
    The schema is as follows:
    CREATE TABLE BASE_OBJECT(
    "BASE_OBJECT_ID" INTEGER PRIMARY KEY NOT NULL,
    "NAME" VARCHAR2(128) NOT NULL,
    "DESCRIPTION" CLOB NOT NULL,
    "BASE_OBJECT_KIND" NUMBER(5,0) NOT NULL );
    CREATE TABLE SAMPLE(
    "SAMPLE_ID" INTEGER PRIMARY KEY NOT NULL,
    "SAMPLE_TEXT" VARCHAR2(128) NOT NULL )
    CREATE TABLE SAMPLE_ITEM(
    "SAMPLE_ITEM_ID" INTEGER PRIMARY KEY NOT NULL,
    "SAMPLE_ID" INTEGER NOT NULL,
    "QUANTITY" INTEGER NOT NULL )
    The entities are related as follows:
    SAMPLE.SAMPLE_ID -> BASE_OBJECT.BASE_OBJECT_ID - The PKs that are used to join the sample to the base class
    SAMPLE_ITEM.SAMPLE_ITEM_ID -> BASE_OBJECT.BASE_OBJECT_ID - The PKs that are used to join the sample item to the base class
    SAMPLE_ITEM.SAMPLE_ID -> SAMPLE.SAMPLE_ID - The FK that is used to join the sample item to the sample class as a child of the parent.
    SAMPLE is one to many SAMPLE_ITEM
    The entity classes are as follows:
    @Entity
    @Table( name = "BASE_OBJECT" )
    @Inheritance( strategy = InheritanceType.JOINED )
    @DiscriminatorColumn( name = "BASE_KIND", discriminatorType = DiscriminatorType.INTEGER )
    @DiscriminatorValue( "1" )
    public class BaseObject
    extends SoaEntity
    @Id
    @GeneratedValue( strategy = GenerationType.SEQUENCE, generator = "BaseObjectIdSeqGen" )
    @SequenceGenerator( name = "BaseObjectIdSeqGen", sequenceName = "BASE_OBJECT_PK_SEQ", allocationSize = 1 )
    @Column( name = "BASE_ID" )
    private long baseObjectId = 0;
    @Entity
    @Table( name = "SAMPLE" )
    @PrimaryKeyJoinColumn( name = "SAMPLE_ID" )
    @AttributeOverride(name="baseObjectId", column=@Column(name="SAMPLE_ID"))
    @DiscriminatorValue( "2" )
    public class Sample
    extends BaseObject
    @OneToMany( cascade = CascadeType.ALL )
    @JoinColumn(name="SAMPLE_ID",referencedColumnName="SAMPLE_ID")
    private List<SampleItem> sampleItem = new LinkedList<SampleItem>();
    @Entity
    @Table( name = "SAMPLE_ITEM" )
    @PrimaryKeyJoinColumn( name = "SAMPLE_ITEM_ID" )
    @AttributeOverride(name="baseObjectId", column=@Column(name="SAMPLE_ITEM_ID"))
    @DiscriminatorValue( "3" )
    public class SampleItem
    extends BaseObject
    @Basic( optional = false )
    @Column( name = "SAMPLE_ID" )
    private long sampleId = 0;
    Edited by: Chris-R on Mar 2, 2010 4:45 PM

    Thanks for the thoroughness. There was a mistake in moving the code over for the forum. The field names are correct throughout the original source code.
    BASE_OBJECT_ID is used throughout.
    I suspect the problem lies in the one-to-many sampleItem(s) relationship that is based upon the subclassed item class. (The relationship is actually "sampleItems" in the real code and somehow got changed in the move over.)
    The problem may lie in the mapping of the attribute override in the child class to the referencing of the item class from the parent side of the relationship in the Sample class.
    I further suspect this may be specific to Eclipselink based upon other postings I've seen on the web that have similar problems...
    Any thoughts?
    Edited by: Chris-R on Mar 3, 2010 9:56 AM

  • MDX: Selecting specific dimension member and its descendants from parent child dimension where dimension member names can be same in dimension hierarchy

    I'm creating a SSRS report using SSAS cube as a source.
    When creating a dataset for the report, I'm having trouble with MDX to select a specific dimension member and its descendants from parent child dimension where dimension member names can be same in dimension hierarchy.
    Lets say for example that I have an account dimension where,
    In level 02 I have company ID:s 101, 102, 103 and so on...
    In level 03 I have Balance sheet
    In level 04 I have some account groups, Assets, Liabilities and so on... and In level 05 I have individual accounts
    How can I select for example company 102:s Assets from level 04 and its descendants?
    Normally in adventure works I would do this if I've wanted Current Assets and its descendants:
    SELECT NON EMPTY { [Measures].[Amount] } ON COLUMNS, NON EMPTY
    { (DESCENDANTS([Account].[Accounts].[Account Level 03].[Current Assets]) ) } ON ROWS
    FROM [Adventure Works]
    But in my Account dimension at level 04 I have Assets member as many times as I have companies in level 02.
    Tuomo

    Hi Tuomo Helminen,
    To this requirement of yours, I would recommend you use Cascading Parameters in Reporting services, you can refer to this FAQ How do I create cascading parameters when using cube database in Reporting Services at this link
    http://blogs.msdn.com/b/sqlforum/archive/2011/04/11/forum-faq-how-do-i-create-cascading-parameters-when-using-cube-database-in-reporting-services.aspx 
    Thanks,
    Challen Fu
    TechNet
    Subscriber Supportinforum
    If you have any feedback on our support, please [email protected]
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Cascading parent/child inserts while avoiding uniqueness constraints

    Assume that I have two classes that I'd like to persist: MyObject and
    InternalObject. MyObject has an InternalObject field. That is, MyObject is
    the parent, InternalObject is the child in this one-to-one relationship.
    Steps involved:
    1) Enable ForeignKeyConstraints property in kodo.properties. That is add
    the line,
    kodo.jdbc.ForeignKeyConstraints=true
    2) In package.jdo, add the following kodo extensions for MyObject's
    InternalObject field mapping, i.e., io in my case.
    <field name="io" default-fetch-group="false">
    <extension vendor-name="kodo" key="jdbc-delete-action"
    value="cascade"/>
    <extension vendor-name="kodo" key="dependent" value="true"/>
    </field>
    The reasons that we have done these steps: we'd like kodo to properly
    re-order the sql statements if necessary in order not to violate
    parent/child dependencies during insertion, and also force cascading
    deletes in case we delete the parent object.
    Now comes the bulk of the algorithm.
    String sKey // key of the object to insert
    String sValue //value of the object to insert
    MyObject o = new MyObject(sKey, sValue);
    InternalObject io = new InternalObject(sKey,sValue); //using same values :)
    o.setInternalObject(io); //parent-child relation
    Object id = ((PersistenceCapable) o).jdoNewObjectIdInstance();
    ((PersistenceCapable)o).jdoCopyKeyFieldsToObjectId(id);
    kpm.currentTransaction().begin();
    try {
    Object trio = kpm.getObjectById(id, true);
    kpm.deletePersistent(trio);
    kpm.flush(); //apply deletes on the datastore
    } catch (ObjectNotFoundException oe) {
    System.out.println("First time!");
    kpm.makePersistent(o);
    kpm.currentTransaction().commit();

    If this is a question, the extension you have is only a directive to
    mappingtool to create cascade foreign keys. However, at runtime Kodo
    will rely upon the foreign key definitions in the schema. You should
    verify that the foreign key exists as you like in the schema. If you
    want to have child relationships to be deleted, you should use the
    dependent and element-dependent extensions.
    Ahmet Bulut wrote:
    Assume that I have two classes that I'd like to persist: MyObject and
    InternalObject. MyObject has an InternalObject field. That is, MyObject is
    the parent, InternalObject is the child in this one-to-one relationship.
    Steps involved:
    1) Enable ForeignKeyConstraints property in kodo.properties. That is add
    the line,
    kodo.jdbc.ForeignKeyConstraints=true
    2) In package.jdo, add the following kodo extensions for MyObject's
    InternalObject field mapping, i.e., io in my case.
    <field name="io" default-fetch-group="false">
    <extension vendor-name="kodo" key="jdbc-delete-action"
    value="cascade"/>
    <extension vendor-name="kodo" key="dependent" value="true"/>
    </field>
    The reasons that we have done these steps: we'd like kodo to properly
    re-order the sql statements if necessary in order not to violate
    parent/child dependencies during insertion, and also force cascading
    deletes in case we delete the parent object.
    Now comes the bulk of the algorithm.
    String sKey // key of the object to insert
    String sValue //value of the object to insert
    MyObject o = new MyObject(sKey, sValue);
    InternalObject io = new InternalObject(sKey,sValue); //using same values :)
    o.setInternalObject(io); //parent-child relation
    Object id = ((PersistenceCapable) o).jdoNewObjectIdInstance();
    ((PersistenceCapable)o).jdoCopyKeyFieldsToObjectId(id);
    kpm.currentTransaction().begin();
    try {
    Object trio = kpm.getObjectById(id, true);
    kpm.deletePersistent(trio);
    kpm.flush(); //apply deletes on the datastore
    } catch (ObjectNotFoundException oe) {
    System.out.println("First time!");
    kpm.makePersistent(o);
    kpm.currentTransaction().commit();
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Parent Child relation in one transaction throws error... (

    In nutshell, I have a parent->child relation ship in DB and due to the UI requirement, I created view link as Child->parent, it is giving a hack a lot of problems.... (it sounds silly but looks like I am loosing my mind over this)
    Let me explain my situation,
    - I have a table A with col-a and col-b. I have another table B with col-a (primary key) and col-c. (This way table A is a parent table)
    - ON UI side i created relationship like table B is parent and Table A is child using col-a
    - I need to create parent-child (one record for each) record programatically.........
    I tried following thing:
    - from backing bean, as soon as i create Table-B row first, i get error saying too many objects with same key (which is understandable because of table design..... and associaion must be throwing that error)
    - from EOImpl file, it doesn't even find the child record being created... so during commit I can't send the foreign key value from Table-a to Table-b
    Any suggestion is greatly appreciated?
    Thank you,
    -Raj

    that depends on how you implement the multiple selection of orders.. you have to pass the selectedValues to the backend or store the values in a map or list and pass it..

  • Mapping dependencies between objects

    I'm querying a database to obtain information from 10 tables. The goal is to display the information on a JSF based portlet using a tree-view, where an user can use the tree interface to drill to desired level of detailed information. The interface may need to show 3/4 different tree-views of the same data set.
    To begin with, I'm doing a join across those tables and load a hash (representing the first hierarchy in the tree) with multiple levels to represent the tree-view or the dependency between various parameters. If there are 3 views required, I'm thinking about building 3 such hashes - where the elements in the hash will probabaly be derived from a TreeNode class to build the gui. Since all the views refer to the same underlying data model, each node of the Hash will actually refer to some object that stores the model data.
    I have two questions:
    * Currently I'm building the hash by parsing the ResultSet obtained from query; Is there a better way to do this? I thought about using O/R mappers; but I couldn't think of an elegant solution to load the collections from a query to represent the dependencies dictated by the view.
    * Is there a better way to design the query?
    I would really appreciate any comments.

    Thanks for the suggestions. I have a generic class for building a tree-view - and that uses recursion. However, that doesn't need to know about the parent-child relationship. I was thinking of parsing the db query result and store the parent child relationship in a nested hash. My generic Tree class implementation would know to take this nested hash and build the tree. Essentially an instantiation of the generic class or it's extended version would act as a backing bean for a JSF component.
    Anyway, I'll try to focus more on a Hibernate based approach as you guys hinted. I'll wait for Dave's feedback. Actually, I have his book on the portlet API.

  • OBIEE 11g - Navigation in Parent Child Hiearchy not working

    Hi All,
    I have a employee parent child hierarchy and I want to show revenue for each employee in the report. I have modeled my revenue as a measure like case 4 shown in the following link
    http://www.rittmanmead.com/2010/11/oracle-bi-ee-11g-parent-child-hierarchies-multiple-modeling-methods/
    So for example this is my report ,
    --David (30)
    ---Sandra (15)
    -----Joe (10)
    Joe'e revenue is 10, Sandra's is 5 (showing her 5 Joe's revenue) and David's is 5 (showing his 5 Sandra's revenue)
    Issue :
    Now what I want is to provide action link on the revenue column so that when user would click on revenue for any employee it would direct them to a detail report showing the bifurcation.
    For ex, I want that when user click on 15 which is Sandra's revenue, he would be redirected to a detailed report for Sandra and similary for Joe and David
    MY ISSUE IS that the navigation is NOT working for sandra and Joe. It is only working for David (who is the ancestor of sandra and Joe). When I click on 15 to see sandra's detail report, it doesn't do anything and in the bottom left corner of the browser status bar below I see an ERROR saying
    (same for Joe but David work's fine)
    Message: 'getLevelInfo(...)' is null or not an object
    Line: 1
    Char: 11142
    Code: 0
    URI: http://localhost:7001/analytics/res/b_mozilla/answers/selectionsmodel.js
    Why is that happening? Is that because I have modeled the revenue as an measure and not attribute. Is navigation not possible in this case?
    Anybody has any solution or workaround for this, it will be highly appreciated.
    Thanks,
    Ronny

    Ok, so let me explain this in detail and give the structure of my tables and the data,
    There are three tables.
    1.Parent Child relationship table - pctable
    2.Closure table which OBIEE creates through a script - reltable
    3.Fact table which contains the revenue - facttable
    This is the data
    pctable
    personid | managerid
    David | NULL
    Sandra| David
    Joe|Sandra
    reltable
    memberkey | ancestorkey |distance |is_leaf
    David|NULL|NULL|0
    David|David|0|0
    Sandra|Sandra|0|0
    Joe|Joe|0|0
    Sandra|David|1|0
    Joe|Sandra|1|1
    Joe|David|2|1
    facttable
    personid|revenue
    David|5
    Sandra|5
    Joe|10
    and my joins conditions are, I join pctable to reltable and then reltable is joined to facttable like this.
    pctable.personid = reltable.ancestorkey
    reltable.memberkey = facttable.personid
    and then in the report, when I pull up the pchierarchy build from pctable and revenue , I get as below and like I said, when I click on Sandra to see the revenue she contributes, I am not able to navigate. Can you let me know what modifications needs to be done?
    ---David(20)
    ----Sandra(15)
    ------Joe(10)

Maybe you are looking for

  • Error while running the page from Jdeveloper

    Hello All, I am running the pages from my Jdeveloper but it is throwing some exception which is related to cache on the local server.Kindly help me out as i am not able to run even old pages which were running earlier.Kindly what changes on the serve

  • HP Laserjet PRO M177fw - scan to PC

    Dear HP, Since today we are the "happy" owner of the Laserjet PRO 177fw. We had before the HP 6600 but, unfortunately it didn't work anymore after 1 year and 8 weeks. (so no warranty) Since we are now the owner of the 177FW, I would really appreciate

  • The "Year" on my calendar is off, how can I fix it?

    On my calendar it shows the year as "2557 BE." For example, on a monthly page, the top would be - "January 2557 BE." When setting events, the years I have is 2557 BE, 2558 BE, 2559 BE, and so on. I played with the "Time Zone Support" in settings for

  • Alerts for Queues

    Hi All: I tried a lot to search a blog or forum(but have not get any relevant link) from that I can come to know that we can throw an Alert when queue get stuck in Adapter Engine and ABAP stack. If any one has some information in his/her mind then pl

  • Using both aperture and iphoto

    is there a way to use both aperture and iphoto without duplicating all the pictures? can I just point aperture to the iphoto folder with my pictures? i would like to use both, but don't want to have to duplicate all of my pictures, my hard drive can'