Query not synchronized

Hello

I am having trouble on the provision of a list where some of the attributes of the line have changed.
The list page makes a table where the value attribute is bound to a java.util.List in a scope of request backing bean. I select one of the items and send it to the edit view and change the attribute of one or two, call service and merge the changes with the javax.persistence.EntityManager. Once completed, I am returned to the list where I started. The attributes of one or two are in the columns of the table renders, but they have not changed. I check the database and they have changed, and if I go to the other list where these changes will cause this line not included it works fine, but when I'm back to the list with attributes remain unchanged.

I checked, and whenever I'm on the list, before and after editing, the query to load the list is called. The java.util.List object is called support bean, which is within reach of the application. The query is created in the façade, as follows:

public list < result > getResults (String report Long id) {}
Sql StringBuilder = new StringBuilder ("select table_x x, table_y y x.field_one, x.field_two, y.field_three where x.field_one =?") 1 ») ;
If (null! = state) {}
SQL. Append ("and x.field_two =? 2") ;
}
Query query = em.createNativeQuery (sql.toString, Result.class);
query.setParameter (1, id);
If (null! = state) {}
query.setParameter (2, State);
}
Return query.getResultList ();
}

And the result class is an entity without any real table attached to it.

@Entity
Result/public class implements serializable {}
attributes + getters and setters
}

Any ideas why this would happen?
Thnaks in advance.

Try adding the following line before the call to query.getResultList ():

query.setHint(TopLinkQueryHints.REFRESH, HintValues.TRUE);

Add the following to your import declarations:

import oracle.toplink.essentials.config.HintValues;
import oracle.toplink.essentials.config.TopLinkQueryHints;

Pino

Tags: Java

Similar Questions

  • tablespace and data files not synchronized

    Hello
    I'm under 10.2.0.1.0 Oracle instance.
    got an error like:

    ORA-01652: unable to extend segment temp of 128 in tablespace TEMP.

    resolution, I've tried:
    I added 2 database files each of 2 GB in TEMP tablespace.

    then I re-run same query got the same error message.

    On OEM, the TEMP tablespace and data files that it contains are not synchronized.

    When I added a few .dbf in tablespace TEMP it has not yet calculated space and space occupaid.

    Is anyway I can make TEMP tablespace and .dbf in tablespace TEMP in sync... ?
    anyhelp is fine
    I'm stuck... ?

    Thank you
    JP

    Hello

    You should have added tempfiles and not the datafiles, right?

    Why didn't you not adjust existing files to autoextend on? And you can try adding space via Enterprise Manager itself.

  • Faces of Mac OS Sierra an iOS not synchronized on icloud photo library

    You also have this problem?

    Hello alfo91,
    Thank you for using communities of Apple Support.

    If I understand your message that faces on Mac OS Sierra are not synchronized to your device iOS with iCloud photo library. Some features in Photos on macOS Sierra are available only on the Mac, they were created on. These items are listed in the article below:

    Use iCloud photo library on several Mac computers and Photos

    These items are available only on the Mac where you created the:

    • Books, cards and calendars
    • Slideshows
    • Keyword shortcuts
    • Unused keywords
    • Last album imported (this album contains photos you have imported recently on a specific Mac)
    • Names and faces in the album of the people

    Best regards.

  • New tab page is not synchronized between several PCs

    I use Firefox on three PC and FF Sync is enabled on each of them. Two of the three PCs have the "speed dial" on the new tab page (6 pages, most used) while the third PC only shows a blank page. Why isn't it synchronized? Or is it supposed to be synchronized in the first place? (I have verified synchronization options 'Options').

    I discovered something important - I use Tab Mix Plus, it has an impact on what is happening on the new tab page and its setting are possibly not synchronized automatically - at least, I found there is a choice "sync Options" in Tab Mix Plus and it has been disabled.

    It will probably be the cause of my problem. Thanks anyway a helping hand.

  • using Sync now, but it seems this provision of toolbar and bookmark toolbar is not synchronized on, is it ture?

    using Sync now, but it seems this provision of toolbar and bookmark toolbar is not synchronized on, is it ture?

    can someone advise me?

    Please see this. Entering topic: on all shows usually about: protocols in the form of links, including the three associated synchronization.

  • Notes on IOS 9.3.1 not synchronized with iCloud

    Does anyone have a solution for Notes on IOS 9.3.1 not synchronized with iCloud? I tried everything and even resorted to a full fee reinstall IOS 9.3.1 on my Iphone and always used to synchronize notes.

    Tried signing in and out of the iCloud several times with no luck?

    BTW, the issue is on my iPhone 6 s more but no problem with my iPad 2 Air synchronization?

    Thank you

    Paul

    Have you checked the settings/iCloud to ensure that information on the synchronization are enabled? If the weight is, stopping and restarting the synchronization.

  • iPad not synchronized with computer-says updating itunes already NIR is 9.3

    My iPad air is not synchronized with iTunes. The error message indicates that the iPad should be updated to the latest version of iTunes, my iPad is updated to 9.3, not sure what to do

    The computer must be updated to the latest version of iTunes - 12.3 or higher. Earlier versions recognize devices with iOS 9 or a later version on board.

  • How can I get a playlist from a computer on which I am not synchronized to and put it in my iPhone?

    I want to take a macbook playlist my sister but I have not synchronized on his computer. I don't want to lose all my music and that she does not want you have a friend in his computer. Is it possible that I can add to a playlist without having to go through the trouble of losing the music?

    You can not.

  • iCloud watch icon pays next to the device iPad Air 2.  I've already paid to increase the storage size, but my iPad is not synchronizing.

    iCloud watch icon pays next to the device iPad Air 2.  I've already paid to increase the storage size, but my iPad is not synchronizing.  My iPhoneis showing the right amount of photos and I'm not having any problems with it.  Recommendations on adjustment or the w parameter

    Try the settings/iCloud and remove the synchronization. Wait a few minutes and then resynchronize.

    Have you tried the signature to iCloud and then reconnect?

  • My receiver STR-K750P sound is not synchronized with the video on my TV (it looks like an old movie double).

    My receiver STR-K750P sound is not synchronized with the video on my TV (it looks like an old movie double). Is there a way to synchronize?

    I see it, are there audio options in your cable box settings that may be do this maybe?

    You have any other devices connected to your receiver as a DVD or Blu - ray drive? If it's synchronized sound when played of these devices?

    Unfortunately I do not have a cable box advise me that you later is a bit difficult, sorry!

  • MSN Chat is not synchronized

    Hello. I try to use the live messenge for windows, but for some reason the cat is not synchronized. People get my messages and respond, but I see their responses minutes after they said anything. Solutions?

    All Windows Live Messenger questions belong here: http://windowslivehelp.com/product.aspx?productid=2

  • sound effects not synchronized with the graphics

    When playing poker online, sound effects are not synchronized with the graphics.  I have been instructed to uninstall realtek high definition audio, and then restart the computer.  I heard that this device will be restored during the computer startup.  Safe to do?

    Generally, Yes.

    My advice would be different in the fact that I would tell you to get the latest version of the drivers for your hardware from the hardware provider for the audio device, or at least to the manufacturer of the system.

  • online banking can't watch cancelled check opening, it says item query not found. How to fix?

    online banking can't watch cancelled check opening, it says item query not found.  How to fix?

    online banking can't watch cancelled check opening, it says item query not found.  How to fix?

    Contact online banking support team. This has nothing to do with the topic of this forum.

  • on Windows Movie Maker: when the film and the sound is not synchronized together.

    is there a way to fix this? It is the only film that I imported where the film and sound are not synchronized together, and that means I can't change it.

    Thanks for the help!

    I found a solution, thanks

  • Tree view on the left of the Explorer of Windows 7 not synchronized with the file on the right.

    1. create a shortcut to a folder.
    2. click on the shortcut.
    3 explore opens with the contents of the folder in the right pane, but the tree left is not synchronized with the location on the right. You must navigate on the left tree to get to the location of the folder on the right side. In the XP folder as this is done automatically.

    The whole point (I thought) shortcuts to specific locations in the directory structure was to avoid having to navigate several lower levels from the root of a tree...

    Any way to configure the behavior of XP?

    Thank you.

    Hi Rptrevor,

    ·         How you used to synchronize folders in Windows Explorer?

    Follow the steps below to solve the problem:

    a. right click on an empty space in the left pane (folder), you get a menu with two options

    b. 'show all files' and 'Developing in the current folder'.

    c. believing that the empty space is a bit complicated and the options are sticky (it's the same thing than to go through the 'Folder Options' dialog box).

    I hope this helps.

Maybe you are looking for

  • I lost the Firefox start page, so can't access the Firefox tab. I get Ask, I want

    For some reason, I started to get a type empty page, rather than the Firefox home page when I open firefox. White page has no tab of firefox at the top of the tab to the left so I can not access all the features of firefox. Also the white page does n

  • Satellite L305-S5955 - gel of the boot process

    Toshiba Satellite L305-S5955Once it froze early in the boot process - until windows starts, indicating (to me) it must be material. John

  • can I have 2 iPhones using the same account iCloud under the same roof?

    My husband has an iPhone 5 s.  He has recently upgraded to 9.2.1 operating system and asked to add iCloud account.  He used my password.  So now he has 2 iPhones on the same iCloud account.  This will cause problems with the use of the phones?

  • Save the file in the user configuration

    Hello IM using teststand 2010. IM busy with a sequence that reads a HP Agilent multimeter Volt. The user selects the com for communication port. How can I save this com port selection so that the next time that the user enters this it automatically c

  • My microphone is made of frying noise

    This afternoon, I was doing my microphone and getting ready to play a few Aces going high II for a bombing Run, but when I tried to talk to my co-pilot, he said my microphone does any of this Sound Schhhhhhhhh and he cannot hear a thing I want to say