Cezar Apulchro

Ranch Hand
+ Follow
since Feb 13, 2013
Cows and Likes
Cows
Total received
3
In last 30 days
0
Total given
0
Likes
Total received
9
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Cezar Apulchro

Hi,
The solution for is return to good SQL.
Thanks and best regards.
1 day ago
Sorry by delay.
The solution for: "hibernate, WHERE x=? AND y=?" is return to good SQL.
Thanks and best regards.
1 day ago
Hi I can't understand, I read this link sended to me and many  others links in the web and I have created my query based  in this references for example in this https://docs.jboss.org/hibernate/orm/3.3/reference/en/html/queryhql.html are examples of update:

WhereI am wrong, give me an way.
Thanks.
1 week ago
I receiving an error of duplicate identifier when execute the query. I trying to update columns of table using two identifiers but I am receiving of duplicate. Where are the error of my query?
Query to update:

Hibernate:

Log:

Why hibernate aren't getting the dataconsulta parameter?
Thanks.
1 week ago
Hi, sorry by delay, in the beginning of this contact I showed two constructors prontuario and data_consulta, this configuration was to try to generate an hql with two parameters to update my table. What I need is to update my table whre prontuario is equal to ? and dataconsulta is equal to ?. I have created a method to do this but haven't work then I opened this contact. Now I have returned my method to try again but error are the same. Below my method and the error.
Method:

Log error:

Thanks.
2 weeks ago
My Bean:

My HibernateUtil:

My method to save:

Log error:

I can’t any idea to solve thiss problem.
Thanks in advance.
2 weeks ago
After change my hibernate.cfg.xml, saveOrUpdate method, HibernateUtil and bean class I am receiving a new error " Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.itcsystems.beans.Bean_PreNatal6#612.123.123-00] ".
New hibernate.cfg.xml:

HibernateUtil:

Bean class:

Class of saveOrUpdate:

Error log:

Thanks.
4 weeks ago
Hi mate, I changed how you told me but my problem was not to insert but to update, for this I am using saveOrUpdate hibernate method but I am receiving an error.
Class:

Log error:

Thanks.
1 month ago
Hi sorry by delay, I was having serious problems. I have six servlet to six pages, this is because I have many radio buttons. All servlet have the same procedure to save  the record, below is an piece of method to insert records.

I'm using save or update to records that was already writed in my db that have the same prontuario and dtconsulta equals. The method above works fine in all six servlet, what I want  is change to  save or update method, defined in the opened contact. I this case I don't have DOA I have an persistence file that shown at beginning of this contact.
Class to access DB:

Thanks by help.
1 month ago
Are there some other place to see if db_demonstracao is defined?
1 month ago
I don't understand, I created the db_demonstracao only to do some tests and then I deleted. I don't have reference to this db in my persistence file and in my hibernate.cfg.xml too, why this error occur? I clean and build the project many times, where this reference my be occur?
2 months ago
Hi, I'm trying to use Hibernate saveorupdate but I'm receiving an error. I have a servlet class that I use persistence file to insert records in my DB and work without any problem. For the saveOrUpdate I  created hibernate.cfg.xml.
My hibernate.cfg.xml:

My servlet:

Log error:

Thanks in advance.
2 months ago
After change my pom to jaxb-api 2.3.1 indicated in your response, problem still the same.
Pom:

Error log:

Thanks.