jQuery in Action, 2nd edition*
The moose likes Object Relational Mapping and the fly likes Hibernate's update problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate Watch "Hibernate New topic

Hibernate's update problem

Ivy chen

Joined: Aug 31, 2010
Posts: 16
Hi all~

i'm new to Hibernate.Now i'm falling into the "update" problem of hibernate~

i user the HQL editor in Myeclipse to test the HQL update statement "update Order as o set o.orderName = 'rfv' where o.orderName = 'bec'"

error comes:"org.hibernate.hql.QueryExecutionRequestException: Not supported for DML operations "

when i run the class"testF" no errors come out

let me know why this erroe comes out



here is my DB table
1/ Table "user "

2/Table "Order"


Java Class
1/Class "User"

2/Class "Order"



Class "OrderDaoImpl"

The test class "TestF"
It is sorta covered in the JavaRanch Style Guide.
subject: Hibernate's update problem
Similar Threads
please, help me to solve sun.jdbc.odbc.JdbcOdbcDriver cannot be cast to javax.sql.DataSource
spring+hibernate: insert data into database(one to many)
problem persisting an object with collections and manytomany relationship
deleteing rows
Please explain this @OneToOne