Commit both parts of a "references" association together

I'm running JDev 11.1.2.3.0.
I have an Entity Association between TABLE_A and TABLE_B Entities in a 0..1 -> * references relationship. I will either be creating just a record in TABLE_B or records in both TABLE_B and TABLE_B.
When creating records in both Entities I want both records to form an atomic transaction; either commit both or rollback. The problem is that if I try to commit both at the same time, the child record won't insert because the parent PK has changed from the temporary negative number. If I set the Association to be a Composite Association, committing both records together works, but I am then unable to commit a single record in TABLE_B on it's own.
What is the recommended solution for this situation?
Many thanks

The referencing field in the "child" table isn't mandatory. This is why I really want to use a references association, I just couldn't get it working so I tried the composition association.
The relationship is TABLE_A 0..1 -> * TABLE_B. The two are independent; I'm either going to insert into both tables or just TABLE_B.
What I'm trying to do is the equivalent of:
INSERT INTO TABLE_A()
VALUES()
RETURNING ID INTO TABLE_A_ID_VAR;
INSERT INTO TABLE_B(TABLE_A_ID)
VALUES(TABLE_A_ID_VAR);
COMMIT;
or just
INSERT INTO TABLE_B()
VALUES;
COMMIT;
I don't understand how one does the two table insert with TABLE_B referencing TABLE_A in ADF. If I try to do that with just a "references" association, I see TABLE_B FK is initially populated with the temporary negative ID of TABLE_A, but isn't updated on COMMIT with the actual ID.

