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
16
votes
1 answer

Hibernate Native vs Hibernate JPA

Hibernate website says there is a native Hibernate API as well as an implementation of JPA. What is the difference between the Native API and JPA implementation? Advantages, disadvantages? I am working on a Spring MVC application, using Tomcat as…
greyfox
  • 6,426
  • 23
  • 68
  • 114
16
votes
3 answers

java persistence native sql not accepting parameters

my query is sql = "SELECT SUM(TOTAL_BYTES_DELIVERED) / SUM(TOTAL_TIME_TAKEN_IN_DELIVERY) FROM MV_MFT_TRANSFER WHERE TRANSFER_INITIATION_TIME > :startDate AND TRANSFER_INITIATION_TIME < :endDate" Query query =…
Vinit Asher
  • 301
  • 1
  • 3
  • 18
15
votes
12 answers

Create C# classes based of MySQL table

Is there anything built into .Net or visual studio that will allow my to create classes based off of a MySql table. I guess I am talking about persistence. I just want the class to be a 1 to 1 mapping of the table. Does anything free exist?
user489041
  • 27,916
  • 55
  • 135
  • 204
15
votes
4 answers

Should the id field of a JPA entity be considered in equals and hashCode?

I hit a problem when writing tests for a database application using JPA2 and EclipseLink: I add some entity to a database, retrieve it later and want to compare it to an instance which has the values I expect to confirm that the addition worked as…
soc
  • 27,983
  • 20
  • 111
  • 215
15
votes
6 answers

Do I need to make a type a POD to persist it with a memory-mapped file?

Pointers cannot be persisted directly to file, because they point to absolute addresses. To address this issue I wrote a relative_ptr template that holds an offset instead of an absolute address. Based on the fact that only trivially copyable types…
R. Martinho Fernandes
  • 228,013
  • 71
  • 433
  • 510
15
votes
4 answers

How to have 2 collections of the same type in JPA?

I've got 2 entities in JPA: Entry and Comment. Entry contains two collections of Comment objects. @Entity public class Entry { ... @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL) @IndexColumn(base = 1, name = "dnr") …
Vilmantas Baranauskas
  • 6,596
  • 3
  • 38
  • 50
15
votes
2 answers

Persisting data in docker's volume for Oracle database

I created volume for storing my application database data - docker volume create dbvolume. Then I launched my docker container with Oracle XE 11g database image and data volume. docker run --name=OracleXE --shm-size=1g -p 1521:1521 -p 8080:8080 -e…
tyomka
  • 459
  • 2
  • 5
  • 14
15
votes
10 answers

What are the lightweight options one has to persist Java objects

What are the lightweight options one has to persist Java objects ? I'm looking for the easiest possible solution. I don't want anything fancy featurewise just something simple that works with reasonnably simple objects (some collections,…
Yann Semet
  • 623
  • 2
  • 5
  • 12
15
votes
1 answer

Synthetic scene stack (history) with React Native Router Flux

Is there any way how to synthetically define scene stack (history) with React Native Router Flux? Let's say I have an app, where the user can naturally navigate from A –> B –> C. I'd like to initiate app on scene C, which has the same history as…
15
votes
1 answer

Delete all data from specific Realm Object Swift

Before i get too far into my question. My goal, which may influence your answers, is to remove Object data if it is no longer in the cloud. So if I have an array ["one", "two", "three"] Then in my server I remove "two" I want my realm to update the…
YichenBman
  • 5,011
  • 8
  • 46
  • 65
15
votes
3 answers

How to stay logged in even when user force quits the app with Ionic / Cordova?

A common piece of functionality for native mobile applications is the ability to stay logged in even if the user closes the application in question (see e.g. the Facebook app on iOS). How can this be achieved for a Cordova / Ionic / PhoneGap app…
Austin York
  • 808
  • 2
  • 10
  • 24
15
votes
3 answers

Which is best data access options available for Play framework with Scala and PostgreSQL?

We have earlier experiences and lots of reusable code/components mostly done using Spring MVC, Hibernate, PostgreSQL database. But recently we are planning to start a new project. We decided to use Play framework with Scala. We are new in Play…
masiboo
  • 4,537
  • 9
  • 75
  • 136
15
votes
4 answers

Android Persist Data After Uninstall

I have to persist 2 strings for my application even after the application is uninstalled. Regarding that the end users don't have SD cards for their devices and they don't have internet connection, how could I persist those 2 strings even after the…
Laura
  • 2,653
  • 7
  • 37
  • 59
15
votes
2 answers

Deep clone of Hibernate entity

I am wondering how can I create a deep copy of a persisted object with all of its association. Let say I have the following model. class Document { String title; String content; Person owner; Set citations; } class Person…
Agustinus Verdy
  • 7,267
  • 6
  • 26
  • 28
15
votes
2 answers

is localStorage on iPad Safari guaranteed to be persistent?

I've seen differences of opinion across the web on this. It has been said that starting with iOS 5.1, local data storage for HTML5 content on the iPad is no longer guaranteed to be persistent, however on Apple's current Safari developer pages…
M. Ryan
  • 6,973
  • 11
  • 52
  • 76