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

Hibernate default values during runtime - best practice

Hi stackoverflow coders, I have an app (since the iPhone its really chic to use this word :-)) persisting its data with Hibernate. The database scheme contains several date fields which can be NULL. I configured Hibernate then to fetch the field…
user212926
2
votes
3 answers

Large list of dictionaries as a lookup table on disk

I have a very large list of dictionaries (GBs in size) obtained from an API. I would like to use it as a lookup table for other functions. There are several object persistence methods in Python, but what would you recommend for storing lists of…
dust
  • 502
  • 6
  • 19
2
votes
2 answers

Persisting non-entity class that extends an entity (jpa) - example?

The JPA tutorial states that one can have a non-entity that extends entity class: Entities may extend both entity and non-entity classes, and non-entity classes may extend entity classes. - …
Mike Minicki
  • 8,216
  • 11
  • 39
  • 43
2
votes
2 answers

Cache region configurations in persistence.xml

According to this documentation, when using Infinispan with Hibernate it is possible to define multiple cache regions and configure them individually. I'm using WildFly 8.0, which uses Infinispan as a default 2LC provider for Hibernate. So here's my…
tb0171
  • 21
  • 1
  • 3
2
votes
0 answers

Ignoring persistence.xml -> EntityManager is null

when I try to inject the EntityManager, it is always null without throwing an exception. It doesn't matter where the persistence.xml is placed, if it is empty or missing; this file seems completly to be ignored. My persistence.xml is placed in…
Tim
  • 66
  • 4
2
votes
1 answer

Creating an efficient file-based index that can be incrementally updated

As a research project I'm currently writing a document-oriented database from scratch in Python. Like MongoDB, the database supports the creation of indexes on arbitrary document keys. These indexes are currently implemented using two simple…
ThePhysicist
  • 1,822
  • 16
  • 21
2
votes
1 answer

Where is the call to persistence in the domain driven design

I know there is a lot of similar information online and also on stackoverflow, but I'm still not sure where to put the logic of persistence into my project. I don't yet use any ORM, IoC and UnitOfWork concepts (too much new stuff for a beginner in…
sventevit
  • 4,766
  • 10
  • 57
  • 89
2
votes
1 answer

Is Entity Framework also persistance layer?

OK. I know that Entity Framework is ORM. We use it for mapping data from database to object model, and from objects to relational data. But where it fits in a context of persistance layer? Can we say that persistance layer is also Entity Framework?
user2457382
  • 329
  • 4
  • 14
2
votes
1 answer

jdbc/_default on glassfish 4

I am migrating an existing application from glassfish 3.1.2 to glassfish 4 This is my persistence.xml
2
votes
1 answer

Keep all entities in one EJB module

There are few applications that use java persistence. Each application has its own set of entities that represents the same tables in DB. For instance, application A has entities for Table1, Table2, etc; at the same time, application B also has…
a1ex07
  • 36,826
  • 12
  • 90
  • 103
2
votes
2 answers

Hibernate original state in MergeEventListener

I am trying to create a simple change log for inserts, deletes, and changes to my tables. I am using hibernate's HibernateEventListener class along with the SaveOrUpdateEventListener and the DeleteEventListener. This works great for saves and…
blong824
  • 3,920
  • 14
  • 54
  • 75
2
votes
2 answers

Python shelve OutOfMemory error

I have some data stored in a DB that I want to process. DB access is painfully slow, so I decided to load all data in a dictionary before any processing. However, due to the huge size of the data stored, I get an out of memory error (I see more than…
fsm
  • 407
  • 2
  • 7
  • 19
2
votes
0 answers

MVC 4 Persistent Cookie is not created, it redirects me to login page.(When FormsAuthentication.SetAuthCookie(UserName, persistentCookie: TRUE)

Action in the controller [HttpPost] public ActionResult Login(Models.User user, string returnUrl) { if (ModelState.IsValid) { if (user.IsValid(user.UserName, user.Password)) { …
2
votes
1 answer

Java JPA: How to check if an Entity is out of sync (or 'dirty') or be notified of changes to the dirty state

Situation I have a web application which uses JPA as a link to the underlying database. When the user modifies entities through the UI, these changes are not immediately saved to the database. Question How can I check if an Entity and the underlying…
tbacker
  • 772
  • 7
  • 22
2
votes
1 answer

JPA: Find all articles that have a common set of tags

I have the following entities: @Entity public class Article{ @Id private String id; @ManyToMany(cascade = CascadeType.PERSIST) private Set tags; //non-relevant code } @Entity public class Tag{ @Id private String…
Svetlin Zarev
  • 14,713
  • 4
  • 53
  • 82