-->
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.  [ 2 posts ] 
Author Message
 Post subject: hibernate is transforming sequence name having quotes with b
PostPosted: Fri Apr 01, 2016 7:00 am 
Newbie

Joined: Fri Apr 01, 2016 6:57 am
Posts: 1
I have a table with name as "Project" (a table name surrounded by quotes, naming convention in HANA DB).

When I am trying to create a sequence using hibernate with the following code, the enclosing quotes are getting replaced with backticks. I want to have the sequence name enclosed with quotes.

Code:
@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="PROJECT_SEQ")
@SequenceGenerator(name="PROJECT_SEQ",sequenceName="\"MY_SCHEMA\".\"com.project.sequence.Project_SEQ\"",allocationSize=10)
@Column(name="ID", columnDefinition="INTEGER64") private long id;

Exception:
org.springframework.dao.InvalidDataAccessResourceUsageException: could not prepare statement; SQL [select `MY_SCHEMA"."com.project.sequence.Project_SEQ`.nextval from dummy]; nested exception is org.hibernate.exception.SQLGrammarException: could not prepare statement

Expectation:
The below mentioned sequence name should be used by hibernate
select "MY_SCHEMA"."com.project.sequence.Project_SEQ".nextval from dummy

Note: I am using HANA DB


Top
 Profile  
 
 Post subject: Re: hibernate is transforming sequence name having quotes with b
PostPosted: Fri Apr 01, 2016 9:41 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
It could be a bug. Add a replicating test case and file a bug report.


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

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.