Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate and a Table called [group] - problem

 
Alana Sparx
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I need to model a table called group which, being an SQL keyword is giving me some problems.

My Group.hbm.xml file is defined as:


When I try and query the database, the following sql is produced



which falls over with the exception message


If I run the sql against the database, it works fine!!

I've tried replacing the [] with backticks (``), the same eception is thrown.

There is also the problem that the query returns everything despite being given a QBE object with the composite keys filled in, but one thing at a time, eh?
 
Shailesh Kini
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alana,

Can you please check if the database userid used by hibernate has access to this table?
 
Alana Sparx
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shailesh

Oh, it's much more serious than that. It would help if the test database I was using had a [group] table in the first place!

Sometimes my own stupidity amazes even me!

Many thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic