Question about Hibernate non-automatic id generator

Hello I have a small problem which I cannot fix.
I insert an object into the database which has a fixed ID that is entered on the website.
Hibernate adds this perfectly, all goes well.
But when i try to edit (through session.update()) it will not change the ID, it gives me a
"org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1"
Now I figured this is because the ID assigned inside the object is now changed, it can no longer find the new ID in the database.
Is there any other way except first deleting the old ID and inserting the new ID?
The ID mapped in hibernate is a simple <id></id> no generator inside it.
Thanks

If you have to change your Apple ID name it will still be the same account. For example, if you changed your legal name you would still be the same person. I have changed my Apple ID more than a few times now and that's how it works. Purchases will always show the account name (whatever name the account was called at the time) used to make the purchase.
http://support.apple.com/kb/ht2519 explains how to download you previous purchases.
If this has answered your queston or resolved your issue please select solved. Thank you.

Similar Messages

  • Question about Hibernate vs select query/EJB

    HI all
    i just want to understand the benefit of using Hibernate to map table to java object. normally we use select sql to get data and populate objects with the result set for simple situation, and if it gets complicated, we may use Entity Beans for persistence. now we have this hibernate concept that maps a table to a object, and use the hibernate APIs or queries to populate data. what is the big difference. the hibernate claims to be ultra high performance, any thought? thanks for your help and insight.

    I have to say I wonder whether EJBs are much use at all. I think we need to explicitly say entity beans here. I think SLSBs and MDBs are decent and will remain even if CMP entity beans fade.
    The EJB model says have a container because it takes care of a lot of things for you (e.g., distributed, transactions, threading, clustering, lifecycle, etc.) For those apps that don't need those things, don't use EJBs.
    They have the feeling of being one of those management-driven fads. I think it's more like Sun and the designers of EJB had an initial idea, EJB 1.0, that has turned out to be non-performant. EJB 2.0 tried to fix it with CMP. Still didn't work. We'll see if POJOs and ORM are the answer. Check back in five years. There's a lot to like, but I'm sure EJB 1.0 was the best effort by smart folks, too.
    When you come down to it the
    attraction seems to be the idea that you can use
    weaker programmers (and I doubt the reality of that,
    either).I don't think anybody ever said that. EJBs aren't trivial. The container relieves programmers from having to write their own transactions, threading, etc., but what's left is hardly "easy".
    Certainly they've got to be extremely costly on
    comupting and (more importantly) network power, and I
    find it hard to believe they really simplify coding.I think the cost on computing and network power are just part of writing enterprise apps, which is where the E in EJB came from.
    Lots of times the network problems come about because naive programmers do n+1 queries when n will do. Hibernate helps with that.
    %

  • Some questions about using non-english characters and keyboard layouts

    I've found a lot of guides about how to enable characters in Linux, and that is easy enough, but I want to understand it better.
    The way that I understand it, if you don't enable a given set of characters in locale.gen, then in theory you should not be able to either use or display a that set of characters in any programs (however, certain programs, like web-browsers seem to have work arounds).
    Furthermore, in order to be able to type characters in X programs, you need to enable those keyboard setups in your xorg.conf (in addition to enabling those locales in locale.gen).  I don't think that this effects the displaying of characters
    Then, Last, you need a way to switch back and forth between different keyboard layouts within your X environment in order to type those characters. There are programs to assist in switching keyboard layouts provided by some DE's.  By using these keyboard layout tools, I alter the behaviour of all programs started in X.  (for example, swithing keyboard layouts in gnome's settings will alter the behaviour of kde programs, firefox and openoffice.)
    How close am I?
    A few more questions:
    If I'm a Spanish student which locales do I need to enable.  There is a long list of locales that start with ES, and I don't know if there are any drawbacks to enabling unnecessary locales. I think that the ones that I need are es_ES* (Spanish spanish?) and es_MX* (Mexican spanish?).
    What is do the *@EURO locales do?
    what does the locale setting in rc.conf do?

    I've found a lot of guides about how to enable characters in Linux, and that is easy enough, but I want to understand it better.
    The way that I understand it, if you don't enable a given set of characters in locale.gen, then in theory you should not be able to either use or display a that set of characters in any programs (however, certain programs, like web-browsers seem to have work arounds).
    Furthermore, in order to be able to type characters in X programs, you need to enable those keyboard setups in your xorg.conf (in addition to enabling those locales in locale.gen).  I don't think that this effects the displaying of characters
    Then, Last, you need a way to switch back and forth between different keyboard layouts within your X environment in order to type those characters. There are programs to assist in switching keyboard layouts provided by some DE's.  By using these keyboard layout tools, I alter the behaviour of all programs started in X.  (for example, swithing keyboard layouts in gnome's settings will alter the behaviour of kde programs, firefox and openoffice.)
    How close am I?
    A few more questions:
    If I'm a Spanish student which locales do I need to enable.  There is a long list of locales that start with ES, and I don't know if there are any drawbacks to enabling unnecessary locales. I think that the ones that I need are es_ES* (Spanish spanish?) and es_MX* (Mexican spanish?).
    What is do the *@EURO locales do?
    what does the locale setting in rc.conf do?

  • Question about using for-loop to generate array from DAQmx. Thanks!

    I have a laser system with a frequency of 1kHz, I am using this 1kHz signal to trigger the DAQmx and get the data from a photodetector, e.g. I will get 1000 data points during 1 second from DAQmx, but I need to separate this 1000 data points into the even and odd list, which is two list of 500 data points, e.g.. The 1st, 3rd, ... 99th data is one array, the 2nd, 4th,... 10th data is another array, then I will do further calculations based on these two arrays.
    To seperate the even and odd data, the only way I can find is put these 1000 points into an array and then seperate them afterwards.
    Can I do things like this pic?
    I don't know the speed of the for loop, because the 1kHz trigger is always there, once it is triggered, the DAQmx read will give a data point, if the speed of the for-loop( the time from the end of a loop to the beginning of the next loop) is slower than the 1kHz trigger, then the for-loop will miss data point, then the ordering of the 1000 points in 1 second will be changed.
    Or I need to put everything, e.g. AI Voltage, Trigger, sample clock, into the for-loop and then return a Y? Thanks! 

    Clarification:
    The VI you have posted will work as following:
    1) The task will read 2 analog inputs (ai0, ai3).
    2) The acquisition starts, oncece digital signal (trigger) is detected on PFI0
    3) The sampling rate will be as specified in "rate" control - it is continuous analog input acquisition, which means that after trigger is received (point 2), the board will start to generate hardware clock with frequency you specify as "rate"
    4) with each rising edge of that hardware clock, the measurement is taken, and stored into buffer of driver.
    5) DAQmx read will try to read "number of samples per channel" number of samples each time is called - and if there is not enough measurement stored in buffer (step 4), then DAQmx read will wait until DAQ card will measure reaquested number of samples (or timeout occurs before requested number of samples has been acquired)
    6) DAQmx read will be then called 1000 times - so totaly you will read 1000 * "number of samples per channel"  number of samples.
    You do not have to be worried about speed of the loop. In fact, if you need to read just 1000 samples, with 1kS/s, then you can remove for loop and you can change measurement mode from continuous to finite samples, and specify number of samples to read to be 1000. You will read them all properly. I recomend you to read User Manual for your DAQ device - lets say M Series User Manual.
    I hope it is clear now.
    regards,
    stefo

  • Question about the customized FPGA signal generator.

    I connected the AO0 and AO1 ports to the oscilloscope. But I got nothing. What should I do?
    Attachments:
    Customized FPGA Signal Generator.lvproj ‏2159 KB

    Hi CZ_Kevin,
    When attaching a project, it might be best to zip the project folder, or attach your VIs, so that we can look at your code. As for the screenshot, it looks like you might be using too many resources on the FPGA but again it is hard to determine without looking at your code.
    Since you are using a myRIO, you might get better responses by posting to the Academic Hardware Products forum as this handles many myRIO questions.
    Also, there are many pre-built project templates and examples within LabVIEW that might be worth exploring as well as a project guide that includes many tuturials. You can find the latter here.
    David C

  • The ubiquitous question about disabling the "AUTOMATIC pixel aspect ration correction"....

    So many people ask the question, "How do I disable the automatic pixel aspect correction" in photoshop only to get repsonses that include the manual step at turning off the correction for the current photo you're working on. Further details are also given from time to time on how this "shouldn't be a problem" or "it's only because you took a video screen grab", or even better, a debate over how it occaisionally helps. Here's the thing, it doesn't help as often as it creates an annoying step in having to go and turn it off when you open pictures that CS5 determines "need fixing" when in fact, the image becomes distorted by this automated fix, especially when this happens so much more now with cell phone pics, and as you turn off the "Auto correct" the image is no longer distorted. It is indeed RARE that this feature does anything good, and way more often that it shows a preview that is way out of whack. Why would Adobe decide that they can't compile Photoshop with this being something you can disable and only turn on for the photos you want as you open them instead of making you turn them off for when you don't (which is the more often case)? Why has this question circulated since at least CS2 on Adobe forums, and yet never been addressed any further than half hearted attempts at describing "recorded macros/steps/automations" that don't work? If I can set a default scratch disk, surely I should be able to set my default action upon opening a photo to NOT auto-correct anything?  If the guys who put Photoshop together don't agree and think "We must autocorrect everything these fools are opening", perhaps we can be allowed enough rope to hang our selves with square pixels anyway and learn our lesson the hard way? Please?

    Hi Darrell,
    You've posted in the AIR forums and I think you meant this for Photoshop.  Would you mind reposting over there?
    Thanks,
    Chris

  • Questions about db_keep_cache_size and Automatic Shared Memory Management

    Hello all,
    I'm coming upon a server that I'm needing to pin a table and some objects in, per the recommendations of an application support call.
    Looking at the database, which is a 5 node RAC cluster (11gr2), I'm looking to see how things are laid out:
    SQL> select name, value, value/1024/1024 value_MB from v$parameter
    2 where name in ('db_cache_size','db_keep_cache_size','db_recycle_cache_size','shared_pool_size','sga_max_size');
    NAME VALUE VALUE_MB
    sga_max_size 1694498816 1616
    shared_pool_size 0 0
    db_cache_size 0 0
    db_keep_cache_size 0 0
    db_recycle_cache_siz 0 0
    e
    Looking at granularity level:
    SQL> select granule_size/value from v$sga_dynamic_components, v$parameter where name = 'db_block_size' and component like 'KEEP%';
    GRANULE_SIZE/VALUE
    2048
    Then....I looked, and I thought this instance was set up with Auto Shared Mem Mgmt....but I see that sga_target size is not set:
    SQL> show parameter sga
    NAME TYPE VALUE
    lock_sga boolean FALSE
    pre_page_sga boolean FALSE
    sga_max_size big integer 1616M
    sga_target big integer 0
    So, I'm wondering first of all...would it be a good idea to switch to Automatic Shared Memory Management? If so, is this as simple as altering system set sga_target =...? Again, this is on a RAC system, is there a different way to do this than on a single instance?
    If that isn't the way to go...let me continue with the table size, etc....
    The table I need to pin is:
    SQL> select sum (blocks) from all_tables where table_name = 'MYTABLE' and owner = 'MYOWNER';
    SUM(BLOCKS)
    4858
    And block size is:
    SQL> show parameter block_size
    NAME TYPE VALUE
    db_block_size integer 8192
    So, the space I'll need in memory for pinning this is:
    4858 * 8192 /1024/1024 = 37.95.......which is well below my granularity mark of 2048
    So, would this be as easy as setting db_keep_cache_size = 2048 with an alter system call? Do I need to set db_cache_size first? What do I set that to?
    Thanks in advance for any suggestions and links to info on this.
    cayenne
    Edited by: cayenne on Mar 27, 2013 10:14 AM
    Edited by: cayenne on Mar 27, 2013 10:15 AM

    JohnWatson wrote:
    This is what you need,alter system set db_keep_cache_size=40M;I do not understand the arithmetic you do here,select granule_size/value from v$sga_dynamic_components, v$parameter where name = 'db_block_size' and component like 'KEEP%';it shows you the number of buffers per granule, which I would not think has any meaning.I'd been looking at some different sites studying this, and what I got from that, was that this granularity gave you the minimum you could set the db_keep_cache_size, that if you tried setting it below this value, it would be bumped up to it, and also, that each bump you gave the keep_cache, would be in increments of the granularity number....?
    Thanks,
    cayenne

  • Question about shared variables and report generator

    I have a project with about 200-250 shared variables and at every 12 hours i want to make a report containing information about some boolean and double front panel variables linked to the shared variables... Now, i've tried with both the "Write Trace to SpreadSheet File" function from DSC->History and with different functions from NI Report Generation Toolkit. My problem is this: i would like to get my xls file to contain just the timestamps when my shared variable changed value. As it is, the number of rows in the file depends, obviously, on the sampling interval given as input. As an example, in 12 hours, my shared variable would change value maybe 5-6 times. Thus i would like my xls file to contain just 5-6 rows with those 5-6 changes. If i set the sampling interval to say, a matter of seconds, that would mean too much unneeded information in my xls file. Instead, if i set it to let's say 15 minutes, i would probably lose the moment the shared variable changed value. Is there a way for me to achieve my desired functionality with functions from DSC or Report Generation Toolkit? Thanks in advance, Sabin 

    Hi Mike and thanks for the reply. Actually, my first idea was exactly this: in an event case structure, whenever my variable changed value, i would retain the relevant data in an array and then at the 12 hour period write all of it in a report. However, my boss deeemed it memory unefficient and compelled me to use only one function. Thus my predicament... If you have more advice on this new info, i would be grateful... Cheers, sabin

  • Question about access non-public class from other package.

    Hi, everyone!
    Suppose class A and class B are in the same java file of package pkg1
    -- A.java. So, A is a public class and B is a non-public class.
    If I want to access class B from another class class C and class
    C is in package pkg2. When compiling, an error occurs indicating
    that class B is not visible to class C.
    So, If I defined serveral classes in one java file and I want to
    access every class from other package. How should I do?
    (I think in one java file, there should be only one public class and
    only the public class can be accessed from other package.)
    Thanks in advance,
    George

    So, If I defined serveral classes in one java file and
    I want to
    access every class from other package. How should I
    do? As you already seem to know, there is at most one public class allowed per source file (at least, with javac and most popular compilers). So if you want more than one public class, you will need to use more than one file...

  • A question about non-static inner class...

    hello everybody. i have a question about the non-static inner class. following is a block of codes:
    i can declare and have a handle of a non-static inner class, like this : Inner0.HaveValue hv = inn.getHandle( 100 );
    but why cannot i create an object of that non-static inner class by calling its constructor? like this : Inner0.HaveValue hv = Inner0.HaveValue( 100 );
    is it true that "you can never CREATE an object of a non-static inner class( an object of Inner0.HaveValue ) without an object of the outer class( an object of Inner0 )"??
    does the object "hv" in this program belong to the object of its outer class( that is : "inn" )? if "inn" is destroyed by the gc, can "hv" continue to exist?
    thanks a lot. I am a foreigner and my english is not very pure. I hope that i have expressed my idea clearly.
    // -------------- the codes -------------------
    import java.util.*;
    public class Inner0 {
    // definition of an inner class HaveValue...
    private class HaveValue {
    private int itsVal;
    public int getValue() {
    return itsVal;
    public HaveValue( int i ) {
    itsVal = i;
    // create an object of the inner class by calling this function ...
    public HaveValue getHandle( int i ) {
    return new HaveValue( i );
    public static void main( String[] args ) {
    Inner0 inn = new Inner0();
    Inner0.HaveValue hv = inn.getHandle( 100 );
    System.out.println( "i can create an inner class object." );
    System.out.println( "i can also get its value : " + hv.getValue() );
    return;
    // -------------- end of the codes --------------

    when you want to create an object of a non-static inner class, you have to have a reference of the enclosing class.
    You can create an instance of the inner class as:
    outer.inner oi = new outer().new inner();

  • Question about the Documentat​ion Tags for Source Code

    Hello,
    I have a question about CVI's automatic source code documentation. My problem is that is seems like you need to write all documentation for a specific tag on one line. If you don't, a line break will be inserted when the documentation is displayed. Suppose I want to write a large amount of documentation for the function itself, using the HIFN tag. If I don't want linebreaks to be forced in the documentation, I need to write all this documentation on one single line, which kinda messes up my code. If I split the documentation over several HIFN tags, the documentation displayed to the user might look messed up because of all the linebreaks. Is there any escape character I can put at the end of a line, allowing me to split the documentation of several HIFN lines without forcing linebreaks in the documentation?
    Thanks!
    GEMIDIS - Innovating Display Technology
    HQ Ghent, Belgium

    This information is certainly useful. Note, however, that it can also be found in the documentation
    Tag
    Description
    /// HIFN help text
    Specifies the help text for the function. Use multiple /// HIFN tags to display help text for the function on separate lines. To separate help text with an empty line, use /// HIFN on a line by itself. You also can use HTML tags, but you must enclose the tags in <HTML><BODY></BODY></HTML> tags.
    Example
    /// HIFN SampleFunction returns the value of a control.
    int SampleFunction (int controlID, ctrlType controlType, char label[], double *value)
         SomeAction;

  • Question about DBCA generate script o create RAC database 2 node cluster

    Question about creating two node RAC database 11g after installing and configuration 11g clusterware. I've used DBCA to generate script to create a rac database. I've set
    environment variable ORACLE_SID=RAC and the creating script creates instance of RAC1 and RAC2. My understanding is that each node will represent a node, however there should only be one database with a name of 'RAC'. Please advise

    You are getting your terminology mixed up.
    You only have one database. Take a look, there are one set of datafiles on shared storage.
    You have 2 instances which are accessing one database.
    Database name is RAC. Instance names are RAC1, RAC2, etc, etc.
    Also, if you look at the listener configuration and if your tnsnames is setup properly then connecting to RAC will connect you to either one of the instances wheras connecting to RAC1 will connect you to that instance.

  • Question about app itune, it automatically charge money from my card on Apr/24th, but i have not buy any music or any apps on that day!! what's wrong

    question about app itune, it automatically charge money from my card on Apr/24th, but i have not buy any music or any apps on that day!! what's wrong ??

    Please look at your E-Bill and click report a problem.

  • Question about email setting: how  do i change the setting so i need to login to check my email. Currently it automatically come to the inbox without the need to log in. Thanks

    Question about email setting: how  do i change the setting so i need to login to check my email. Currently it automatically come to the inbox without the need to log in.

    You don't. Email comes in either by push or when you invoke the email app. Ther is no password except when you first set up the account. If your iPad is not being used as your personal device and you need to shield emails from other users, then don't use the email app.  Instead, use web mail if available from your provider.

  • I have a question about japan new depriciation engine using non-japanese chart of deprication

    Hi, all
    I have a question about link between new depriciation engine and chart of depriciation.
    My client want to use US chart of depriciation as standard chart of depriciation becuase it has already standard setting like IAS deprication keys.
    it means I have to create Japanese chart of depriciation by copying from US chart of depriciation(non-japanese sample(0JP))
    I have a little doubt about it. In my previous project, I copyed chart of depriciation by copy from Japan sample Chart of depriciation(0JP) stored in SAP.
    Is it possible to copy from non-japan sample charg of depriciation to using Japanese new depriciation engine? I worried some errors will occrues if I do not use sample chart of depriciation(0JP) .
    If I need to use sample Japanese chart of depriciation, please give me the idea why I need to use Japanese sample chart of depriciation. I want to know the examples of non-Japanese asset accouting consultants who have working experience in the area.
    Thank you.

    Hi, Narasimhulu
    Thank you for your support.
    My client use one COA to all over the world. And not only Japan, other country aslo use the COD which is copied from that of US. Basic reporting line is for USGAP. I will customize 2 depriciation ares, one for US GAP and another is JGAP. No need to create TAX realted customize.  It means it enought only adding Japanese new depriciation keys to Current US COD. No need to add more Japanese local requirements.
    In this case, I want to know follwoing point.
    I know COD controll depriciation keys, but I want to know more detail about COD, what kinds of controls COD do. What is Japanese local requirements. Why better to use COPY of JP COD.
    Thank you.

Maybe you are looking for

  • Full Firewire Port Failure (three different machines : iMac Intel, iMac G5, Black Macbook)

    I'm experiencing a failure of all FireWire ports on all of my three machines. I believe this problem began with a faulty external, FireWire powered hard drive from G-Tech. Here are all my specs, followed by a rundown of the order of events that has l

  • How to add prefixes to xml output?

    Does anyone know a quick and easy way to add a namespace prefix to an xml document when you output it as a string? i'm looking for somethinglike this. <Order xmlns="http://www.something.com/name">    <item>sink</item> <Order> converted into <dof:Orde

  • How can i let people make adjustings in my app when they use it

    I want people to adjust their wishes in my app.  So if I would set 4 website links to 4 random websites. Then people that download my app should be able to adjust the website to any of their favourites. This way it works best for them. Can anyone ple

  • Cannot connect to the TV

    I have been trying to connect my Mac to the TV and cannot get it to work. I have the cables and settings but it won't communicate. When the Mac is connected to the TV and the computer is selected, a blue screen flashes then it goes back to the screen

  • How to turn my iPod from my computer?

    My iPod touch 4th generation was stolen, I think whoever has it turned it off. When I tried to use iCloud, unlike last time my screen was black. I sent it tasks, and it won't locate it because I think it's off. How do I turn it on from my computer? *