-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Escape table names using reverse engineering
PostPosted: Fri Oct 24, 2008 5:21 am 
Newbie

Joined: Fri Oct 24, 2008 5:13 am
Posts: 3
Hello,

I'm using Hibernate 3.3.1 GA and I'm reverse engineering a database with a table called update. My reverse mapping looks like this;

Code:
<table name="`update`" >
  <primary-key>
    <generator class="native"></generator>
  </primary-key>
</table>


But the Update.hbm.xml contains the line:
Code:
<class name="Update" table="update">


While it should read (notice the backticks):
Code:
<class name="Update" table="`update`">


How to force the backtics in my generated .hbm.xml file??

Note: When I manually insert them, everyting works okay. Without them I get SQL syntax errors. So I need those backticks! ;)

Thanks in advance for your reply!

WIth kind regards,

Jurrie

PS: The examples are simplified but should still explain the problem.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.