hsqldb « Update « JPA Q&A





1. Persistence unit is not persistent    stackoverflow.com

I need persistence unit that creates embedded database which stays persistent after closing EntityManager. This is my PU:

<persistence-unit name="hello-jpa" transaction-type="RESOURCE_LOCAL">
  <class>hello.jpa.User</class>
  <properties>
    <property name="hibernate.show_sql" value="true"/>
   ...

2. HSQLDB and Hibernate/JPA - not persisting to disk?    stackoverflow.com

Something of an novice with HSQL and Hibernate...

em.getTransaction().begin();
for (Activity theActivity : activities) {
  em.persist(theActivity);
}
em.getTransaction().commit();
em.close();
followed by...
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
System.out.println("QUERY:: "
    + em.createQuery("SELECT COUNT(*) FROM " + Activity.class.getName()).getSingleResult()
  ...

3. Persist multiple objects at one go    stackoverflow.com

My current project uses JPA and HSQLDB. I would like to persist multiple related objcts at one go, is that by any means possible in JPA? Ex: Suppose there are two entities like ...

4. saveOrUpdate + HSQLDB = timing problem?    forum.hibernate.org

hello, I have a class Project and a class SequenceList, with a OneToMany relation in between. When I call session.saveOrUpdate(project) and immediately afterwards close the application, the instances on the many side are not updated (deleted or inserted). Do I need to shut down HSQLDB beyond what hibernate does? I am using: Session session = sessionFactory.openSession(); Transaction tx = session.beginTransaction(); session.saveOrUpdate(prj); ...

5. HSQLDB file persistence strange behavior    forum.hibernate.org

Dear everyone. I have code similar to this pseudocode: Get session 1. Create transaction 1. Create an entity. Commit transaction 1. Close session 1. Get session 2. Create transaction 2. Fetch the number of entities. Commit transaction 2. Close session 2. Get session 3. Create transaction 3. Create an entity. Commit transaction 3. Close session 3. It works as expected. However, ...

6. Problems Saving With HSQLDB (Hypersonic)    forum.hibernate.org

Newbie Joined: Tue Feb 01, 2005 11:36 am Posts: 5 Hi, I have an app that runs fine with Hibernate with MySql 4.1, however when I attempt to perform a simple save operation with Hypersonic SQL (HSQLDB) the save does not work. The details are: 1. I am using "increment" for the generator 2. Database version is Hypersonic 1.7.3 3. Hibernate ...

7. Tables, records not getting created/updated in HSQLDB    forum.hibernate.org

I'm trying to execute the tutorials and sample applications of hibernate. Things are getting executed smoothly with no major exceptions/errors. Get to see SQL statements of creating tables, inserting rows etc. too. The executed applications also creates .lck, script, .log etc. files too. However, when connected to database using "DatabaseManager", I don't get to see the created tables and/or inserted rows ...

8. Another Lost Newbie - HSQLDB not saving    forum.hibernate.org

Newbie Joined: Mon Jul 24, 2006 8:55 pm Posts: 6 I am using some sample apps I downloaded. The code compiles and runs without any exceptions, but no data is saved. I am using: Windows XP Eclipse 3.2 Hibernate 3.1.1 HSQLDB 1.8 The java code ========= Code: package actions; import java.util.Iterator; import java.util.List; import org.apache.log4j.Logger; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction; ...

9. Hibernate does not save to HSQLDB    forum.hibernate.org





10. getting problem hsqldb update    forum.hibernate.org

12. Hibernate and hsqldb - data is not always saved to file    forum.hibernate.org

Newbie Joined: Mon Sep 08, 2008 4:04 am Posts: 1 Hi, I'm having some trouble using hibernate and hsqldb hopefully someone may have a clue what the problem is :). The problem is that when I add something to the database, it looks like it's saved(I can run select and get the data) but when I quit the application and then ...

13. Hibernate to hsqldb save problem    forum.hibernate.org

Newbie Joined: Sun Sep 13, 2009 10:00 am Posts: 1 Hi there, I am trying to implement a simple application which is creating a contact and just saving it to the database (HsqlDB). This is what i have done ; Code: package com.hibproject.app; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; import ap.Contact; public class Test { public ...