Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] reserved keywords

I'm switching to exlipselink from toplink for some of the new features (mainly the batch and fetch query hints) however, I'm encountering one problem.. I have some entities with columns that have reserved names.. for example, "to" and "from" (it is a table to store an email). The problem is with the following query.

"select e from Email e where e.id = :id"

in toplink, this wasn't a problem.. the query it would generate is

"SELECT t0.id, t0.subject, t0.to, t0.from FROM email t0 where t0.id = 1"

but in eclipselink, its not adding the t0. to the list of columns...  aka its generating the following sql

"SELECT id, subject, to, from FROM email t0 where t0.id = 1"

which is clearly invalid....


is there any way in eclipselink to make it add the t0. ?  or is the only solution to rename the columns in the database (which would be a large amount of work :( )

Back to the top