HSQL « Update « JPA Q&A





1. Hibernate, HSQL, and Update w/ Limits    stackoverflow.com

Is it possible to limit the number of rows that are updated using Hibernate/HQL? For instance:

Query q = em.createQuery("UPDATE MyObj o Set o.prop = :prop");
q.setParameter("prop", "foo");
q.setMaxResults(myLimit);

int res = q.executeUpdate();
if (res ...

2. Internal HSQL database complains about privileges    stackoverflow.com

I'm setting up a standalone Java service with an in-process, in-memory HSQL database. Persistence.xml

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
 version="2.0">

 <persistence-unit name="manager">

 <class>tr.silvercar.data.entities.User</class>
 <properties>
 <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver" />
 <property name="javax.persistence.jdbc.user" value="sa" />
 <property ...

3. JPQL/HSQL update with a limit?    stackoverflow.com

I want to update a @Version like column as an application managed pessimistic lock. These are the steps I want to take:

  1. Get the next number of the sequence
  2. Select the first 50 ...

4. JDBCCacheLoader/HSQL : Error Failed to update node for fqn    forum.hibernate.org

Hi, I have a JDBCCacheLoader where I store several nodes with the SAME key (FQN). The execution is going well until I have the following error : JDBCCacheLoader - Failed to update node for fqn /Stringindex/secondaryTradeId/Seconsubnumber: File input/output errorerror java.io.IOException closing file - file ./workingdata/db.data in statement [update jbosscache set node=? where fqn=?] java.sql.SQLException: File input/output errorerror java.io.IOException closing file - ...