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
23
votes
6 answers

How to save data in iOS

I'm making a game and when I close the app (close at multitask manager), all my data is gone! So, My question is very simple: How do I save the data?
CenoX
  • 306
  • 1
  • 2
  • 12
23
votes
4 answers

javax.persistence.Entitymanager: remove() method

Does remove(Object entity) method of EntityManager work only on those objects got from find() method? I have following code snippet: public void deletePerson() { EntityManager em = getEntityManager(); Person p = new Person("x", "y", 200); …
sachinpkale
  • 989
  • 3
  • 14
  • 35
22
votes
5 answers

Converting from String to custom Object for Spring MVC form Data binding?

I am using Spring MVC's SimpleFormController in conjunction with Spring MVC's form JTL to create a form to edit a Generic object. On my form I have a drop down where the user can specify a server via a drop down.
James McMahon
  • 48,506
  • 64
  • 207
  • 283
22
votes
3 answers

React Native - Firebase auth persistence not working

Firebase auth does not persist logged in user and everytime I refresh or reopen app I have to sign in again. I have tried setting persistence to local and the callback does verify its set but the persistence is still no working For setting…
22
votes
3 answers

Persisting set of Enums in a many-to-many unidirectional mapping

I'm using Hibernate 3.5.2-FINAL with annotations to specify my persistence mappings. I'm struggling with modelling a relationship between an Application and a set of Platforms. Each application is available for a set of platforms. From all the…
gnuf
  • 2,722
  • 1
  • 25
  • 32
22
votes
2 answers

Is it possible to remove child from collection and resolve issues on SaveChanges?

We are using Entity Framework Code First with Foreign Key relationships. We investigating on ways on handling removing objects from an entities ICollection in our application. When we have an entity with child relationships we can add objects…
21
votes
3 answers

Is there a way to get all managed entities from an EntityManager

I'm setting up a basic test data util and want to keep track of all the data that the EntityManager handles. Rather than just having a bunch of lists for each entity is there a way to grab everything being managed by the EntityManager in one fell…
Th3sandm4n
  • 809
  • 4
  • 13
  • 23
21
votes
3 answers

Persistent data structures in c++

Are there any persistent data structures implementations in c++ similar to those in clojure?
Miguel
  • 211
  • 2
  • 3
21
votes
4 answers

Delete then create records are causing a duplicate key violation with Spring Data JPA

So, I have this scenario where I need to take a header record, delete the details for it, then re-create the details in a different way. Updating the details would be way too much trouble. I basically have: @Transactional public void create(Integer…
cbmeeks
  • 11,248
  • 22
  • 85
  • 136
21
votes
3 answers

Update an existing JobDataMap

I have a Quartz job that has already been scheduled. I want to update the JobDataMap associated with it. If I get a JobDataMap with JobDataMap jobDataMap = scheduler.getJobDetail(....).getJobDataMap(), is that map "live"? ie. if I change it, will…
Paul Tomblin
  • 179,021
  • 58
  • 319
  • 408
21
votes
2 answers

Why does JPA require a no-arg constructor for domain objects?

Why does JPA require a no-arg constructor for domain objects? I am using eclipselink and just got this exception during deployment. Exception [EclipseLink-63] (Eclipse Persistence Services-1.1.0.r3639-SNAPSHOT):…
Jacques René Mesrine
  • 46,127
  • 27
  • 66
  • 104
21
votes
3 answers

YAML serialization library for C++?

YAML seems like a great format for configuration files & data binding persistent objects in human-readable form... Is there a C++ library that handles YAML? Does Boost::Serialization have plans for a YAML option? EDIT: I would prefer an OO library.
oz10
  • 153,307
  • 27
  • 93
  • 128
21
votes
3 answers

Long versus Integer for the id field of java entities

Jpa entity generator assigns Integer type to the id fields of my entities. The corresponding attribute/column in my DB is of type serial ( yep postgres). I would also assign the integer type to my entities id fields. But i have seen usage of Long…
osh
  • 1,191
  • 4
  • 13
  • 21
21
votes
1 answer

When should I use the various storage mechanisms in iOS?

I thought this would be covered already, but my search returned nothing of relevance. I am aware that there is NSUserDefaults, Core Data, object archiving, raw SQLite, plists, and of course, storage by web servers. What is unclear and somewhat hazy…
user
  • 3,388
  • 7
  • 33
  • 67
21
votes
6 answers

How solve javax.persistence.EntityNotFoundException with JPA (not by using @NotFound)

We are using JPA to load some stuff from a database. Some entities may have optional relationships between them, e.g. @Entity public class First { .... @OneToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH,…
Alex Ntousias
  • 8,962
  • 8
  • 39
  • 47