Questions tagged [persistence]

Persistence in computer programming refers to the capability of saving data outside the application memory.

Persistence is the capability of saving data outside of application memory, and of retrieving it later for further processing.

Typically data can be stored into the file system, in flat files or in a database. But persistence can also involve sending data to external applications.

Often persistence is related to .

References.

5099 questions
27
votes
4 answers

Looking for a disk-based redis-like database

I am currently using Redis for my app, and its features are really excellent for my application (lists, sets, sorted sets etc.). My application relies heavily on sorted sets, lists, sets. And their related functions (push to a list, get list, union…
Pacemaker
  • 1,117
  • 2
  • 17
  • 36
27
votes
2 answers

javax.persistence.PersistenceException: org.hibernate.PersistentObjectException: detached entity passed to persist

Using JPA with Hibernate, I got an exception when running the following code. The first time I run it, everything goes fine and the data is inserted in the database. The second time, when the data should be updated, it fails: @AdminTx public void…
Alexis Dufrenoy
  • 11,784
  • 12
  • 82
  • 124
26
votes
3 answers

Java: JOOQ persistence framework performance and feed back

I've stumbled over a nice SQL builder framework, called JOOQ. BTW, in Russian JOOQ sounds like noun meaning "bug" (as an insect), "beetle" ;) If you have any feedback about JOOQ, it's performance and such, please share. Links to blogs about JOOQ…
Vladislav Rastrusny
  • 29,378
  • 23
  • 95
  • 156
26
votes
2 answers

How reliable is Firestore as an offline persistence mechanism?

I am currently using Firebase Firestore as a primary backend that retrieves data from a variety of sources. I also use Android's Room for my mobile backend. When the phone receives data it is stored in the Room database in the event the user will…
26
votes
5 answers

How mature is Ebean or Siena?

In the last time I heard a lot of complaining about Hibernate. And indeed I have some painful experiences with Hibernate too. So I read about Ebean and Siena. Both have interesting approaches. Unfortunately, database access layers are very easy to…
niels
  • 7,321
  • 2
  • 38
  • 58
26
votes
6 answers

Save entities to a REST API instead of DB using Doctrine 2

This is related to my other question: Persisting entities using a REST API. For a project in Symfony2 I need to be able to persist entities using an remote (third-party) RESTful API. I also want to be able to retrieve entities with data from that…
Nic Wortel
  • 11,155
  • 6
  • 60
  • 79
26
votes
11 answers

ORM/Persistence layer Advice

I'm starting a new project and I'm looking around for either a very good ORM or for a non-SQL-based persistence layer. For this project, I really don't care on how the data is persisted, as long as it can be queried and stored with a reasonable…
em70
  • 6,088
  • 6
  • 48
  • 80
26
votes
6 answers

*large* python dictionary with persistence storage for quick look-ups

I have a 400 million lines of unique key-value info that I would like to be available for quick look ups in a script. I am wondering what would be a slick way of doing this. I did consider the following but not sure if there is a way to disk map the…
Abhi
  • 6,075
  • 10
  • 41
  • 55
25
votes
4 answers

NSCoding VS Core data

I've been searching for an article that explains NSCoding (NSKeyedArchiver...) advantages and disadvantages over use of CoreData (SQLite....). There's a lot of options, I can implement my own custom binary reader/writer, or use plists/xml/json...…
LolaRun
  • 5,526
  • 6
  • 33
  • 45
25
votes
4 answers

A JTA EntityManager cannot use getTransaction()

How can I use the following code in my non-ejb application. The code works. @Override public void saveItems(Collection items) { synchronized (em) { EntityTransaction tx = em.getTransaction(); try { tx.begin(); …
auser
  • 6,307
  • 13
  • 41
  • 63
24
votes
1 answer

Using HSQL in-memory database as JPA datasource

I have an in-memory data source: java.sql.Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:testdb", "sa", ""); emf = Persistence.createEntityManagerFactory("manager"); But now I'm stuck. I want to use it as a JPA data source…
Bart van Heukelom
  • 43,244
  • 59
  • 186
  • 301
23
votes
10 answers

jpa error uses a non-entity [class ch.printsoft.mailhouse.usermgr.entity.Department] as target entity in the relationship attribute

I try to persist my Department and Mandator classes to hsqhldb but it gives this error. Exception Description: [class ch.printsoft.mailhouse.usermgr.entity.Mandator] uses a non-entity [class ch.printsoft.mailhouse.usermgr.entity.Department] as…
Miguel Iglesias
  • 379
  • 2
  • 3
  • 6
23
votes
8 answers

Persisting data suited for enums

Most projects have some sort of data that are essentially static between releases and well-suited for use as an enum, like statuses, transaction types, error codes, etc. For example's sake, I'll just use a common status enum: public enum Status { …
Rob Hruska
  • 118,520
  • 32
  • 167
  • 192
23
votes
6 answers

spring hibernate .. H2 database - schema not found

I am trying to persist some data into the H2 database. but I keep getting the schema not found error message as below. Jan 02, 2014 8:55:51 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library…
user2180794
  • 1,425
  • 7
  • 27
  • 50
23
votes
5 answers

Can not find the declaration of element 'persistence'

Have put the persistence.xml in the classpath of the project in eclipse because before the error was that the file was not found. Now gives this error: Caused by: javax.persistence.PersistenceException: Invalid persistence.xml. Error parsing XML…
csf
  • 961
  • 3
  • 13
  • 28