Joined: Tue Feb 01, 2005 11:36 am Posts: 5
|
I am attempting to perform a delete via createQuery like this:
createQuery(
"delete WebLogEntry where website.id = :id")
.setInteger("id", website.getId())
.executeUpdate();
However at runtme I am getting an exception:
JDBC exception on Hibernate data access: could not execute update query; nested exception is java.sql.SQLException: Column not found: WEBLOG_ENTRY_ID in statement [delete from weblog_entry where weblogentr0_.weblog_entry_id=? and status=?]
Looking at the sql that is being generated:
Hibernate: delete from weblog_entry where weblogentr0_.weblog_entry_id=? and status=?
It looks to be aa problem the table name referenced in the where clause is different that the table name in the from clause?
Am I doins something obviously stupid or is it an issue?
|
|