File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


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: 9303
    
  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: 9303
    
  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 ...
 
GeeCON Prague 2014
 
subject: Using non-qualified column reference Error