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
21
votes
2 answers

Persistence.xml not correctly configured

I'm not able to get this persistence file correct... I do not find any more information in the book that I use as a guide. I'm using a MySQL database.
mmvie
  • 2,571
  • 7
  • 24
  • 39
20
votes
3 answers

Data persistence in Smalltalk / Seaside

I've been spending some time lately getting acquainted with Smalltalk and Seaside. I'm coming from the Java EE world and as you can imagine it's been challenging getting my mind around some of the Smalltalk concepts. :) At the moment I'm trying to…
Justin
  • 6,031
  • 11
  • 48
  • 82
20
votes
6 answers

A RESTful persistence solution usable with backbone.js... in PHP?

I'll preface this with saying that I'm a crappy programmer, I'm sure that what I want to do could be done in 10 lines of node or Rails or something else, but PHP is what I have available. So, I'm hoping to find a simple PHP library which wraps the…
user18015
20
votes
7 answers

object persistence in php

I am fairly new to web programming, I have mainly used java to create desktop applications in the past. I'm trying to figure out how to create persistent objects in php. Maybe persistent isn't the right word, I don't want the object to be unique to…
mattgoody
  • 315
  • 1
  • 2
  • 6
20
votes
3 answers

Best way to save data in Unity game

I was wondering... What's the best way to save data in Unity games. JSONs? If so, how? Thanks
messedupsongguy
  • 319
  • 2
  • 4
  • 10
20
votes
3 answers

How to add new user to Spring Security at runtime

I save users in a DB table via Hibernate and I am using Spring Security to authenticate: import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.*; import…
20
votes
3 answers

Does Consul persist the Key Value store?

I'm evaluating a few distributed key-value stores, and etcd and Consul looks both very promising. I am interested in service discovery, health monitoring and config services. I like the extra features that Consul gives, but I cannot determine…
Pieter
  • 2,143
  • 3
  • 14
  • 13
20
votes
3 answers

What data (if any) persists across web-requests in Ruby on Rails?

I decided to use the singleton design pattern while creating a view helper class. This got me thinking; will the singleton instance survive across requests? This led to another question, Which variables (if any) survive across web requests and…
Daniel Beardsley
  • 19,907
  • 21
  • 66
  • 79
20
votes
4 answers

Ways of unit testing data access layer

I have be trying to look for an effective way in unit testing my data access layer in C#. I'm primary a Java developer and have only used C# for about 6 months, in the past i've used a library called DBUnit to test against a known state database. I…
wenic
  • 1,169
  • 2
  • 14
  • 23
20
votes
4 answers

What gives Smalltalk the ability to do image persistence, and why can't languages like Ruby/Python serialize themselves?

In smalltalk, you're able to save the state of the world into an image file. I assume this has to do with Smalltalk's ability to "serialize" itself -- that is, objects can produce their own source code. 1) Is this an accurate understanding? 2) What…
dave paola
  • 1,815
  • 3
  • 16
  • 27
20
votes
5 answers

how to make a composite primary key (java persistence annotation)

How to make it so that the table user_roles defines the two columns (userID, roleID) as a composite primary key. should be easy, just can't remember/find. In user entity: @ManyToMany(fetch = FetchType.LAZY) @JoinTable(name = "user_roles") public…
b0x0rz
  • 3,953
  • 8
  • 52
  • 82
20
votes
4 answers

Is there a way to change the JPA fetch type on a method?

Is there a way to change the JPA fetch type on a single method without editing the entity object? I have a shared ORM layer consisting of JPA entity classes. This ORM layer is accessed by two DAO layers. One DAO needs lazy fetching, as it is for my…
James McMahon
  • 48,506
  • 64
  • 207
  • 283
19
votes
2 answers

Two Persistence Unit in one Persistence.xml

We created some libraries that all our projects will use, this libraries will provide the basic functionality of all our systems (login, some manage, etc). But the application itself could use another database. What we did was to create the…
zkropotkine
  • 337
  • 2
  • 5
  • 12
19
votes
5 answers

How to do proper database testing (TDD) on Rails 3 using MongoDB and Mongoid

How would go about writing proper unit testing (and integration testing for that matter) using MongoDB through Mongoid on Rails ? I am asking, because to the opposite of using let's say SQLite3, even when running tests, everything I do does…
Alex
  • 4,367
  • 5
  • 29
  • 45
19
votes
4 answers

Spring, Hibernate & JPA: Calling persist on entitymanager does not seem to commit to database

I'm trying to setup Spring using Hibernate and JPA, but when trying to persist an object, nothing seems to be added to the database. Am using the following:
Ruben Vermeersch
  • 1,933
  • 1
  • 18
  • 27