Existing Object Won't Update

I have a Toplink/JSF application, and am having trouble modifying objects that are already stored in the database.
Here's a scenario:
1) Objects are read with a session.readAllObjects call. A JSF data table displays those objects.
2) The user selects one of the objects in the data table. Upon pressing a "Choose" button, the chosen object is placed into a field called "chosenInstance" on a "backing_home" bean. This bean has session scope.
3) The user can then navigate to various JSF pages. Each page displays the object and some of its related objects.
4) The user can update data on a page. The JSF page binds af:inputText fields to the object stored in the backing_home bean like this: #{backing_home.chosenInstance.description}
5) The user then presses the Save button. The action references the backing_home bean field, which has been now updated by the JSP, and ultimately issues the following method:
public Object persist(Object entity) {
UnitOfWork uow = getSessionFactory().acquireUnitOfWork();
Object existingObject = uow.readObject(entity);
Object returnInstance = null;
if (existingObject != null) {
uow.deepMergeClone(entity);
returnInstance = existingObject;
} else {
returnInstance = uow.deepMergeClone(entity);
uow.commit();
return returnInstance;
Unfortunately, this method never updates objects. As soon as the "uow.readObject(entity)" line exectues, the existingObject and the entity object are the same object.... so the uow.commit() line never executes any sql to the database... since it thinks no data has changed.
In a simple test case for the above persist method, the method works ok. Is there something about my steps 1-5 that could be messing up my ability to persist object changes?

Sounds like your application is modifying the objects retrieved from the session in step 1. Users should never directly modify these as they are from the shared session cache. When you eventually acquire a UnitOfWork and merge, it uses the objects in the shared cache to build a clone for comparison purposes, which is why it doesn't find any changes.
Step 1 either needs to read from a UnitOfWork (and so operate on working copies), or clone the results returned from the session.
Best Regards,
Chris

Similar Messages

  • Since updating my iPhone 4S, existing apps won't update and cannot update new apps even after deleting apps to make room. What can I do?

       Whenever I try to download a new app, I receive an error message that the app can't be downloaded at this time, try again later. Also, existing apps won't update. I have tried deleting apps to make more room, but so far nothing has helped.

    Does it also ask you to contact itunes support?

  • Playsists selected for syncing no longer exist? ipod won't update

    My new ipod won't update because it says that playlists I've selected for syncing no longer exist. For this reason I can't get any of my music onto my ipod and I don't understand what I am supposed to do to fix this
    dell inspiron   Windows XP  

    Hi guys, I've been having the same problem. Specifically, when I try to transfer songs from iTunes to my iPod I get the following error message: "Songs in the iPod "My iPod" cannot be updated because all the playlists selected for syncing no longer exist". I did some searching around at this site, and found that one possible problem is that my library is larger than my iPod's capacity, so I have to eliminate some songs. I did this, but I still get the same error message.

  • Update existing object with parsers

    Hi,
    I'seen on the Developer guide of IFS that :
    "Parsers cannot be used to update existing objects" (page 76 of the pdf file)
    I've also seen on the same document that :
    "The aplication can use postOperation() to access the repository object that was created or updated by the parser" (page 91 of the pdf file)
    I'm sorry, I don't understand if updating objects in the repository is possible or not with parsers.
    does anyone know ?

    Hi,
    You have to remember that you are writing SQL building blocks, not code...
    Also when you use @select(), yes that will only pull the contents of the Select box of that object.
    To get the contents of the Where box, you need @Where().
    These are separate because typically you are either building a select part (normal objects) OR a where part (filters).
    So think out of the box and decide how you would write it in a sql statement if you did not have a universe,
    then break it in pieces that make sense.
    I'm not 100% sure of what it is you are trying to achieve, but you can do something like:
    case @where(object2) when TRUE then @select(object2) end
    Off course writing this in one go is just as valid, you don't have to reuse, only with big chunks or @prompt() stuff it makes sense to prevent typo's
    Hope this helps,
    Marianne

  • IPod won't update

    I recently tried to update my iPod and I get a message saying that some of the playlists needed for updating no longer exist and it won't update. It also cleared my entire library on my iPod as well.
    I'm not sure how to fix this because the only playlist i have is the recently added one.

    You need to check your music settings in itunes when the ipod is connected to the computer.
    Connect the ipod to the computer
    click on music at the top of the summary page when itunes recognizes the ipod.
    see if the ipod is set to update only to a particular playlist and if that playlist still exist in itunes.

  • I deleted my "iPod Slection" playlist and now my iPod won't update.

    I don't know exactly how it happened but the songs on my original "iPod Selection" playlist got messed up and so iTunes automatically created another "iPod Selection Playlist" and I didn't want the songs it put in that playlist on my iPod so I deleted it. But now my iPod won't update because it says "your iPod cannot be updated because all the playlists selected for updating no longer exist." If anyone could help me I would greatly appreciate it. Thanks!

    Seems like you've got auto sync with your iPod and it is looking for a specifically named playlist.
    Check your preferences.
    Create a new playlist and sync that.
    Regards,
    Colin R.

  • HT4623 My old school iPod touch won't update.  Does apple mess it's customers over by not allowing updates for older models of the touch?  My last update is Ios5.  My touch says its up to date.  So has my old school touch reached its pinnacle?

    My old school iPod touch won't update.  Does apple mess it's customers over by not allowing updates for older models of the touch?  My last update is Ios5.  My touch says its up to date.  So has my old school touch reached its pinnacle?

    Correct. The 3G iPod does not have the hardware to support an iOS version higher than 5.1.1
    To more easily find compatible apps:
    iOSSearch - search the iTunes store for compatible apps.
    Apple Club - filter apps by iOS version.
    Starting when iOS 7 was releases, Apple now allows downloading the last compatible version of some apps (iOS 4.2.1 and later only)
    App Store: Downloading Older Versions of Apps on iOS - Apple Club
    App Store: Install the latest compatible version of an app
    You first have to download the non-compatible version on your computer. Then when you try to purchase the version on your iPod you will be offered a compatible version if one exists.

  • My iPhone 5 won't update/install apps !! Any idea why ?

    I own an iPhone 5, an iPhone 4s and an iPad 2.
    They are all not jailbroken and are all running on ios 6.0.1
    While my iPhone 4s and iPad 2 have no problem updating existing apps or installing new apps, my iPhone 5 won't update/install apps all !!
    To be fair, about 2 week ago, all my iPhone 5 update/install won't work but after a day or two, they started downloading.
    But now, my iPhone 5 updates and installations have been stalled for a week.
    What is happening ? Can anybody please help ? Thanks.

    Okay fixed it:
    First of all make a backup and sync your iPhone in iTunes.
    Next reinstall your iPhone using DFU mode:
    (FIND HOW 2 GET IN DFU MODE ON GOOGLE, APPLE DO NOT ALLOW TO PUT IN LINKS HERE :-( )
    Then choose to put your latest backup back on your iPhone.
    And voila you should see you now can recieve updates from App Store.
    (It worked for me)

  • Doubt about Scan and Update Catalog Objects That Require Updates link

    Hi,
    I have a doubt about 'Scan and Update Catalog Objects That Require Updates' link in Administration,
    how can I know how many objects that required upgrading before I click this link???
    in doc.
    http://docs.oracle.com/cd/E28280_01/bi.1111/e10541/prescatadmin.htm#BIESG3750
    section 17.2.4 Updating Catalog Objects
    It is said 'You can confirm the need to update by viewing the metrics in Fusion Middleware Control. In the Catalog folder, find a metric called "Reads Needing Upgrade" with description "The number of objects read that required upgrading." '
    but I don't find it . my OBIEE version :11.1.1.6.2
    conld you pleae help me ??
    thank you in advance.

    That link should be there in 6 version.
    I've verified in 11g6 version doc the same is existing
    ref: http://docs.oracle.com/cd/E23943_01/bi.1111/e10541/prescatadmin.htm#BAJDDFFI
    BTW:
    http://docs.oracle.com/cd/E28280_01/bi.1111/e10541/prescatadmin.htm#BIESG3750is 11g7 version
    Thanks,
    http://cool-bi.com

  • ITunes won't update, unistall or re-install.

    iTunes won't update or unistall. When I try, it says the installer source doesn't exist. When I tried to just reinstall it fresh, it says the old versions of Bonjour, iTunes and Quicktime can't be removed. Any solution for any of this?

    Unfortunately, this sort of trouble has gotten more complicated to deal with ever since Microsoft pulled the Windows Installer CleanUp utility from their Download Center on June 25. First we have to find a copy of the utility.
    Let's try Googling. (Best not to use Bing, I think.) Look for a working download site for at least version 3.0 of the Windows Installer CleanUp utility. (The results from mydigitallife and Major Geeksare worth checking.)
    After downloading the utility installer file (msicuu2.exe), scan the file for malware, just in case. (I use the free version of Malwarebytes AntiMalware to do single-file scans for that.)
    If the file is clean, to install the utility, doubleclick the msicuu2.exe file you've downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select anyiTunes, QuickTime and Bonjour entries and click "Remove".
    Restart the PC, and try another iTunes install. Does it go through properly this time?

  • QuickTime won't update.

    Quicktime won't update from 7.2 to 7.4. I keep getting this error message.  "Error getting file security: C:\ProgramData\AppleComputer\Installer Cache\QuickTime 7.72.80.56\GetLastError: 5".Could someone tell me what this means and what I can do to update Quicktime.. Thanks!

    so i tried to download the windows installer update from the link you gave me but now i'm getting a different error and it won't let me download the installer. The error reads:
    Windows Script Host
    Script: C:\DOCUME~1\Owner\LOCALS~1\Temp\IXP000.TMP\StartMsl.vbs
    Line: 1
    Char: 1
    Error: ActiveX component can't create object: 'Scripting.FileSystemObject"
    Code: 800A01AD
    Source: Microsoft VBScript runtime error
    I have no idea what this means or how to fix it. Please help!

  • ORA-00955: name is already used by an existing object

    Hi,
    I got blow error while upgrading 12.1.1 to 12.1.3, please suggest me how to move forward...
    This will be grate help for me....
    sqlplus -s MTH/***** @/d01/VIS/apps/apps_st/appl/mth/12.0.0/patch/115/sql/mth_pre_upgrade.sql
    Connected.
    DECLARE
    ERROR at line 1:
    ORA-00955: name is already used by an existing object
    ORA-06512: at line 59
    Regard
    suresh

    Hi,
    blow is the sql query....
    /* $Header: mth_pre_upgrade.sql 120.0.12010000.15 2010/06/11 08:45:13 sdonthu noship $ */
    REM dbdrv: sql ~PROD ~PATH ~FILE none none none sqlplus_owner &phase=con \
    REM dbdrv: checkfile:~PROD:~PATH:~FILE
    REM
    REM UPDATE SCRIPT FOR MOC
    REM
    REM DESCRIPTION: Upgrade script for MOC.
    REM
    REM History:
    REM
    REM Yong Feng 11/3/08 Rename non-partitioned staging tables to be
    REM to be removed later on
    REM
    SET VERIFY OFF;
    WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
    WHENEVER OSERROR EXIT FAILURE ROLLBACK;
    DECLARE
    CURSOR c_non_p_stg_tables IS
    SELECT table_name
    FROM USER_TABLES
    WHERE partitioned = 'NO' AND
    TABLE_NAME in
    ('MTH_DAY_STG','MTH_DIM_HIERARCHY_STG','MTH_DIM_LEVEL_LOOKUP_STG',
    'MTH_EQUIPMENTS_STG','MTH_EQUIP_HIERARCHY_STG','MTH_EQUIP_OUTPUT_STG',
    'MTH_EQUIP_PROD_PERFORMANCE_STG','MTH_EQUIP_PROD_SCHEDULE_STG',
    'MTH_EQUIP_STANDARD_RATES_STG','MTH_EQUIP_STATUSES_STG','MTH_ITEMS_STG',
    'MTH_ITEM_CATEGORIES_STG','MTH_ITEM_COST_STG','MTH_ITEM_HIERARCHY_STG',
    'MTH_MTL_CONSUMED_TXN_LOT_STG','MTH_MTL_PRODUCED_TXN_LOT_STG',
    'MTH_PERIOD_STG','MTH_PERSONNEL_STG','MTH_PRODUCTION_SCHEDULES_STG',
    'MTH_PRODUCTION_SEGMENTS_STG','MTH_PROD_MTL_CONSUMED_STG',
    'MTH_PROD_MTL_CONSUMED_TXN_STG','MTH_PROD_MTL_PRODUCED_STG',
    'MTH_PROD_MTL_PRODUCED_TXN_STG','MTH_PROD_SEGMENTS_TXN_STG',
    'MTH_PROD_SUB_SEGMENTS_STG','MTH_QUARTER_STG','MTH_RESOURCES_STG',
    'MTH_RESOURCE_COST_STG','MTH_RESOURCE_REQUIREMENTS_STG',
    'MTH_RESOURCE_TXN_STG','MTH_TIME_HIERARCHY_STG',
    'MTH_USER_DIM_ENTITIES_STG','MTH_USER_DIM_HIERARCHY_STG',
    'MTH_WEEK_STG','MTH_WORKDAY_SHIFTS_STG','MTH_WO_SALES_ORDERS_STG',
    'MTH_YEAR_STG','MTH_TAG_READINGS_RAW','MTH_EQUIP_ENTITIES_STG');
    CURSOR c_mth_resources_d IS
    SELECT table_name
    FROM USER_TABLES where table_name='MTH_RESOURCES_D';
    v_rename_query VARCHAR2(200);
    v_drop_query VARCHAR2(200);
    v_res_query VARCHAR2(300);
    v_table_name VARCHAR2(100);
    v_tmp_table_name VARCHAR2(100);
    v_update_eqp_prd_prfrm VARCHAR2(200);
    v_res_tab VARCHAR2(100);
    BEGIN
    FOR table_name_rec IN c_non_p_stg_tables LOOP
    v_table_name := table_name_rec.table_name;
    -- rename table from MTH_WEEK_STG to be MTH_WEEK_S_P
    v_tmp_table_name := substr(v_table_name, 1, (Length(v_table_name) -2)) || '_P';
    v_rename_query := 'ALTER TABLE ' || v_table_name || ' rename to ' ||
    v_tmp_table_name ;
    -- v_drop_query := 'DROP TABLE ' || v_table_name;
    --BEGIN                 
    EXECUTE IMMEDIATE v_rename_query;
    --EXCEPTION
    --WHEN OTHERS THEN
    --BEGIN
    --EXECUTE IMMEDIATE v_drop_query;
    --EXCEPTION
    --WHEN OTHERS THEN NULL;
    --END;
    --END;
    END LOOP;
    FOR table_res_d IN c_mth_resources_d LOOP
    v_res_tab := table_res_d.table_name;
    v_res_query := 'CREATE TABLE MTH_RESOURCES_D_TEMP AS SELECT * FROM '|| v_res_tab;
    EXECUTE IMMEDIATE v_res_query;
    EXECUTE IMMEDIATE 'TRUNCATE TABLE MTH_RESOURCES_D';
    END LOOP;
    END;
    commit;
    exit;

  • App Store won't update my apps. Keeps asking me update card info. However when I do it keeps decking card. I have checked card to what I have entered. Starting to annoy me

    App Store won't update my apps. Keeps asking me update card info. However when I do it keeps decking card. I have checked card to what I have entered. Starting to annoy me

    Hey Duddy1888,
    Thanks for the question. Try changing your payment information to “None”. If you are unable to select “None” as a payment option, see the following resource:
    Why can’t I select None when I edit my payment information?
    http://support.apple.com/kb/TS5366
    Using an existing iTunes Store or App Store account
    If you have an unpaid balance or payment due, you can't select None as your payment type. To see which order you need to pay for, view your purchase history. When you sign in to the store, you may see a message that there was a billing issue with your last order. Click the Billing Info button to see the order.
    After you pay for the order, you can change your payment information to None.
    Additional Information:
    iTunes Store: My credit card's security code or zip code does not match my bank's records
    http://support.apple.com/kb/TS1646
    iTunes Store & Mac App Store: About payment card authorization holds
    http://support.apple.com/kb/HT3702
    Thanks,
    Matt M.

  • Rss widget won't update

    I recently updated my blog but the rss widget won't update with the new entry, I've waited a full day. The rss feed address is: http://www.berrylibrary.com/Blog/rss.xml
    Apple Mail, Google Reader, etc. all get the update but the iWeb RSS Widget refuses. I also took the widget out and put it back with no success.

    Here is my trick to get my rss feed fixed:
    Make a change in the Inspector that only affects the blog (but all entries), like disabling comments and right away enabling them again in the rss window of the Inspector (I don't know for sure but this could erase your existing comments); that will return the images in the right places or put them back if they disappeared altogether. This will also clean up the rss feed.
    Disabling comments crashes iWeb, so it is important to enable it immediately after having disabled it, so you click in fact twice in the check box, off and on again.
    But you will have to do this each time you add a post to your blog, or to any of your blogs, because it seems a change in one blog or site may have a damaging effect on an other blog.

  • JHeadstart Version 10.1.2.0 Intersection Shuttle Trailing won't update

    I'm new to JHeadstart and think it is a great time saver, that is until you run into problems. I've been trying to figure out for quite some time now why the trailing listbox for my Intersection Shuttle won't update. I have confirmed that the database is being updated properly, the intersection table has the rows that should be displaying in the trailing listbox. The leading listbox is being updated correctly, the items I move over to the trailing listbox no longer appear in the leading listbox. But the trailing listbox always stays empty. Will someone please give me some pointers that I can use to try and figure out what's going on.
    Thanks,
    Rick

    Steven,
    Here is a snippet from the log. This is after moving one item from the leading list to the trailing list, then clicking the save button:
    11:46:52 DEBUG (JhsActionServlet) -Request class: com.evermind.server.http.EvermindHttpServletRequest
    11:46:52 DEBUG (JhsActionServlet) -Request URI: /MemberTop/EobSubmissionFiles.do
    11:46:52 DEBUG (JhsActionServlet) -Request Character Encoding: windows-1252
    11:46:52 DEBUG (JhsActionServlet) -Parameter EobGenerationSet3:trailing:items: UNSELECTED:589456;
    11:46:52 DEBUG (JhsActionServlet) -Parameter VB_EobSubmissionFilesTotalMembers:
    11:46:52 DEBUG (JhsActionServlet) -Parameter queryOperatorNonString: is
    11:46:52 DEBUG (JhsActionServlet) -Parameter EobGenerationSet3:trailing: UNSELECTED:589456
    11:46:52 DEBUG (JhsActionServlet) -Parameter pageTimeStamp: 1147283105872
    11:46:52 DEBUG (JhsActionServlet) -Parameter eventValue:
    11:46:52 DEBUG (JhsActionServlet) -Parameter createMode: true
    11:46:52 DEBUG (JhsActionServlet) -Parameter queryOperatorString: startsWith
    11:46:52 DEBUG (JhsActionServlet) -Parameter hasChanges: true
    11:46:52 DEBUG (JhsActionServlet) -Parameter multiRowUpdateEvent:
    11:46:52 DEBUG (JhsActionServlet) -Parameter caseSensitiveQuery: false
    11:46:52 DEBUG (JhsActionServlet) -Parameter VB_EobSubmissionFilesDateSubmitted:
    11:46:52 DEBUG (JhsActionServlet) -Parameter EobGenerationSet3:leading:items: UNSELECTED:589424;UNSELECTED:591922;UNSELECTED:590247;UNSELECTED:592051;UNSELECTED:590274;UNSELECTED:587362;UNSELECTED:593525;UNSELECTED:590144;UNSELECTED:589553;UNSELECTED:591517;UNSELECTED:591727;UNSELECTED:592222;UNSELECTED:587430;UNSELECTED:587535;UNSELECTED:565268;UNSELECTED:587436;UNSELECTED:589445;
    11:46:52 DEBUG (JhsActionServlet) -Parameter VB_EobSubmissionFilesFileid: EOBX0120060510002
    11:46:52 DEBUG (JhsActionServlet) -Parameter VB_EobSubmissionFilesUpdatedBy:
    11:46:52 DEBUG (JhsActionServlet) -Parameter event: Commit
    11:46:52 DEBUG (JhsActionServlet) -Parameter VB_EobSubmissionFilesDateUpdated:
    11:46:52 DEBUG (JhsActionServlet) -Parameter VB_EobSubmissionFilesFileStatus:
    11:46:52 DEBUG (RequestUtils) -Get module name for path /EobSubmissionFiles.do
    11:46:52 DEBUG (RequestUtils) -Module name found: default
    11:46:52 DEBUG (RequestProcessor) -Processing a 'POST' for path '/EobSubmissionFiles'
    11:46:52 DEBUG (RequestProcessor) - Setting user locale 'en_US'
    11:46:52 DEBUG (RequestProcessor) - Looking for Action instance for class oracle.jheadstart.controller.strutsadf.action.JhsDataAction
    11:46:52 DEBUG (RequestProcessor) - Returning existing Action instance
    11:46:52 DEBUG (JhsDataAction) -Executing action /EobSubmissionFiles
    11:46:52 DEBUG (JhsDataAction) -lastIssuedPageTimeStamp set to: 1147283212205
    11:46:52 DEBUG (JhsDataAction) -Found existing searchBean for EobSubmissionFilesUIModel
    11:46:52 DEBUG (JhsDataAction) -Stored searchBean for EobSubmissionFilesUIModel on request
    11:46:52 DEBUG (JhsDataAction) -ViewObject EdEligibilityGenerateViewLookup: bind parameter values have not changed
    11:46:52 DEBUG (JhsDataAction) -Commit event found in request, multi-row update executed
    11:46:52 DEBUG (JhsDataAction) -Executing action binding processIntersectionShuttle
    11:46:52 DEBUG (JhsDataAction) -executing onCommit
    11:46:52 DEBUG (JhsDataAction) -Refreshed shuttle iterator binding EobGenerationSet3Iterator
    11:46:52 DEBUG (JhsDataAction) -Refreshed shuttle iterator binding EdEligibilityGenerateLookupIterator
    11:46:52 DEBUG (JhsDataAction) -ViewObject EdEligibilityGenerateViewLookup: bind parameter values have not changed
    11:46:52 DEBUG (JhsDataAction) -Storing table binding factory under key jhsTableBindings on request
    11:46:52 DEBUG (JhsDataAction) -Forward set by parameter property returned: /WEB-INF/page/EobSubmissionFiles.uix
    11:46:52 DEBUG (RequestProcessor) -processForwardConfig(ForwardConfig[name=null,path=/WEB-INF/page/EobSubmissionFiles.uix,redirect=false,contextRelative=true])
    =====================================================
    I don't know if this helps, but it might.
    Thanks,
    Rick

Maybe you are looking for

  • ABAP Runtime Error while executing planning folder

    Hi experts. We have a situation where I can access our planning folders but that's not the case for one of our user. She encountered with an ABAP Runtime Error as follow: Appreciate if anyone can help me out with this. Runtime Error          RAISE_EX

  • IPod Touch 2G electronic discharge when connecting

    Hello, I just wanted to connect my iPod Touch 2G to my PC to put some music on when suddenly i was getting an electrical discharge. I felt the charge coming from the cable trough my finger. This happend before, when i was using a dock. Thought it was

  • ADFS MP - shows websites as Critical when they are fine

    Hi, Just installed the ADFS MP on to SCOM 2012 R2, but cannot get the Websites to turn Green, even though the Websites  are running fine. ADFS servers are 2008R2. Have applied all the legacy IIS6 extras to the Management Server (bit dodgy??) http://s

  • Best way to manage layers in a book

    I know that you can put all graphics, text and guides in their own respective layers (for the entire document), but is there a "best practice" method for managing layers (for example, a book) when you have tons of pictures, and text? Thanks in Advanc

  • Web Dynpro query

    Hi All, In one z t-code dynpro , i want to put condition for one text box like one particular user that text box should be disabled or if he writes it should not be saved. Regards, Pragya