Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Console with custom naming strategy
PostPosted: Sun Oct 18, 2015 12:01 pm 
Newbie

Joined: Fri Sep 15, 2006 2:09 am
Posts: 11
Hi.

I'm using the JBoss Hibernate Tools 4.0.1 Eclipse plugin (Luna) together with a JPA project and I would like to get the Hibernate Console running for manually
query tests. In my project I've configured a custom naming strategy within the persistence.xml using hibernate.ejb.naming_strategy. This works
so far within the application.

I've setup a Hibernate Tools configuration so that the session factory gets initialized properly, specifying the persistence unit and the project, the PU is located in.
I can open the session factory and can browse the entities as well as the database connection. So far so well.

But when I try to execute a query via the hibernate console (from MyEntity), a postgresql exception occurs, complaining about the non-existing relation 'myentity'.
This is because my naming strategy normally adds a prefix to the table names.

In addition, I also added the naming strategy explicitly in the Hibernate Tools configuration option as well. But this also doesn't seem to have any effect.
Also, when I enter a non-existing class there, nobody complains about it - so I guess this is somehow being ignored.

Any idea what I'm missing?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 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.