-->
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: table name containing period on MS SQL Server using JPA
PostPosted: Tue Nov 03, 2009 12:22 pm 
Newbie

Joined: Tue Jul 28, 2009 10:58 am
Posts: 2
I'm attempting to use jpql to select data from a table that has a period in it's name

Here is my entity
@Entity
@Table(catalog = "Gateway", schema = "stage", name = "confluence.Performance")
public class PerformanceEntity implements Serializable {
@Id
private Integer recordId;
...

I create a query:
Query query = entityManager.createQuery("From PerformanceEntity");
return query.getResultList();

This produces a query like:
select recordId from Gateway.stage.confluence.Performance
I need it to produce a query like
select recordId from Gateway.stage.[confluence.NAVPerformance]

I am using Spring to set the dialect:
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="SQL_SERVER"/>
<property name="showSql" value="true"/>
</bean>
</property>

Any ideas, or do I need to use a native query?


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.