This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!

Raakhi Khatwani

Greenhorn
+ Follow
since Jan 31, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Raakhi Khatwani

Well i have been facing the same issue.
the query works fine if i do not use aliases. but if i use them i keep getting JDBC exceptions
Jan 31, 2011 3:05:10 PM org.hibernate.type.NullableType nullSafeGet
INFO: could not read column value from result set: id; Column 'id' not found.
Jan 31, 2011 3:05:10 PM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 0, SQLState: S0022
Jan 31, 2011 3:05:10 PM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Column 'id' not found.

This is the query:

HIbernate: SELECT Reports.id reportId,Reports.studyId As 'studyId',Reports.name As 'Name',Reports.type As 'Periodicity',Users.name As 'Created By',Reports.status As 'Status' FROM Studies INNER JOIN Reports ON Reports.studyId=Studies.id INNER JOIN Users ON Users.id=Reports.createdBy WHERE (Studies.id = 127) AND (Reports.templateId IS NULL) AND (Reports.isDeleted = false)

when i copy and paste it in my SQL Browser, i get results.

I would be greatful if someone could shed some light