This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping 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 » Databases » Object Relational Mapping
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: ...

(I also posted this question in the EJB forum but then saw this forum so posted it here too)


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...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Using non-qualified column reference Error
 
Similar Threads
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?
hibernate with struts
update query wont work in mysql, column name to blame?