wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Using non-qualified column reference Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Using non-qualified column reference Error" Watch "Using non-qualified column reference Error" New topic
Author

Using non-qualified column reference Error

Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

I am creating an EJB3 application with jBoss 4.0.2 and MySql 5.0. I recently added a new table to the application and now when I try to update the value of a few columns, then I get this error

Using non-qualified column reference [marksMaths -> ([marksMaths])]


And the update doesn't happen. I am using this kind of query

update StudentMarks sm set sm.marksMaths = 0 where sm.studentId = ?1

The datatype of the column marksMaths in the EJB is short and in the MySql table it is tinyint(4). Can anyone help me with the cause of this error :roll: ...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

Sorry! It was my mistake :XD: . I was calling this code from an unmanaged object and then didn't refresh that object to reflect the database changes. Then I made a few other changes to the object and then merged the changes to the database so the changes made by this code were overwritten. I posted this question in the ORM forum too and I have said sorry there too ...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using non-qualified column reference Error
 
Similar Threads
update query wont work in mysql, column name to blame?
hibernate with struts
Using non-qualified column reference Error
What happens when the length of the text exceed the limit of the column VARCHAR
Why does JPA change a datetime value from "0000-00-00 00:00:00" to null?