Update « MySQL « JPA Q&A





1. Self-referencing updates in HQL    stackoverflow.com

I have the following query in HQL:

update ProjectFile pf1 
set pf1.validUntil.id =123
where pf1 = (
select pf from ProjectVersion pv, ProjectFile as pf 
where pf.validFrom.sequence <= pv.sequence 
and pf.validUntil.sequence >= pv.sequence
and pf.state ...

2. Hibernate: update to sum from other table    stackoverflow.com

I'm trying to replicate this query from MySQL to HQL: *UPDATE users u, mines m SET u.mana = u.mana + COALESCE((SELECT SUM(m.mana_rate) FROM mines m WHERE m.user_id = u.id), 0)* Simply doing this ...

3. Update the rank in a MySQL Table    stackoverflow.com

I have the following table structure for a table Player

Table Player {  
Long playerID;  
Long points;  
Long rank;  
}
Assuming that the playerID and the ...

4. StaleObjectStateException on high frequency updates    stackoverflow.com

We're using Hibernate 3.6.3.Final and MySQL 5.5.8 for a web application. The backend is running on a JBoss 6.0.0 Final server. Most of the time things work really well but occasionally ...

5. MySQL update problem    forum.hibernate.org

6. MySQL, repeatable read and the second lost updates problem    forum.hibernate.org

Ok. Since the discussion last night I have been doing some thinking, reading and testing. I also had a glance in HIA. It seems there are two different roots for the problems I am seeing. The first root is that, for historical reasons, we do not use optimistic locking with versioning or timestamps. When the project started, I was the only ...

7. hibernate and other application updating Mysql database simu    forum.hibernate.org

I have developed an application with hibernate2 and mysql-4.1 database. I am not using any second level caching. Now once my web application is started and after that if any new row is inserted in the database directly the hibernate application is unable to get the new row from the database. If i am killing the existing connections of the connection ...

9. Update problem with hibernate and mysql    forum.hibernate.org

Hi every body: I am getting a problem updating a database table called tbl_authors, I am using the DAO classes generated by the MyEclipse IDE, my version of hibernate is 3.1. Could you help me please to find the error I have made ? Here is the piece of code to update that table: TblAuthorsDAO dao = new TblAuthorsDAO(); TblAuthors authorObj ...





10. Database(MYSQL) is not updated    forum.hibernate.org