Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tuple in jql/hql

 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this jql/hql:



hibernate generates this sql which works fine in DB2:



(I use DB2).

Why does Hibernate not complain about the state, that tuple are not SQL-conform even DB2 supports it?

I want to write database-independent code, so when using tuple in jql/hql, does hibernate translate it accordingly when using a database which not supports tuple?

 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand what your question is. That is legal SQL. I have had many queries where the IN was comparing two different fields. It happens a lot when you have composite Primary Keys in your database and all databases support that.

Mark
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Are you sure? I have thought, that there are databases which does NOT support tuples.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic