Most voted "persistence" questions
None
Learn more…54 questions
Sort by count of
-
10
votes2
answers6254
viewsWhat is data persistence?
What would that term be? I always see around and can’t decipher!
-
5
votes3
answers1598
viewsHibernate vs Eclipselink
Both persistence frameworks implement JPA. 1 - There is a difference between the two? 2 - Which is the best in performance? 3 - As the two implement the same specification, after developing a…
-
5
votes1
answer705
views"No Persistence Provider for Entitymanager" for Hibernate 5.x
Well, you have to update the version of hibernate that was already I want to implement in my project to avoid bugs of the past version, but I’m having difficulty making the persistence in the new…
-
4
votes2
answers91
viewsChecking whether data persisted successfully
What would be the best way to get one bool indicating whether the method Add() and then SaveChanges() was successfully performed? Am I trying like this? Is that right? public bool…
-
4
votes1
answer419
viewsData persistence levels in android applications
I’m studying persistence for android, however I’m having difficulty understanding the levels of persistence they make in applications. I saw that there are 5 types: onSavedIntanceState…
-
3
votes1
answer260
viewsIncorrect information when loading bigdecimal entity
I have a table, that one of your columns is a Numeric(25,10) that will be shown the rates. But there are records that will be zeroed ( 0.0000000000 ) In my entity you own that fee, as a Bigdecimal.…
-
3
votes1
answer1778
viewsObject persisting problem with @Manytoone - JPA/Hibernate
I have the following problem: I can save/persist the two objects below, but JPA is not linking the ID of the DeclaracaoImportacao in the column ID class/entity . Follows code @Entity @Table (name =…
-
2
votes1
answer530
viewsPersistence.xml and Eclipselink error in glassfish
Hello guys I’m with this problem after I migrated the project to another machine, I’m using Glassfish with Eclipselink in the database using Postgres 9.4 if anyone ever came across this error could…
-
2
votes1
answer49
viewsPersistence with Doctrine does not take Object data to Insert
I started a new PHP project where every database has tables and their columns with different class names and attributes. With the intention of winning in the productivity of not being renamed I…
-
2
votes1
answer785
viewsComposite key problems in JPA
Hi, I’m a little young with JPA and I’m having problems with a composite PK. Follows the class Aluno: @Entity @Table(name = "Aluno") public class Aluno { @Id private String ra; @Column(length = 50,…
-
2
votes3
answers103
viewsI’m not able to log data into the database
I’m a beginner in java and I have the following problem. On the state registration screen, I have a country selectOneMenu, and two fields for name and acronym. When I go to save in the database I…
-
2
votes0
answers21
viewsRestore data
I am creating an app that contains a form and when the user clicks on an address search field it is taken to another Activity and then this address is retrieved in a textView in the initial Activity…
-
2
votes1
answer365
viewsWhat is Optimistic JPA Locking Field
What is and what is the "Optimistic Locking Field" of JPA? I noticed that there is this option for Eclipse Link and Hibernate and this function is enabled when annotating a version attribute within…
-
1
votes1
answer752
views@Size, using Hibernate Validator, accuses error in value that should pass validation
I have a Java SE application where I can’t use the @size annotation. This annotation is worked out by the org.hibernate.Validator.Size. There is a user field in the model where I do so: @Size(min =…
-
1
votes1
answer485
viewsIs Websql the only local storage form in phonegap/Ordova?
Outside the database created by "browser", what other forms of data persistence we have on android with phonegap?
-
1
votes1
answer332
viewsjava.lang.Nosuchmethoderror: org.hibernate.cfg.Environment.verifyProperties(Ljava/util/Map;)V
Work in a Java project and when changing the machine I had to inform the libraries of the project again, but when compiling this generating an error in the output. Exit: Exception in thread "main"…
-
1
votes1
answer1248
viewsJPA(2.1) dependency on POM.xml file
I did a normal Javase project with JPA for the persistence part, and it worked, the project consists only of an entity that is persisted in the bank and nothing else. I used the following libraries:…
-
1
votes0
answers111
viewsPlay Framework JPA postgres
Hello, I’m learning to work with Play! framework and I am having difficulty integrating my application with the Postgres bank, using Hibernate. The application does not use persistence, the bank is…
-
1
votes0
answers63
viewsSimple error trying to use Hibernate + JPA
Good morning, I’m starting to create a simple register with Hibernate. I have the following classes Java link. http://pastebin.com/vgDn9U3Y Hibernate.cfg.xml http://pastebin.com/06kA87Lv Form action…
-
1
votes1
answer235
viewsData persistence using Event sourcing
Recently I heard about Event Soucring in a video by Greg Young and I found an idea that seems to be very useful in various systems where having a data history is important. What I understood is that…
-
1
votes1
answer365
viewsHow to read properties file to configure JPA?
I have a file . properties to configure my project’s database. However, I cannot read the file. Someone gives a force? Entitymanagerproducer @ApplicationScoped public class EntityManagerProducer {…
-
1
votes2
answers703
viewsHow to return the entity number of a table using JPA and the COUNT function?
I am using the Eclipselink implementation and cannot solve the following query that must be wrong: Query query = em.createQuery("SELECT e , COUNT(*) FROM Empregado e"); Integer resultado = (Integer)…
-
1
votes0
answers190
viewsCreate category and subcategory persistence with jquery
Today I have a persistence problem in the select field of categories and subcategories I made with jquery with the help of a video, since I’m not very good with jquery. I have the following jquery…
-
1
votes1
answer55
viewsJakartaee vs Spring vs Java SE with JPA
Speak for me, baby? Reading the Oracle documentation I found the following excerpt: @Persistencecontext protected Entitymanager entityManager; Hence the EJB container will inject a standard Unit…
-
1
votes0
answers142
viewsNo Persistence Provider for Entitymanager named sample
When I use the application in Eclipse, with tomcat8 it runs smoothly, then I run the package using Maven and deploy it in tomcat8 outside the eclipse and get the error below. Jars are coming from…
-
1
votes1
answer227
viewsHow to add Firebase data to a Recycleview and show on Android screen with Kotlin?
How to bring this fire list to the cel screen? val store = Shop("Fique Linda", "Temos o melhor!", R.drawable.storefiquelinda) val dataBase = FirebaseDatabase.getInstance() val myRef =…
-
1
votes0
answers88
viewsRollback to persist entity with Hibernate
I have an entity Product: @Entity @Table(name = "produto") public class Produto implements Serializable { private static final long serialVersionUID = 1L; private Long id; private Cliente cliente;…
-
1
votes1
answer153
viewsError doing Many to Many interface with Spring Boot
I’m trying to make a phone call Many-to-Many between classes usuario and permissao, using the documentation of Hibernate as reference . But when I try to generate a class JSON file usuario the…
-
1
votes1
answer53
viewsDo not re-enter an existing login user
I have a JPA problem with Java. I built a login system, using a self-generated ID, but every time I run the program it creates another user in the database, with a different id but same credentials.…
-
1
votes1
answer122
viewsThe Annotation @Persistencecontext is disallowed for this Location
I’m getting the message "The Annotation @Persistencecontext is disallowed for this Location" when I try to put this annotation in the code, someone knows how I can fix it? @Stateless public class…
-
1
votes1
answer694
viewsCannot read Property 'query' of Undefined
The mistake Cannot read property 'query' of undefined is reported when trying to save data to the database. However, the Property query works for getNews. Ex: function NewsDAO(database){…
-
1
votes2
answers196
viewsFiredac only records when I close the connection with the bank
I wonder if anyone’s been through this problem. I use Firedac with Firebird in Rad Studio 10.2 Tokyo, but I have tried several ways to record the transaction, but the record does not persist in the…
-
0
votes2
answers1232
viewsHow to change persistence.xml file settings through an external file?
I wanted to know how to change the configuration of the persistence.xml file through an external file. I am using JSF + JPA. I want to do this so as not to leave this setting stuck in the source…
-
0
votes1
answer129
viewsHibernate with dynamic table names
Good Morning/Afternoon/Evening Staff! in a scenario where a comic table must have a concatenated name and dates as this would look with Hibernate given that the base name is annotated in the model.…
-
0
votes1
answer82
viewsHibernate/SQL Average of a table with multiple relationships
I have the following tables TABLE 1 id value table 2 TABELA2 id Tabela3 TABELA3 id And with this, I would like to average TABLE 1, with WHERE in the parameters TABLE 3 with Hibernate/persistence,…
-
0
votes1
answer700
viewsHow can I get an Entitymanager from an org.hibernate.Session
I work with Hibernate using Session. public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); // A SessionFactory is set up once for an application…
-
0
votes0
answers87
viewsGoogoostatementcache - Multiply Prepared statement!
Hello, when changing an object and saving I am having problems of slowness and in a few moments even totally locks my application. By persisting is returning me only this information, but I could…
-
0
votes0
answers438
viewsAccess local database with Electron?
When developing a desktop application, you may need to access the local database. Electron, allows to use HTML, CSS and Javascript. HTML and CSS is not possible and Javascript is not recommended.…
-
0
votes1
answer37
viewsI need to modify the action taken when closing a Jframe
I am developing an application with persistence in Java for a college job, and I need the system to automatically save the data when closing the application (with a ready function provided by the…
-
0
votes0
answers59
viewsDoes Jparepository Saveall maintain the state of persistence in memory?
Jparepository offers us options save and saveAndFlush to persist the objects to the database. Unlike saveAndFlush, the save keeps the persistence state in memory, which ends up generating memory…
-
0
votes1
answer195
viewsHow to recover the status of a button with Sharedpreferences on Android/Kotlin on multiple screens?
Friends, I have two activitys, at first I have a sound button on and off and at second I have some buttons like a name button A and when clicked it should know what the state of the sound button is…
-
0
votes1
answer61
viewsHow to use Sharedpreferences access modes?
When we use Sharedpreferences, we have for example: SharedPreferences prefencias = getSharedPreferences(nome, modo); Where "name" is the name of the preference and "mode" indicates the permission…
-
0
votes2
answers58
viewsProblem with persistence with spring
The mistake: java.lang.Illegalargumentexception: Not an Entity: class br.com.api.entities.Characters My Class package br.com.api.entities; import java.time.LocalDateTime; import…
-
0
votes0
answers11
viewsTable is not generated via jpa
I am studying JSF through the book "The definitive guide to jsf in java ee 8", but I made an error I reviewed the code many times and did not find the origin of this error : Exception…
-
0
votes0
answers560
viewsJPA with "Detached Entity passed to persist:"
Hello, I have a problem because I use an intermediate table to save the Ids of other 2 tables. Except that the way that Mapeei, I can’t save in this table because apparently JPA understands that I…
-
0
votes1
answer111
viewsError in persistence.xml when connecting oracle database
I have this file to perform oracle database persistence. However do not connect! <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence"…
-
0
votes1
answer116
viewsJPA read-only database
Good morning, I have an unusual case for me. A database where I need to make selects and update in 1 or 2 columns of a table. I would like to know how to configure my persistence.xml Persistence.xml…
-
0
votes1
answer38
viewsDoubt regarding Join with multiple tables
I have a sale class and the same receives several products(manyToOne) and customer (oneToMany) and would like to join all in a Join to make a report with only the desired information. I tried to…
-
0
votes1
answer695
viewsAndroid: How to create an external Sqlite database dynamically?
I have researched this thoroughly and all the examples I have found and tested have not worked. To make the code more organized I would like to do this using the Openhelper class but I have already…
-
0
votes0
answers97
viewsI can’t solve No Persistence Provider for Entitymanager named
I searched on various forums, made all the suggestions I could find and still could not solve. I don’t know if it’s because of the archetype of the design, but it’s the pattern I’m using. Can…