Aggregate with a one-to-one relationship

Is there a way for mapping a one-to-one relationship between an aggregate and a regular descriptor according to the class the aggregate is aggregated to?
For example Class A contains Class B as an aggregate. Class B is associated to Class C in a one-to-one relationship. Class A' may also use the same aggregation.
How to specify the table reference so that it is respectively a Table C to Table A database relationship and a Table C to Table A' relationship.
I hope this is clear!?
Please advice,
Chris

If I understand you have a shared aggregate B from A and A' that has a 1-1 relationship to C.
To map this in the Mapping Workbench, first map A, A'. Then map the aggregate B, in mapping its 1-1 to C you should be able to choose any of the foreign keys references in A (or the first descriptor that mapped to the aggregate). You then go into the A and A' aggregate mappings and map the foreign key field in the aggregate to the foreign key field in the source descriptor's table.
If defining the mappings in code you can choose to map the aggregate to either table, or the commonly named fields. If the field names in the source descriptor's table differ, then you provide a field-name translation in the aggregate mapping.

Similar Messages

  • If Company has one to one relationship with Company code

    Dear All,
    If Company has one to one relationship with company code in the transaction system (ECC),
    can we use company in place off company code - in the BCS system?
    That is, in this case - under consolidation units
    - company,
    i will be using the ECC companies rather than ECC company codes as consolidation units.
    Request your insights.
    Cheers
    Kumar

    Actually, I almost always use the company, not the company code. The difference is in the different number of attributes, and the type CHAR 4 or 6. 0COMPANY is the standard infoobject for using in SEM-BCS.
    Though, I also used the custom infoobject for ConsUnit. Not a problem. Everything works. Just one needs to be careful with infoobjects which are the references to the Company IO.

  • Problem with cascade delete in CMP one-to-one relationship

    I am not able to cascade delete for one-to-one relationship. Even though relationship seems to be setup correctly, record from the second table is not deleted.
    Following is the structure of tables i am using:
    First Table(vcc_lrmc) -- LRMCBean
    lrmc_id pk (Bean field is id)
    lrmc_dtl_id (Bean field islrmcDtlId)
    Second Table (vcc_lrmc_dtl) -- LRMCDetailBean
    lrmc_dtl_id (pk) (Bean field islrmcDtlId)
    lrmc_id (Bean field id)
    One to one bidirectional relationship has been setup with CMR fields moreLRMC and mainLRMC.
    section of ejb-jar is as follows:
    <ejb-relation>
    <ejb-relation-name>LRMCMainToDetail</ejb-relation-name>
    <ejb-relationship-role>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>LRMC</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>moreLRMC</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <multiplicity>One</multiplicity>
    <cascade-delete/>
    <relationship-role-source>
    <ejb-name>LRMCDetail</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>mainLRMC</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    section of orion-ejb-jar is as follows:(Bidirectional mapping)
    <entity-deployment name="LRMC" data-source="jdbc/VCCDS" table="VCC_LRMC">
    <cmp-field-mapping name="moreLRMC">
    <entity-ref home="LRMCDetail">
    <cmp-field-mapping name="lrmcDtlId" persistence-name="LRMC_DTL_ID"/>
    </entity-ref>
    </cmp-field-mapping>
    </entity-deployment>
    <entity-deployment name="LRMCDetail" data-source="jdbc/VCCDS" table="VCC_LRMC_DTL">
    <cmp-field-mapping name="mainLRMC">
    <entity-ref home="LRMC">
    <cmp-field-mapping name="id" persistence-name="LRMC_ID"/>
    </entity-ref>
    </cmp-field-mapping>
    </entity-deployment>
    Is there anything else need to be setup for Cascade delete or is there anything wrong the way one-to-one relationship has been setup.
    Pls. advice.
    Thanks
    Dhiraj

    Is it happening because of this bug.
    Cannot create a 1:1 bi-directional CMR for entity beans when database tables are reverse engineered. (2447364)
    Anyone, any idea on this ?
    Cheers,
    Dhiraj

  • One to one relationship between records while entering in MDM data manager?

    Example Scenario::
         I have created <b>Employee details</b>(main table) and<b> Salary</b> (look up flat table for employee number filed in main table) .  Tried to get the corresponding employee's gross salary from <b>salary</b> table to <b>employee Details</b> table basing on <b>Employee number</b> field in Employee Details table as <b>Gross salary</b> and <b>Employee number</b> are common fields for both the tables. But i could not get one to one relationship in this case , Please explain how to achieve?

    Employee Details (Main Table)
                   EmpNo(Look up field)      EmpNa     GrossSal(Look up field)
    Salary Details  (Look Flat Table)
         Empno         Basic Sal        GrossSal   
          012              5000             10000
                     013              4000               8000
    I have created two tables with the above fields. In main table i kept two look up fields to Salary Details table. First i have entered data to salary table as above , now when i am trying to enter data in to main table EmpNo as 012 it should show Gross salary as 10000 automatically as per the corresponding EmpNo. Instead it is showing all the Grosssal values of Salary table.

  • One to one relationship modelling

    Hi all
    How to model a one to one relationship?
    i have a scenario where i had to maintain 2 different entities and cannot merge them into a single table coz they are separate entities
    Now while modelling them ... do we need to have a primary key for the second table (or)
    use the primary key of the first table as the foreign key on the second table with Unique constraint on it .
    Ex: a single subscription has a single criteria
    subscription table ........... and criteria table
    now should i iuse criteria id as a primary key of criteria table ? (or)
    subscription id as the foregin key in the criteria table ?
    or allow include both in the criteria table
    please suggest
    Thanks and Regards
    Raj

    hi dportas,
    first of all thanks for your respose...
    what is reciprocal foreign key?
    my scenario is like this
    i have a table called subscriptions which records all subscriptions that we have subscribed to to receive an alert to our email primary key is subscriptionid.
    every alert has an alert criteria with different set of attributes
    hence i have 5 alert criteria tables... each with totlally different type of attributes
    eg: balance criteria (balanceamount,condition) cutoff criteria(cutofftime,....)
    we can subscribe to only one alert in a single subscription
    hence subscription to balance criteria table is 1-1
    subscription to cutoff criteria table is 1-1
    now my question is that shoudl each of the criteria table should have criteriaid (or) should i put subscription id as the foregih key in each of the tables for relationship

  • How to generate lookup if there is one-to-one relationship?

    Hi,
    I am an new Jheadstart user and i am using Oracle Developer 10g with Jheadstart.
    There are two tables in my database with a one-to-one relationship between them.
    My database concept is that I need to have one table as a lookup of the other one. Jheadstart does not generate it that way because the relationship is not one-to-many, so I am not geting nor choice, nor lov.
    Could this possibly be solved?

    You probably get better answers in the JHeadstart forum.

  • Counting (interneal timebase)events with only one counter

    Hello,
    i am using a PXI-6115 card. This card is external clocked with 8 MHz. But I want to measure only about every second. So I divided the external clock with the internal counter 0. This works fine.
    Now my problem. Now I want to know the external clock rate. Is it possible to build a pulse period measurement with only one counter??
    I thinking of counting internal timebase- pulses with counter 1 and to start and stop the counter 1 by the output of counter 0.
    Is this possible and how??
    Thanks for help, Ruediger

    Yes, there's a way to measure pulse periods with a single counter. The trick is to perform a buffered period measurement and sum the periods. The size of the buffer will determine the quantization/roundoff error.
    The source of this error is that you have no control over the initial phase relationship of your external clock and your internal timebase. There's a nominal ratio between the two frequencies, and you'd start by expecting ratio * (buffer size) total cycles counted.
    However, your actual count must be an integer, so you'll get either the next-highest or next-lowest integer, but you can't predict or control which one.
    Example: If you collect 1 period at 8 MHz using the internal 20 MHz timebase, you'll capture either 2 or 3 e
    dges from your timebase, implying a measured frequency of either 10 MHz or 6.6667 MHz.
    If you collect 1001 periods, you'll capture a total of 2502 or 2503 timebase edges, implying a measured frequency of either 8.0016 MHz or 7.9984 MHz.
    Notes:
    1. In many cases, you can set up for buffered event counting, using the internal 20 MHz clock as a source and your external 8 MHz as a gate.
    The advantage is that the buffered values already represent cumulative time so you don't need to sum them.
    A disadvantage would be that the internal 24-bit counter value will roll-over in less than 1 second at 20 MHz. I typically capture periods and then sum in software because I can convert to floating point between capture and sum if necessary to produce both high-resolution and long duration measurements.
    2. You should typically ignore the very first value in the buffer and work only with the others. If you want to capture 1001 legitimate periods, size the buffer for at least 1002
    -Kevin P.

  • Many-to-one relationships

    I'm trying to implement a many-to-one relationship similar to the one, for example, between an OrderLineItem and a Product.
    I managed to create the beans and define the relationship using deploytool.
    What I'm trying to understand is how can I prevent a Product instance from being deleted when it is involved in the relationship described above?
    Currently, under Sun's reference implementation server, I am allowed to delete a Product even if there are OrderLineItems that reference it.
    There is one line printed out in the window running j2ee -verbose:
    com.sun.ejb.containers.EntityContainer$EJBTxKey
    The record in the Product table is deleted nonetheless.
    Another weird thing is that the server does not allow me to deploy two beans involved in a many-to-one relationships with the Product bean if they are using the same CMR field name. What I get is a compilation error at the deployment time.
    I'd appreciate any input.

    They way I handle this is to hide the creation/manipulation/deletion of the bean behind a manager - for example a singleton session bean. I NEVER allow the direct creation/deletion of entity beans except through manager classes. This is quite a common J2EE pattern, whose name escapes me at the moment.
    Your manager would have a method like delete(int productId), which would delete the matching Product entity bean, and would then search the OrderLineItem beans for the matching Product primary key.

  • SQL query to retrieve families with only one generation from a family db

    Hi,
    I need to write an SQL query that would select families with only one generation ((which means a person - or a married couple - with kids) or (a person - or a married couple - with parents but no kids)) from a database containing families. The simplified db structure is:
    person:
    id - int, primary key
    siblings:
    id
    parent_id
    kid_id
    marriage
    id:
    husband_id
    wife_id
    Could anyone please help me? I dont really have any idea how to accomplish that...

    Hi,
    Welcome to the forum!
    Assuming that siblings (despite its name) contains only parent-child relationships, and that the parent_id could be either the mother or the father:
    WITH     got_tree     AS
         SELECT     CONNECT_BY_ROOT  s.parent_id     AS root_id
         ,     LEVEL                     AS lvl
         FROM          siblings     s
         LEFT OUTER JOIN     marriage     m     ON     s.parent_id     IN ( m.husband_id
                                                            , m.wife_id
         START WITH     parent_id     NOT IN     (  SELECT  kid_id
                                               FROM        siblings
         CONNECT BY     s.parent_id     IN ( PRIOR m.husband_id
                                , PRIOR m.wife_id
                                , PRIOR kid_id
    SELECT       root_id
    FROM       got_tree
    GROUP BY  root_id
    HAVING       MAX (lvl)     <= 2
    ;This will get a list of parents who may or may not have children, but who do not have either parents or grandchildren.
    To get their spouses and children (if any) you will have to join this result set to all the other tables. At that point, you can eliminate poeple who do not have ancestors themselves, but are married to people who have more than one generation of ancestors.
    The details of how to do that depend on the details of your tables. If you'd like help, then post a little sample data (CREATE TABLE and INSERT statements for all tables) and the results you want from that data.
    Edited by: Frank Kulash on Oct 14, 2009 4:05 PM
    I'd need sample data in order to test this, of course.

  • Many to one relationships strange behavior

    I have a problem with two many to one relationships.
    The problem appears from the dirty mechanism of cmr/cmp fields.
    When I have two “many-to-one” relationships ex:
    A n..1 B
    A n..1 C
    Navigability: B -> A
              A <-> C
    When I put in ejb-jar.xml the B to A relation first, the bugs appear. The dirty mechanism work chaotic. The problem is in the generated code for the PersistenceManager and Wrapper of the A bean.
    In the Wrapper the only fields with dirty mecansim are the real fields from bean which are navigable. In the PersistenceManager class are the same fields like in the BeanWrapper plus the fake fields for relationship. But the fake fields are intercalated with real fields and the dirty flag values are not the same with the dirty flags from BeanWrapper. Result: chaotic updates.
    Solution(workaround – not elegant): put first the relation which has navigability from A to C and second A to B.

    They way I handle this is to hide the creation/manipulation/deletion of the bean behind a manager - for example a singleton session bean. I NEVER allow the direct creation/deletion of entity beans except through manager classes. This is quite a common J2EE pattern, whose name escapes me at the moment.
    Your manager would have a method like delete(int productId), which would delete the matching Product entity bean, and would then search the OrderLineItem beans for the matching Product primary key.

  • IPhone3 - can I sync onto multiple PCs running iTunes ? or is this a one-one relationship ?

    Can I sync onto multiple PCs running iTunes ? or is this a one-one relationship ?
    My situation - use home computer for music etc., boat computer for weather file downloads,officecomputer for email / pictures ...
    Thank you

    There is an App called Weathertrack, which pulls from the web GRIB files (weather information), that I would like to download onto the laptop we have on the boat, that runs some routing software (SeaTrack), that in turn integrates weather, tide, GPS etc to help with vessel navigation.
    I can obviously do this from my home computer (this is the one that has the 1-1 sync relationship), but I don't want to empty the IPhone content whilst on the boat ...
    If you can think of a way of making this happen, I would be very appreciative. Both PCs are windows based, home is Vista, boat is XP.
    Kind regards

  • You can download past purchases on this computer with just one Apple ID every 90 days

    I have a mac which my fiancee and I share. There are 2 separate accounts and 2 separate apple ids used to buy different music (i.e. we have 2 separate iphones and music collections).
    I received the following error (see uploaded image) which states that, "you can download past purchases on this computer with just one Apple ID every 90 days".
    Now, when I sync my iTunes and iPhone only some music that I have previously purchases is affected. For some reason they failed to sync with my iPhone and become unavailable in my iTunes ("file cannot be found"). When I deleted the record I saw that it became available for download in iTunes and then discovered this issue.
    I have legally purchased the music and just want to be able to sync the files legitimately. It just seems very restrictive to say that you have to have 2 different machines for every account (i.e. you cannot have multiple users on a device with their own accounts which each have their own Apple IDs).
    Mikhail

    Hi
    No - that is the issue - both my husband and I use the same computer and want to be able to use our individual Apple IDs so can access our download content e.g. I-books that we have purchased through our other MAC devices such as I-Pad.  In the past, we had four people using one computer with no problem regarding Apple ID.   In the newer operating system, we are now restricted to one at a time - it means one of us is blocked out from accessing our content for a period of 90 days.   Have you any suggestions on how we can both use our individual Apple IDs with the same lap-top?  We have set up discrete accounts so we log on to the computer individually.  Many thanks for any help.

  • HT204053 I want to play newly purchased music but cant, i get the message "You can use iTunes Match on this computer with just one Apple ID every 90 days. (mobileme family pack is the problem i think)

    I purchase a new album on my phone but then cannot download it to my laptop -  I get the message:
    "You can use iTunes Match on this computer with just one Apple ID every 90 days. All I can think is that the problem stems from purchasing a mobileme family & some of the music being my daughters. (she is 9 & I need to be ble to listen to more than Katy Perry & Justin Bieber) Please help! :-(

    Welcome to the Apple Community.
    Youll get that message when you change the iTunes account you are logged into, you can't keep changing it.

  • This happens with only one bookmark. It takes me to a login page, as it should, I log in -- and it doesn't log me in to the admin page, it takes me to the website. This is the website I work on, so now I can't work on it from my laptop.

    All of my bookmark and log in functions have worked in previous Firefox versions. But after this last one, the log in function fails with this one bookmark. It takes me to the log in/administrator page, as it should, I log in -- I can see the admin address flash by as it works, but Firefox winds up taking me to the website itself, not the admin dashboard. So ... when I need to work, I have to switch to Safari for just this one site.

    See:
    * http://kb.mozillazine.org/Location_Bar_search
    You can change the pref <b>keyword.URL</b> on the about:config page to a Google Lucky search.
    http://kb.mozillazine.org/Keyword%2eURL
    http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=

  • I have a Mac OSX version 10.75 with just one Thunderbolt port. and it has been my Thunderbolt port to connect with Blackmagic wear my intensity. and I no longer can use the port for mini-DVI adapter to connect with me. I do not want to ask any other way f

    i have a Mac OSX version 10.75 with just one Thunderbolt port. and it has been my Thunderbolt port to connect with Blackmagic wear my intensity. and I no longer can use the port for mini-DVI adapter to connect with me. I do not want to ask any other way for me to use to use my monitor. I monitor LG FLATRON E2041 brand .. PLEASE Helpp ME

    i have a Mac OSX version 10.75 with just one Thunderbolt port. and it has been my Thunderbolt port to connect with Blackmagic wear my intensity. and I no longer can use the port for mini-DVI adapter to connect with me. I do not want to ask any other way for me to use to use my monitor. I monitor LG FLATRON E2041 brand .. PLEASE Helpp ME

Maybe you are looking for

  • All open windows close when another one is opened

    Running OSX10.6.7 Recently the window behavior has changed, now when a different active app is selected, all the windows from other active apps become hidden if one holds the Option key when selecting a new app or a hidden window in an open one, the

  • Currently experiencing technical difficulties - Please try again later

    I have been for 5 days now. Every other post about this is unresolved. How do we get Apple to help on this?

  • Deleting Duplicate Photos in LR5

    How do I delete duplicate photos?  I have hundreds of duplicates in the catelog, folders and collections.  I must have imported them without checking "Do not import suspected duplicates".  Now what?  Thanks.

  • Business Objects in Vista

    Hi everyone! I am trying to make my first steps in Business Objects and i am trying to install Business Objects Data Integrator with Windows Vista. I recieve the error message that this product use Windows NT 4.0 or higher. I saw a message saying tha

  • Invisible objects only allowed in dynamic forms?

    I have read several times "To hide and show objects at runtime, you must save your form as a dynamic PDF". Yet one of the examples on the LiveCycle Developer Center website demonstrating invisibilty appears to be saved as a static PDF: http://partner