aspose file tools
The moose likes Object Relational Mapping and the fly likes CURD operations are not working properly Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "CURD operations are not working properly" Watch "CURD operations are not working properly" New topic
Author

CURD operations are not working properly

shrida bhanutejayenduri
Greenhorn

Joined: Oct 12, 2009
Posts: 2
when I use this statement <property name="hibernate.hbm2ddl.auto">delete</property> in hibernate.cfg.xml file ,
it is generating the error like this : Hibernate: insert into STUDENT_MST (STUDENT_NAME , MARKS, STUDENT_ID ) values (?, ?, ?)
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update.

Anybody rectify this.


Bhanuteja Shrida.Yenduri
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17231
    
    1

They are completely unrelated, so to speak.

the hbm2ddl is about hibernate creating the tables based on your mapping. If your mapping is wrong, then you might create a table that has a particular constraint that now won't allow your CRUD statements to run.

There can be many things wrong here, either your mapping, your code that fills in the values into your object, or the database table having wrong constraints created.

Please post your code and mapping, also make sure you use the CODE tag by clicking the Code button when replying.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Darvesh Niz
Ranch Hand

Joined: May 12, 2008
Posts: 99
may be this might help you

http://www.makemyinfo.com/Tutorial.do?action=first

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CURD operations are not working properly
 
Similar Threads
Dynamically moving the DIV
Table mapping problem
jquery datepicker not working
second-hand simulator.
jsp:setProperty stand action and its body