Similar Messages

  • Reset both parts of the Properties Panel

    How do you reset both parts of the Properties Panel in Dreamweaver CS5?
    I can see only the upper part, even if I click on two table cells to merge them together, for example.
    Thanks

    Thanks for your answer. Unfortunately, the tiny triangle is not visible.

  • HT204380 How can I make a face time call from one country to another( supporsing both parties using iphone 4s). What will be the caller charges. If there is no charges as we use wifi, will there be a charge till connecting the call?

    How can I make a Face Time call from one country to another( supporsing both parties using iphone 4s). What will be the caller charges. If there is no charges as we use wifi, will there be a charge till connecting the call?

    FaceTime is free to use. You will not be charged for using FaceTime.

  • I cannot get photos placed in InDesign CS5 to show up only as grayscale/black. When a separation is done, part of the photos show up on both parts of the color separation. I've been hunting for a solution for hours.

    I cannot get photos placed in InDesign CS5 to show up only as grayscale/black. When a separation is done, part of the photos show up on both parts of the color separation. I've been hunting for a solution for hours. !

    ALSO, on the iPod under Settings>General>iTunes Sync, you may need to back out of the "iTunes Wi-fi Sync," and reopen it to get it to update.
    (I use iTunes 11.1.5.5)

  • When I play a video in mirroring mode,I can see only the video  in the tv thru apple tv ,not in my ipad 2 how  can i fix it? to see in both parts.

    when I play a video in mirroring mode,I can see only the video  in the tv thru apple tv ,not in my ipad 2 how  can i fix it? to see in both parts.

    Have you tried resetting the iPad:
    Reset iPad:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.

  • Obtaining comma-separated list of text values associated with bitwise flag column

    In the table msdb.dbo.sysjobsteps, there is a [flags] column, which is a bit array with the following possible values:
    0: Overwrite output file
    2: Append to output file
    4: Write Transact-SQL job step output to step history
    8: Write log to table (overwrite existing history)
    16: Write log to table (append to existing history)
    32: Include step output in history
    64: Create a Windows event to use as a signal for the Cmd jobstep to abort
    I want to display a comma-separated list of the text values for a row. For example, if [flags] = 12, I want to display 'Write Transact-SQL job step output to step history, Write log to table (overwrite existing history)'.
    What is the most efficient way to accomplish this?

    Here is a query that gives the pattern:
    DECLARE @val int = 43
    ;WITH numbers AS (
       SELECT power(2, n) AS exp2 FROM (VALUES(0), (1), (2), (3), (4), (5), (6)) AS n(n)
    ), list(list) AS (
       SELECT
         (SELECT CASE WHEN exp2 = 1  THEN 'First flag'
                      WHEN exp2 = 2  THEN 'Flag 2'
                      WHEN exp2 = 4  THEN 'Third flag'
                      WHEN exp2 = 8  THEN 'IV Flag'
                      WHEN exp2 = 16 THEN 'Flag #5'
                      WHEN exp2 = 32 THEN 'Another flag'
                      WHEN exp2 = 64 THEN 'My lucky flag'
                 END + ', '
          FROM   numbers
          WHERE  exp2 & @val = exp2
          ORDER BY exp2
          FOR XML PATH(''), TYPE).value('.', 'nvarchar(MAX)')
    SELECT substring(list, 1, len(list) - 1)
    FROM   list
    Here I'm creating the numbers on the fly, but it is better to have a table of numbers in your database. It can be used in many places, see here for a short discussion:
    http://www.sommarskog.se/arrays-in-sql-2005.html#numbersasconcept
    (Only read down to the next header.)
    For FOR XML PATH thing is the somewhat obscure way we create concatenated lists. There is not really any using trying to explain how it works; it just works. The one thing to keep in mind is that it adds an extra comma at the end and the final query strips
    it off.
    This query does not handle that 0 has a special meaning - that is left as an exercise to the reader.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Wpa_passphrase trouble (both parts SOLVED)

    wpa_passphrase won't generate a key if the ESSID has a space in the name.
    For example:
    wpa_passphrase Namewith Aspace "secretpassphrase" > /etc/wpa_supplicant.conf
    It outputs into the file:
    Passphrase must be 8..63 characters
    I don't have access to change the router's name.
    Do I need to insert a special character between the two words or do something else instead?
    Last edited by market (2010-09-02 21:46:08)

    Thanks, that worked and will be useful in other terminal problems I've had.
    But now I have a new problem when I try to connect.
    After I added the settings required for WPA2, I used the following command:
    iwconfig wlan0
    The ESSID was there but the Access Point was not associated.
    And when I tried connecting with:
    dhcpcd wlan0
    My results are:
    dhcpcd: wlan0: waiting for carrier
    dhcpcd: wlan0: carrier acquired
    dhcpcd: wlan0: carrier lost
    dhcpcd: wlan0: waiting for carrier
    dhcpcd: wlan0: carrier acquired
    dhcpcd: wlan0: carrier lost
    It repeats until it times out.
    I've been able to connect to the router when there used to be no encryption on my earlier installs so I think my /etc/wpa_supplicant.conf settings are wrong.
    network={
    ssid="thessid"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP
    #psk="thepassword"
    psk=generatedkey
    I also tried waiting for the association to happen before using the dhcpcd command but it never does.
    Last edited by market (2010-09-02 19:48:01)

  • S/MIME Encryption: Need Same CA for Both Parties?

    Hello,
    I created a root certificate authority (CA) using Keychain.app which I then used to issue a certificate to give to a friend. She can send me emails signed with the certificate; yet I, who have a certificate from a different CA (Thawte), cannot encrypt emails between her and me. Why? Must we both have certificates issued from the same CA to send encrypted emails to each other?
    Thank you

    I'm having the same issue. Some emails come in fine while others prompt me with an "unable to decrypt" despite having the valid certificates in my keychain.app.
    Also, I no longer see the cert/encrypt button when composing a new email.
    Thoughts? Suggestions?
    Thank you.
    Message was edited by: Matthew Kemph

  • Is it possible to install both Window 7 and Windows XP together in OX S Lion Boot Camp?

    Hello! I would like to install both Windows 7 and Windlows XP in Macbook Pro with Mac OS X Lion. Is this possible using Boot Camp? If not can you suggest other softwares that will make it possible?
    Thanks in advance.

    Yes, you can do it. First  you instal win XP, and after this, you can install Win 7  Win 7 support double  boot. Another variant is-manually create two partition for 2 OS. Without any Bootcamp.

  • A Campocatino-Foto has high Gamma:Parts too bright,parts too dark.The parts are irregularly separated.How can I manage? I tried to use "Lasso" to mark both parts,but I couldn't change Gamma separately!???

    As written above:
    I want to make a foto in some areas brighter,in some areas darker,so that the structure is better to be seen.
    I made the whole foto brighter, thenI "caught" the brighter part with Lasso-function to make it darker.But this didn't work!!

    If you have a RAW version of the photo, you can adjust the shadow and highlight contrast in Adobe Camera Raw.  Later versions of PS also allows you to open jpgs and other file formats in ACR, so you can use these adjustments. 

  • Is FaceTime free for both parties communicating between the U.S. and Europe?

    I would like to communicate with a friend in Europe using Facetime, but I am hesitant for fear of incurring fees for either myself or my friend. My friend is staying at a hotel that has wi-fi. I have an iMac and my friend in Europe has an iPad.

    Thx mende1,that was well quick..reds Bobsau

  • Possible to use both PowerPC and Intel-based systems together with Qmaster?

    Hello,
    New to the Qmaster setup, I was wondering if it was possible to set up a Qmaster cluster mixing PowerPC and Intel-based systems. If it is possible, what version of Qmaster would support this type of cluster?

    While it can work, note that if there is huge difference is processing speed, the PPC machine can actually slow down the process as everything waits for it to finish it's instance and copy it back.
    It's worth a try but keep an eye on how the various computers perform.
    Have fun.
    x

  • Update and insert happening at the same...how to commit both

    Hi All,
    I have a procedure which will update a Table A...
    When one User click on apply button from other application, Insert will happen in TABLE A, and at the same time it executes the procedure mentioned above.
    After the Procedure execution, no update is happening on the TABLE A.(NO ERRORE recorded)
    If I try to update the TABEL A separately it is getting updated.
    Any suggsetions??
    Thanks All....

    964118 wrote:
    Hi All,
    I have a procedure which will update a Table A...
    When one User click on apply button from other application, Insert will happen in TABLE A, and at the same time it executes the procedure mentioned above.
    After the Procedure execution, no update is happening on the TABLE A.(NO ERRORE recorded)
    If I try to update the TABEL A separately it is getting updated.
    Any suggsetions??
    Thanks All....How do I ask a question on the forums?
    SQL and PL/SQL FAQ
    I extend my condolences to you since you rarely get answers to your questions here.
    Handle:     964118
    Status Level:     Newbie
    Registered:     Oct 9, 2012
    Total Posts:     13
    Total Questions:     7 (7 unresolved)

  • Cross Dissolve transition does not work after cutting the tails of both ends.

    I used to apply the Cross Dissolve video transition a while ago and never had any problems. My Cross Dissolve is not working for whatever reason. I usually split parts of the movie using the razor tool and cut the tail of both parts I just split, than apply the Cross Dissolve, but it does not work at all. I dont know if I am doing something wrong here, I need your help if you can help me with that. I have also tried to apply Film Dissolve but I have the same problem.
    Thank you very much!!
    Renata

    I am trying to put together a recruiting video. I was out recording a bunch of people talking about the organization, when I am working with something like this I usually try to shorten the 3 or 5 minute clip I have from one person and just connect the parts of the clip that need to be on the screen, that requires several cuts during the clip and merge the good parts together using the cross dissolve. It is very simple and I have done several times, but for whatever reason during certain parts of the clip when applied will not work. The clips are usually 1 to 3 minutes long and I need to extract the good parts making no more than 1 minute for each peson talking.
    Thanks!
    Renata

  • Why did I ever bother coming back to BT ??? Thinki...

    I decided to come back to BT from TalkTalk after experiencing poor service, no service, no support and overbilling from them. After much research and advice from relatives decided to return to BT as they at least appeared to be making an effort to improve since we were last with them......What a mistake I appear to have made! I will try to explain this giving the best timeline possible.
    Sunday 4th September - Order placed, line rental saver paid upfront, Estimated Activation date of 20th September given....so far so good, the timescale seems reasonable. I am self employed so I made sure that I was free for the 20th and no jobs accepted from clients. I was also told that I would be advised of any change to scheduled appointment.
    I should explain at this stage that the other occupant of the premises is my 85 year old mother who is hard of hearing and requires my being there for any type of engineer visit............and I cannot afford to lose money by not working !!
    Thursday 15th September - received an email advising that the modem had been despatched in readiness for the 20th September. Logged on to bt.com/trackmyorder to get the reference number for tracking purposes. On double checking the order I noticed that the Engineers visit/activation date had now changed to 23rd September without warning, no email, text or call to me as was promised by sales when ordered and paid for. A call to customer services from my mobile kept me in a queue to India for 45 minutes before being answered....explained the situation and advised them that the 23rd was no good to me as I was away on business....we'll check they said and will call you back but the 23rd now seems to be the fixed date for the Engineer visit. Guess what ? yes of course there was no call back.
    Friday 16th September - No call back or email from the customer services call centre in India all day. As I was told that the new date was 23rd September, I accepted a job from a client for the 20th September whilst desperately trying to change my business appointments on the 23rd in order to free myself up for the new date which I managed to do. Phoned customer services....India again, another 30 minutes in a queue on a mobile, to express my dissatisfaction and seek reassurance that the 23rd was now the fixed date. Was assured it was and that they would email confirmation to me.  
    Saturday 17th September - woke up to a text on my mobile from BT confirming the engineers visit for.....wait for it....... the 20th September !!!!! Phone calls to India again expressing my total annoyance and dissatisfaction at what had been done...was advised if the 23rd was not convenient they could cancel and rearrange for the next available appointment which would be the 12th October !!!! I advised the person I was dealing with that I was not prepared to wait that long for connection especially as I had paid up front for line rental and pointed out that as the customer the engineers visit should surely be agreeable and convenient to both parties.....a concept they seemed not grasp......they then asked what would be convenient to me, so I suggested the 22nd as I have the whole day free as I am working from home on that day......was told that was impossible could I give them a date in October.
    I then advised them that I was not be prepared to wait until October and if they could not offer me a date next week other than the 20th or 23rd I would be cancelling the order totally............then came the most ridiculous and totally unexpected  statement from the CS operator....."would you like me to cancel the order for you now sir " on that note I asked to be transferred to a sales operator in the UK...............
    This they duly did and was transferred to Chris who assured me he was in Lancaster (or Leicester ??).....after explaining the whole story and timeline to him he assured me he would speak to the engineers and see if the date of 22nd September could be arranged and he would email me confirmation of our conversation. I again reiterated that an October date would not be acceptable and if a mutual date could not be agreed then I would be cancelling the order.
    Guess what............................yes of course....no email !!! 
    Despite all the assurances that BT give on customer service and actual product I ask myself these questions..............Are BT still as bad as they were 10 years ago? Is offering to cancel the order for me true customer service ???
    I await the outcome of this with bated breath, but in the meantime will investigate the alternatives to BT and TalkTalk............ 
    Solved!
    Go to Solution.

    Hi SJB,
    I checked our queue but I can't see an email from you, did you send him a PM?
    He's not available today so if you sent a PM please resend your details via our "Contact us" form, which is found under the "About me" in our profile page, top-left of the page.
    Thanks,
    Stephanie
    Stephanie
    BTCare Community Manager
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post. If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

Maybe you are looking for